Small revision to affinity pom to get affinity yang model to build.
[affinity.git] / analytics / implementation / pom.xml
index 271b66b808d3da5afddb2d7e0be751fdaa83739f..815a30e8bd478d9e058ba82a91c9a0f24e2c2880 100644 (file)
   <version>0.4.0-SNAPSHOT</version>
   <packaging>bundle</packaging>
 
+  <properties>
+    <yang.version>0.5.9-SNAPSHOT</yang.version>
+  </properties>
+
+  <repositories>
+    <!-- OpenDayLight Released artifact -->
+    <repository>
+      <id>opendaylight-release</id>
+      <name>opendaylight-release</name>
+      <url>${nexusproxy}/repositories/opendaylight.release/</url>
+    </repository>
+    <!-- OpenDayLight Snapshot artifact -->
+    <repository>
+      <id>opendaylight-snapshot</id>
+      <name>opendaylight-snapshot</name>
+      <url>${nexusproxy}/repositories/opendaylight.snapshot/</url>
+    </repository>
+  </repositories>
+
   <build>
     <pluginManagement>
       <plugins>
           </execution>
         </executions>
       </plugin>
+      <!-- START YANG -->
+      <plugin>
+        <groupId>org.opendaylight.yangtools</groupId>
+        <artifactId>yang-maven-plugin</artifactId>
+        <version>0.5.9-SNAPSHOT</version>
+        <executions>
+          <execution>
+            <goals>
+              <!-- Uncomment out the next line to use the yang model -->
+<!--              <goal>generate-sources</goal> -->
+            </goals>
+            <configuration>
+              <yangFilesRootDir>src/main/yang</yangFilesRootDir>
+              <codeGenerators>
+                <generator>
+                  <codeGeneratorClass>
+                    org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl
+                  </codeGeneratorClass>
+                  <outputBaseDir>
+                    target/generated-sources/sal
+                  </outputBaseDir>
+                </generator>
+              </codeGenerators>
+              <inspectDependencies>false</inspectDependencies>
+            </configuration>
+          </execution>
+        </executions>        
+        <dependencies>
+          <dependency>
+            <groupId>org.opendaylight.yangtools</groupId>
+            <artifactId>maven-sal-api-gen-plugin</artifactId>
+            <version>0.6.0-SNAPSHOT</version>
+            <type>jar</type>
+          </dependency>
+        </dependencies>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <version>1.7</version>
+        <executions>
+          <execution>
+            <phase>generate-sources</phase>
+            <goals>
+              <goal>add-source</goal>
+            </goals>
+            <configuration>
+              <sources>
+                <source>target/generated-sources/sal</source>
+              </sources>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <!-- END YANG -->
     </plugins>
   </build>
   <dependencies>
       <artifactId>statisticsmanager</artifactId>
       <version>0.4.0-SNAPSHOT</version>
     </dependency>
+    <!-- START YANG -->
+    <dependency>
+      <groupId>org.opendaylight.yangtools</groupId>
+      <artifactId>yang-binding</artifactId>
+      <version>${yang.version}</version>
+    </dependency>
+      <dependency>
+        <groupId>org.opendaylight.yangtools</groupId>
+        <artifactId>yang-common</artifactId>
+        <version>${yang.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.opendaylight.yangtools.model</groupId>
+        <artifactId>ietf-inet-types</artifactId>
+        <version>2010.09.24-SNAPSHOT</version>
+      </dependency>
+      <dependency>
+        <groupId>org.opendaylight.yangtools.model</groupId>
+        <artifactId>ietf-yang-types</artifactId>
+        <version>2010.09.24-SNAPSHOT</version>
+      </dependency>
+    <!-- END YANG -->
   </dependencies>
 </project>