Merge "Add shutdown hook."
[controller.git] / opendaylight / config / pom.xml
index 1a29046e2dac3d9bb6164dbc457aa6bade0beeca..acd4916a4b8e8fb9f0905ceb59c6cb1ce5cf75fa 100644 (file)
@@ -43,6 +43,8 @@
         <module>config-persister-directory-xml-adapter</module>
         <module>config-persister-directory-autodetect-adapter</module>
         <module>yang-test-plugin</module>
+        <module>shutdown-api</module>
+        <module>shutdown-impl</module>
     </modules>
 
     <profiles>
@@ -69,6 +71,7 @@
         <opendaylight.yang.version>0.5.9-SNAPSHOT</opendaylight.yang.version>
         <opendaylight.binding.version>0.6.0-SNAPSHOT</opendaylight.binding.version>
         <opendaylight.yangtools.version>0.1.1-SNAPSHOT</opendaylight.yangtools.version>
+        <salGeneratorPath>${project.build.directory}/generated-sources/sal</salGeneratorPath>
     </properties>
 
     <dependencies>
                 <version>${config.version}</version>
             </dependency>
 
+            <dependency>
+                <groupId>org.opendaylight.controller</groupId>
+                <artifactId>shutdown-api</artifactId>
+                <version>${config.version}</version>
+            </dependency>
+
             <!-- MD-SAL -->
             <dependency>
                 <groupId>org.opendaylight.yangtools</groupId>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
             </plugin>
-            <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>build-helper-maven-plugin</artifactId>
-            </plugin>
+
+
         </plugins>
 
         <pluginManagement>
                                             org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl
                                         </codeGeneratorClass>
                                         <outputBaseDir>
-                                            target/generated-sources/sal
+                                            ${salGeneratorPath}
                                         </outputBaseDir>
                                     </generator>
                                     <generator>
                         </dependency>
                     </dependencies>
                 </plugin>
+                <!-- tell eclipse about generated source folders -->
+                <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>${salGeneratorPath}</source>
+                                </sources>
+                            </configuration>
+                        </execution>
+                    </executions>
+                </plugin>
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-jar-plugin</artifactId>