Bump controller to use yangtools 1.2.0
[controller.git] / opendaylight / config / config-parent / pom.xml
index 10c1824ebece2a24af7cc299dba79d88b03d18c3..72a416cb4c4e4a567aa6bd4a3e132ad4eda3c6cf 100644 (file)
@@ -9,22 +9,23 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <parent>
-    <groupId>org.opendaylight.yangtools</groupId>
+    <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
-    <version>0.7.0-SNAPSHOT</version>
+    <version>0.12.0-SNAPSHOT</version>
     <relativePath/>
   </parent>
 
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.opendaylight.controller</groupId>
   <artifactId>config-parent</artifactId>
-  <version>0.3.0-SNAPSHOT</version>
+  <version>0.8.0-SNAPSHOT</version>
   <packaging>pom</packaging>
 
   <properties>
-    <config.version>0.3.0-SNAPSHOT</config.version>
-    <mdsal.version>1.2.0-SNAPSHOT</mdsal.version>
-    <jmxGeneratorPath>src/main/yang-gen-config</jmxGeneratorPath>
+    <config.version>0.8.0-SNAPSHOT</config.version>
+    <mdsal.version>1.7.0-SNAPSHOT</mdsal.version>
+    <yangtools.version>1.2.0</yangtools.version>
+    <jmxGeneratorPath>${project.build.directory}/generated-sources/config-binding</jmxGeneratorPath>
     <config.file>src/main/config/default-config.xml</config.file>
   </properties>
 
@@ -45,10 +46,28 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
         <type>pom</type>
         <scope>import</scope>
       </dependency>
+      <dependency>
+        <groupId>org.opendaylight.yangtools</groupId>
+        <artifactId>yangtools-artifacts</artifactId>
+        <version>${yangtools.version}</version>
+        <type>pom</type>
+        <scope>import</scope>
+      </dependency>
+      <dependency>
+        <groupId>org.opendaylight.mdsal</groupId>
+        <artifactId>mdsal-artifacts</artifactId>
+        <version>2.4.0-SNAPSHOT</version>
+        <type>pom</type>
+        <scope>import</scope>
+      </dependency>
     </dependencies>
   </dependencyManagement>
 
   <dependencies>
+    <dependency>
+      <groupId>org.opendaylight.yangtools</groupId>
+      <artifactId>yang-common</artifactId>
+    </dependency>
     <dependency>
       <groupId>org.opendaylight.controller</groupId>
       <artifactId>config-api</artifactId>
@@ -64,6 +83,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
         <plugin>
           <groupId>org.opendaylight.yangtools</groupId>
           <artifactId>yang-maven-plugin</artifactId>
+          <version>${yangtools.version}</version>
           <dependencies>
             <dependency>
               <groupId>org.opendaylight.controller</groupId>
@@ -111,11 +131,53 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
             </filesets>
           </configuration>
         </plugin>
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>build-helper-maven-plugin</artifactId>
+          <executions>
+            <execution>
+              <id>add-yang-sources</id>
+              <phase>generate-sources</phase>
+              <goals>
+                <goal>add-source</goal>
+              </goals>
+              <configuration>
+                <sources>
+                  <source>${jmxGeneratorPath}</source>
+                  <source>${salGeneratorPath}</source>
+                </sources>
+              </configuration>
+            </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>
   <profiles>
     <profile>
+      <id>attach-config-without-filtering</id>
       <activation>
         <file>
           <exists>${config.file}</exists>