Override license checker for yang-test 78/31378/2
authorThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 15 Dec 2015 23:16:54 +0000 (18:16 -0500)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 4 Jan 2016 13:19:47 +0000 (13:19 +0000)
yang-test generates files which prevents us from validating license
headers correctly.

Change-Id: I4755f702a87fc428162b75e8359ca5132264a60a
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
opendaylight/config/yang-test/pom.xml

index b8cec8ee13502943e7bf201bfe4395ce89908a90..44e656788606653e012af2d126347839584f18f7 100644 (file)
         </configuration>
       </plugin>
 
+
+        <plugin>
+          <artifactId>maven-checkstyle-plugin</artifactId>
+          <version>${checkstyle.version}</version>
+          <dependencies>
+            <dependency>
+              <groupId>org.opendaylight.odlparent</groupId>
+              <artifactId>checkstyle</artifactId>
+              <version>${odl.checkstyle.version}</version>
+            </dependency>
+            <dependency>
+              <groupId>org.opendaylight.odlparent</groupId>
+              <artifactId>odl-license</artifactId>
+              <version>0.0.1-SNAPSHOT</version>
+            </dependency>
+          </dependencies>
+          <configuration>
+            <configLocation>odl_checks.xml</configLocation>
+            <!-- <sourceDirectory> is needed so that checkstyle ignores the
+                 generated sources directory -->
+            <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+            <excludes>
+              org/opendaylight/yang/gen/**,
+              **/protobuff/messages/**,
+              **/thrift/gen/*.java
+            </excludes>
+            <failsOnError>false</failsOnError>
+            <consoleOutput>true</consoleOutput>
+          </configuration>
+          <executions>
+            <execution>
+              <id>check-license</id>
+              <goals>
+                <goal>check</goal>
+              </goals>
+              <phase>process-sources</phase>
+              <configuration>
+                <configLocation>check-license.xml</configLocation>
+                <includeResources>false</includeResources>
+                <includeTestResources>false</includeTestResources>
+                <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
+                <excludes>
+                  org/opendaylight/yang/gen/**,
+                  **/protobuff/messages/**,
+                  **/thrift/gen/*.java,
+                  **/config/yang/test/**
+                </excludes>
+                <failsOnError>false</failsOnError>
+                <consoleOutput>true</consoleOutput>
+              </configuration>
+            </execution>
+          </executions>
+        </plugin>
+
       <plugin>
         <groupId>org.opendaylight.controller</groupId>
         <artifactId>yang-test-plugin</artifactId>