Add PMD exclusion for config-generated files 42/43242/2
authorRobert Varga <rovarga@cisco.com>
Fri, 5 Aug 2016 15:09:31 +0000 (17:09 +0200)
committerRobert Varga <nite@hq.sk>
Fri, 5 Aug 2016 16:34:48 +0000 (16:34 +0000)
Unfortunately PMD does not support wildcard
root exclusions, hence we have to match odlparent
configuration and extend it.

Change-Id: I4bc7a1b8c25b75cb5b348fb2a16f0e5b2c111359
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/config/config-parent/pom.xml

index 042cb4e..97ecea7 100644 (file)
@@ -150,6 +150,28 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
             </execution>
           </executions>
         </plugin>
+
+        <!-- This has to match the definition in odlparent and exists only
+             because for some reason PMD does not understand wildcards. -->
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-pmd-plugin</artifactId>
+          <executions>
+            <execution>
+              <id>cpd</id>
+              <phase>process-sources</phase>
+              <goals>
+                <goal>cpd-check</goal>
+              </goals>
+              <configuration>
+                <excludeRoots>
+                  <excludeRoot>${jmxGeneratorPath}</excludeRoot>
+                  <excludeRoot>${salGeneratorPath}</excludeRoot>
+                </excludeRoots>
+              </configuration>
+            </execution>
+          </executions>
+        </plugin>
       </plugins>
     </pluginManagement>
   </build>