Skip to content

shitikanth/enforcer-rules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Apache License, Version 2.0, January 2004 Github CI Maven Central

Motivation

Ban Empty Java Files

Empty Java source files (or all commented or just not containing a class with the same name) are detected as stale source files by Apache Maven Compiler Plugin, so modules containing such files get unnecessarily recompiled every single time.

This plugin adds an enforcer rule to detect and ban such files.

Usage

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-enforcer-plugin</artifactId>
  <version>3.5.0</version>
  <dependencies>
    <dependency>
      <groupId>io.github.shitikanth</groupId>
      <artifactId>enforcer-rules</artifactId>
      <version>1.0-SNAPSHOT</version>
    </dependency>
  </dependencies>
  <executions>
    <execution>
      <id>enforce-java-rules</id>
      <goals>
        <goal>enforce</goal>
      </goals>
      <configuration>
        <rules>
          <banEmptyJavaFiles/>
        </rules>
      </configuration>
    </execution>
  </executions>
</plugin>

About

Maven Enforcer Rule to ban empty java source files

Resources

License

Stars

Watchers

Forks

Packages

No packages published