Check license headers during default build

This commit is contained in:
Simon Brandhof 2011-07-15 18:09:43 +02:00
parent 37dc4b62ec
commit f4d600e1d0

64
pom.xml
View File

@ -412,6 +412,37 @@
<javadocDir>${project.reporting.outputDirectory}/${project.version}/apidocs</javadocDir>
</configuration>
</plugin>
<!-- check copyright/license headers -->
<plugin>
<inherited>false</inherited>
<groupId>com.mycila.maven-license-plugin</groupId>
<artifactId>maven-license-plugin</artifactId>
<configuration>
<header>${project.basedir}/copyright.txt</header>
<failIfMissing>true</failIfMissing>
<strictCheck>true</strictCheck>
<aggregate>true</aggregate>
<includes>
<include>**/sonar-*/src/main/java/**</include>
<include>**/sonar-*/src/test/java/**</include>
</includes>
<excludes>
<exclude>tests/**</exclude>
</excludes>
<mapping>
<java>SLASHSTAR_STYLE</java>
</mapping>
</configuration>
<executions>
<execution>
<id>enforce-license-headers</id>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
@ -1046,39 +1077,6 @@
</execution>
</executions>
</plugin>
<!-- check copyright/license headers -->
<plugin>
<inherited>false</inherited>
<groupId>com.mycila.maven-license-plugin</groupId>
<artifactId>maven-license-plugin</artifactId>
<configuration>
<header>${project.basedir}/copyright.txt</header>
<failIfMissing>true</failIfMissing>
<strictCheck>true</strictCheck>
<aggregate>true</aggregate>
<includes>
<include>**/sonar-*/src/main/java/**</include>
<include>**/sonar-*/src/test/java/**</include>
</includes>
<excludes>
<exclude>tests/**</exclude>
</excludes>
<mapping>
<java>SLASHSTAR_STYLE</java>
</mapping>
</configuration>
<executions>
<execution>
<id>enforce-license-headers</id>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>