Add PMD exclusion for config-generated files
[controller.git] / opendaylight / config / config-parent / pom.xml
index 723111fc954050d8c5352c5d8d691c243ed557b9..97ecea73bc5e74287d72383c11c939cb9c5650c4 100644 (file)
@@ -143,7 +143,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
               </goals>
               <configuration>
                 <sources>
-                  <source>src/main/yang</source>
                   <source>${jmxGeneratorPath}</source>
                   <source>${salGeneratorPath}</source>
                 </sources>
@@ -151,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>