Merge "Do not use currently-deprecated APIs"
[controller.git] / opendaylight / md-sal / samples / toaster-consumer / pom.xml
index 49cf97d11bf71a7ae1825096f4b63bf422c4d58b..07a7d41ee7734849e0eed91c3c9bce09001fb36f 100644 (file)
@@ -1,10 +1,9 @@
-<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">
+<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">
        <modelVersion>4.0.0</modelVersion>
        <parent>
                <artifactId>sal-samples</artifactId>
                <groupId>org.opendaylight.controller.samples</groupId>
-               <version>1.0-SNAPSHOT</version>
+               <version>1.1-SNAPSHOT</version>
        </parent>
        <artifactId>sample-toaster-consumer</artifactId>
        <packaging>bundle</packaging>
       <connection>scm:git:ssh://git.opendaylight.org:29418/controller.git</connection>
       <developerConnection>scm:git:ssh://git.opendaylight.org:29418/controller.git</developerConnection>
       <url>https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL</url>
-    </scm>
+      <tag>HEAD</tag>
+  </scm>
+
+    <properties>
+        <sal-binding-api.version>1.1-SNAPSHOT</sal-binding-api.version>
+        <jmxGeneratorPath>${project.build.directory}/generated-sources/config</jmxGeneratorPath>
+
+    </properties>
 
        <build>
                <plugins>
                                <artifactId>maven-bundle-plugin</artifactId>
                                <configuration>
                                        <instructions>
-                                               <Export-Package>org.opendaylight.controller.sample.toaster.provider.api</Export-Package>
-                                               <Private-Package>org.opendaylight.controller.sample.toaster.provider.impl</Private-Package>
-                                               <Bundle-Activator>org.opendaylight.controller.sample.toaster.provider.impl.ToastConsumerImpl</Bundle-Activator>
+                                               <Export-Package>
+                            org.opendaylight.controller.sample.toaster.provider.api,
+                            org.opendaylight.controller.config.yang.toaster-consumer,
+                        </Export-Package>
+                        <Import-Package>*</Import-Package>
                                        </instructions>
                                </configuration>
                        </plugin>
+            <plugin>
+                <groupId>org.opendaylight.yangtools</groupId>
+                <artifactId>yang-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>config</id>
+                        <goals>
+                            <goal>generate-sources</goal>
+                        </goals>
+                        <configuration>
+                            <codeGenerators>
+                                <generator>
+                                    <codeGeneratorClass>
+                                        org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
+                                    </codeGeneratorClass>
+                                    <outputBaseDir>${jmxGeneratorPath}</outputBaseDir>
+                                    <additionalConfiguration>
+                                        <namespaceToPackage1>
+                                            urn:opendaylight:params:xml:ns:yang:controller==org.opendaylight.controller.config.yang
+                                        </namespaceToPackage1>
+                                    </additionalConfiguration>
+                                </generator>
+                            </codeGenerators>
+                            <inspectDependencies>true</inspectDependencies>
+                        </configuration>
+                    </execution>
+                </executions>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.opendaylight.controller</groupId>
+                        <artifactId>yang-jmx-generator-plugin</artifactId>
+                        <version>${config.version}</version>
+                    </dependency>
+                </dependencies>
+            </plugin>
+
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <version>1.8</version>
+                <executions>
+                    <execution>
+                        <id>add-source</id>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>add-source</goal>
+                        </goals>
+                        <configuration>
+                            <sources>
+                                <source>${jmxGeneratorPath}</source>
+                            </sources>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
                </plugins>
        </build>
 
                <dependency>
                        <groupId>org.opendaylight.controller</groupId>
                        <artifactId>sal-binding-api</artifactId>
-                       <version>1.0-SNAPSHOT</version>
                </dependency>
+        <dependency>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>config-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>sal-binding-config</artifactId>
+        </dependency>
        </dependencies>
 </project>