Add a maven plugin to check the licence header in java files.
Change-Id: I99e394d4e2cd999768f4d692c12d5e04cb93adc5
Signed-off-by: Jonathan Dumont <jonathan.dumont@all4tec.net>
diff --git a/pom.xml b/pom.xml
index 70340b1..a0b7a1d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -93,6 +93,41 @@
<version>${tycho-version}</version>
</plugin>
+ <!-- Plugin used to check the license. -->
+ <!-- NB: It's not configured to write the licence header automatically. -->
+ <!-- Usage: mvn licence:check -->
+ <plugin>
+ <groupId>com.mycila</groupId>
+ <artifactId>license-maven-plugin</artifactId>
+ <version>2.11</version>
+ <configuration>
+ <header>${session.executionRootDirectory}/releng/licence/epl.header.txt</header>
+ <useDefaultExcludes>true</useDefaultExcludes>
+ <failIfMissing>true</failIfMissing>
+ <!-- Avoid a strict check as the header comment contains also the contributors. -->
+ <strictCheck>false</strictCheck>
+ <aggregate>true</aggregate>
+ <includes>
+ <include>**/*.java</include>
+ </includes>
+ <excludes>
+ <exclude>**/src/site/**</exclude>
+ <exclude>**/target/**</exclude>
+ </excludes>
+ <properties>
+ <year>2015</year>
+ </properties>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>process-sources</phase>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
</plugins>
</build>