summaryrefslogtreecommitdiffstats
path: root/common/impl-parent
diff options
context:
space:
mode:
authorMaros Marsalek <mmarsale@cisco.com>2016-06-10 15:56:09 +0200
committerMarek Gradzki <mgradzki@cisco.com>2016-06-13 11:53:59 +0000
commitd8514c6bef58fefc2afff7f2e4b4dba3633085d1 (patch)
tree6f3eed8014c67e53f4d139af31c971bad6238e04 /common/impl-parent
parent318b9e56d0b11a5ca4ea8da4879b4693bcf8763e (diff)
Enable checkstyle
Change-Id: Icb7ba90e26294b227d0bd393183ba33d99c2660b Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Diffstat (limited to 'common/impl-parent')
-rw-r--r--common/impl-parent/pom.xml78
1 files changed, 68 insertions, 10 deletions
diff --git a/common/impl-parent/pom.xml b/common/impl-parent/pom.xml
index b8672ef0e..b1717a202 100644
--- a/common/impl-parent/pom.xml
+++ b/common/impl-parent/pom.xml
@@ -35,19 +35,77 @@
</properties>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <configuration>
+ <!-- Override checkstyle configuration to fit Honeycomb coding style-->
+ <configLocation>honeycomb-checkstyle.xml</configLocation>
+ <includeTestResources>true</includeTestResources>
+ <!--TODO enable fail on violation after issues are resolved + set in as errors in checkstyle xml-->
+ </configuration>
+ <executions>
+
+ <!-- Override license check configuration to fit Honeycomb coding style-->
+ <execution>
+ <id>check-license</id>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ <phase>process-sources</phase>
+ <configuration>
+ <headerLocation>HONEYCOMB_LICENSE.txt</headerLocation>
+ <failOnViolation>true</failOnViolation>
+ <failsOnError>true</failsOnError>
+ <outputFile>${project.build.directory}/checkstyle-license-result.xml</outputFile>
+ </configuration>
+ </execution>
+
+ <!-- Add logging checks from yangtools -->
+ <execution>
+ <id>check-logging</id>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ <phase>process-sources</phase>
+ <configuration>
+ <failOnViolation>true</failOnViolation>
+ <configLocation>honeycomb-checkstyle-logging.xml</configLocation>
+ <consoleOutput>true</consoleOutput>
+ <includeTestSourceDirectory>true</includeTestSourceDirectory>
+ <sourceDirectory>${project.basedir}</sourceDirectory>
+ <includes>**\/*.java,**\/*.xml,**\/*.ini,**\/*.sh,**\/*.bat,**\/*.yang</includes>
+ <excludes>**\/target\/,**\/bin\/,**\/target-ide\/,**\/src/main/yang-gen-config\/,**\/src/main/yang-gen-sal\/,**\/src/main/xtend-gen\/,**\/src/main/yang\/</excludes>
+ <outputFile>${project.build.directory}/checkstyle-logging-result.xml</outputFile>
+ </configuration>
+ </execution>
+ <execution>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ <phase>process-sources</phase>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>io.fd.honeycomb.common</groupId>
+ <artifactId>honeycomb-checkstyle</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <!-- Necessary for logging checks -->
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>checkstyle-logging</artifactId>
+ <version>${yangtools.version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
- <version>${checkstyle.version}</version>
- <executions>
- <execution>
- <id>check-license</id>
- <goals>
- <goal>check</goal>
- </goals>
- <phase>none</phase>
- </execution>
- </executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>