Add license check plugin to root pom. Disabled for the entire project, except for poms that override it (opendaylight, nvp)

This commit is contained in:
Hugo Trippaers 2014-01-22 11:15:39 +01:00
parent 33eaa4f633
commit d3cd73d861
4 changed files with 70 additions and 27 deletions

View File

@ -6,7 +6,7 @@ to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance "License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an software distributed under the License is distributed on an

View File

@ -34,6 +34,21 @@
<filtering>true</filtering> <filtering>true</filtering>
</testResource> </testResource>
</testResources> </testResources>
<plugins>
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<executions>
<execution>
<id>cloudstack-checklicence</id>
<phase>process-classes</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build> </build>
<profiles> <profiles>

View File

@ -48,35 +48,17 @@
</testResources> </testResources>
<plugins> <plugins>
<plugin> <plugin>
<groupId>com.mycila.maven-license-plugin</groupId> <groupId>com.mycila</groupId>
<artifactId>maven-license-plugin</artifactId> <artifactId>license-maven-plugin</artifactId>
<version>1.9.0</version>
<executions> <executions>
<execution> <execution>
<id>cloudstack-checklicence</id>
<phase>process-classes</phase> <phase>process-classes</phase>
<goals> <goals>
<goal>format</goal> <goal>check</goal>
</goals> </goals>
</execution> </execution>
</executions> </executions>
<configuration>
<strictCheck>true</strictCheck>
<aggregate>true</aggregate>
<header>../../../LICENSE.header</header>
<mapping>
<xml>XML_STYLE</xml>
    <java>DOUBLESLASH_STYLE</java>
    <clj>SEMICOLON_STYLE</clj>
</mapping>
<useDefaultExcludes>false</useDefaultExcludes>
<excludes>
<exclude>target/**</exclude>
<exclude>.settings/**</exclude>
<exclude>.checkstyle</exclude>
<exclude>.project</exclude>
<exclude>.classpath</exclude>
</excludes>
</configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>

46
pom.xml
View File

@ -87,6 +87,7 @@
<cs.daemon.version>1.0.10</cs.daemon.version> <cs.daemon.version>1.0.10</cs.daemon.version>
<cs.jna.version>4.0.0</cs.jna.version> <cs.jna.version>4.0.0</cs.jna.version>
<cs.checkstyle.version>2.11</cs.checkstyle.version> <cs.checkstyle.version>2.11</cs.checkstyle.version>
<cs.mycila.license.version>2.5</cs.mycila.license.version>
</properties> </properties>
<distributionManagement> <distributionManagement>
@ -455,6 +456,19 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<executions>
<execution>
<id>cloudstack-checklicence</id>
<phase>none</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins> </plugins>
<pluginManagement> <pluginManagement>
<plugins> <plugins>
@ -488,6 +502,38 @@
<excludes>**\/deps\/,**\/test\/,**\/target\/,**\/bin\/,**\/*.xml,**\/*.ini,**\/*.sh,**\/*.bat,**\/awsapi\/,**\/XenServerJava\/,**\/apidoc\/</excludes> <excludes>**\/deps\/,**\/test\/,**\/target\/,**\/bin\/,**\/*.xml,**\/*.ini,**\/*.sh,**\/*.bat,**\/awsapi\/,**\/XenServerJava\/,**\/apidoc\/</excludes>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>${cs.mycila.license.version}</version>
<executions>
<execution>
<id>cloudstack-checklicence</id>
<phase>process-classes</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<strictCheck>true</strictCheck>
<aggregate>true</aggregate>
<header>LICENSE.header</header>
<mapping>
<xml>XML_STYLE</xml>
    <java>DOUBLESLASH_STYLE</java>
    <clj>SEMICOLON_STYLE</clj>
</mapping>
<useDefaultExcludes>false</useDefaultExcludes>
<excludes>
<exclude>**/target/**</exclude>
<exclude>.settings/**</exclude>
<exclude>.checkstyle</exclude>
<exclude>.project</exclude>
<exclude>.classpath</exclude>
</excludes>
</configuration>
</plugin>
<plugin> <plugin>
<artifactId>maven-clean-plugin</artifactId> <artifactId>maven-clean-plugin</artifactId>
<configuration> <configuration>