Migrate simple ird to use blueprint 42/53742/9
authorXiao Lin <linxiao9292@outlook.com>
Thu, 23 Mar 2017 15:35:50 +0000 (23:35 +0800)
committerShawn Lin <x.shawn.lin@gmail.com>
Fri, 24 Mar 2017 12:44:12 +0000 (20:44 +0800)
Patch set 3: Remove redundant dependencies for config.xml
Patch set 8: Move SimpleIrdUtilsTest to simple-ird/api

Change-Id: I15c82d34a1cfeef14ceb43aacc9d59758d71ad15
Signed-off-by: Shawn Lin <x.shawn.lin@gmail.com>
Signed-off-by: Kai Gao <gaok12@mails.tsinghua.edu.cn>
24 files changed:
alto-basic/pom.xml
alto-basic/simple-ird/api/pom.xml
alto-basic/simple-ird/api/src/test/java/org/opendaylight/alto/basic/simpleird/SimpleIrdUtilsTest.java [moved from alto-basic/simple-ird/impl/src/test/java/org/opendaylight/alto/basic/simpleird/SimpleIrdUtilsTest.java with 100% similarity]
alto-basic/simple-ird/artifacts/pom.xml
alto-basic/simple-ird/features/pom.xml
alto-basic/simple-ird/features/src/main/features/features.xml
alto-basic/simple-ird/impl/pom.xml
alto-basic/simple-ird/impl/src/main/config/default-config.xml [deleted file]
alto-basic/simple-ird/impl/src/main/config/maven-metadata-local.xml [deleted file]
alto-basic/simple-ird/impl/src/main/java/org/opendaylight/alto/basic/impl/AltoSimpleIrdProvider.java
alto-basic/simple-ird/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/alto/simple/ird/impl/rev151021/AltoSimpleIrdModule.java [deleted file]
alto-basic/simple-ird/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/alto/simple/ird/impl/rev151021/AltoSimpleIrdModuleFactory.java [deleted file]
alto-basic/simple-ird/impl/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml [new file with mode: 0644]
alto-basic/simple-ird/impl/src/main/yang/alto-simple-ird-impl.yang [deleted file]
alto-basic/simple-ird/impl/src/test/java/org/opendaylight/alto/basic/impl/SimpleIrdEntryListenerTest.java
alto-basic/simple-ird/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/alto/simple/ird/impl/rev151021/AltoSimpleIrdModuleFactoryTest.java [deleted file]
alto-basic/simple-ird/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/alto/simple/ird/impl/rev151021/AltoSimpleIrdModuleTest.java [deleted file]
alto-basic/simple-ird/it/pom.xml
alto-basic/simple-ird/it/src/test/java/org/opendaylight/alto/basic/it/AltoSimpleIrdIT.java [moved from alto-basic/simple-ird/it/src/test/java/org/opendaylight/alto/basic/it/AltoSimpleIRDIT.java with 82% similarity]
alto-basic/simple-ird/karaf/pom.xml
alto-basic/simple-ird/pom.xml
alto-release-features/features-alto/pom.xml
alto-release-features/features-alto/src/main/features/features.xml
alto-release-features/odl-alto-simpleird/src/main/feature/feature.xml [deleted file]

index cce3f1bf7c4684604fc9e968e0c5f1468fe9324d..00883ea44611765f2747a7c4c88fd6e0294c6bda 100644 (file)
@@ -23,10 +23,10 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
     <maven>3.1.1</maven>
   </prerequisites>
   <modules>
-    <module>simple-ird</module>
     <module>manual-maps</module>
     <module>simple-ecs</module>
     <module>auto-maps</module>
+    <module>simple-ird</module>
   </modules>
   <!-- DO NOT install or deploy the repo root pom as it's only needed to initiate a build -->
   <build>
index 02c81e7cbea46c09fdc29ae29ca3155b23b8389c..36647c0398ce16ed35d30c74583359e6e96248d7 100644 (file)
@@ -1,12 +1,16 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-Copyright © 2015 Yale University and others. All rights reserved.
+Copyright © 2017 SNLab and others. All rights reserved.
 
 This program and the accompanying materials are made available under the
 terms of the Eclipse Public License v1.0 which accompanies this distribution,
 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">
+<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>
     <groupId>org.opendaylight.mdsal</groupId>
     <artifactId>binding-parent</artifactId>
@@ -14,10 +18,11 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
     <relativePath/>
   </parent>
 
-  <modelVersion>4.0.0</modelVersion>
   <groupId>org.opendaylight.alto.basic</groupId>
   <artifactId>alto-simple-ird-api</artifactId>
   <version>0.4.0-SNAPSHOT</version>
+  <!-- <name> formatting is used by autorelease to parse and notify projects on
+       build failure. Please do not modify this unless you have a good reason. -->
   <name>ODL :: alto :: ${project.artifactId}</name>
   <packaging>bundle</packaging>
 
@@ -48,5 +53,17 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <groupId>org.opendaylight.mdsal.model</groupId>
       <artifactId>ietf-yang-types-20130715</artifactId>
     </dependency>
+    <!-- Testing Dependencies -->
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-core</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 </project>
index bceb9cb7b98f9ce35c0c1ceeddb51129947da0a7..d5856b71cea0202b7a9fd20ca1e981583cb4834c 100644 (file)
@@ -1,23 +1,28 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-Copyright © 2015 Yale University and others. All rights reserved.
+Copyright © 2017 SNLab and others. All rights reserved.
 
 This program and the accompanying materials are made available under the
 terms of the Eclipse Public License v1.0 which accompanies this distribution,
 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">
+
+  <modelVersion>4.0.0</modelVersion>
 
-<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.alto</groupId>
-    <artifactId>alto-parent</artifactId>
-    <version>0.4.0-SNAPSHOT</version>
-    <relativePath>../../../</relativePath>
+    <groupId>org.opendaylight.odlparent</groupId>
+    <artifactId>odlparent-lite</artifactId>
+    <version>1.8.0-SNAPSHOT</version>
+    <relativePath/>
   </parent>
 
-  <modelVersion>4.0.0</modelVersion>
   <groupId>org.opendaylight.alto.basic</groupId>
   <artifactId>alto-simple-ird-artifacts</artifactId>
+  <version>0.4.0-SNAPSHOT</version>
+  <!-- <name> formatting is used by autorelease to parse and notify projects on
+       build failure. Please do not modify this unless you have a good reason. -->
   <name>ODL :: alto :: ${project.artifactId}</name>
   <packaging>pom</packaging>
 
index 5fefe16b27ab553c51dff40de8705fb15764fa9f..3f572a181613eea350c3d4db1806c3023d455fc2 100644 (file)
@@ -1,26 +1,30 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-Copyright © 2015 Yale University and others. All rights reserved.
+Copyright © 2017 SNLab and others. All rights reserved.
 
 This program and the accompanying materials are made available under the
 terms of the Eclipse Public License v1.0 which accompanies this distribution,
 and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
 -->
-<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>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>features-parent</artifactId>
     <version>1.8.0-SNAPSHOT</version>
     <relativePath/>
   </parent>
+
   <groupId>org.opendaylight.alto.basic</groupId>
   <artifactId>alto-simple-ird-features</artifactId>
   <version>0.4.0-SNAPSHOT</version>
+  <!-- <name> formatting is used by autorelease to parse and notify projects on
+       build failure. Please do not modify this unless you have a good reason. -->
   <name>ODL :: alto :: ${project.artifactId}</name>
-  <modelVersion>4.0.0</modelVersion>
-  <prerequisites>
-    <maven>3.1.1</maven>
-  </prerequisites>
+
   <properties>
     <mdsal.model.version>0.10.0-SNAPSHOT</mdsal.model.version>
     <mdsal.version>1.5.0-SNAPSHOT</mdsal.version>
@@ -29,6 +33,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
     <dluxapps.version>0.5.0-SNAPSHOT</dluxapps.version>
     <configfile.directory>etc/opendaylight/karaf</configfile.directory>
   </properties>
+
   <dependencyManagement>
     <dependencies>
       <!-- project specific dependencies -->
@@ -46,14 +51,21 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
         <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>
     </dependencies>
   </dependencyManagement>
+
   <dependencies>
     <dependency>
       <groupId>org.opendaylight.yangtools</groupId>
       <artifactId>features-yangtools</artifactId>
       <classifier>features</classifier>
-      <version>${yangtools.version}</version>
       <type>xml</type>
       <scope>runtime</scope>
     </dependency>
@@ -69,7 +81,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
       <groupId>org.opendaylight.controller</groupId>
       <artifactId>features-mdsal</artifactId>
       <classifier>features</classifier>
-      <version>${mdsal.version}</version>
       <type>xml</type>
       <scope>runtime</scope>
     </dependency>
@@ -77,7 +88,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
       <groupId>org.opendaylight.netconf</groupId>
       <artifactId>features-restconf</artifactId>
       <classifier>features</classifier>
-      <version>${restconf.version}</version>
       <type>xml</type>
       <scope>runtime</scope>
     </dependency>
@@ -89,68 +99,11 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
       <type>xml</type>
       <scope>runtime</scope>
     </dependency>
-    <dependency>
-      <groupId>org.opendaylight.alto.core</groupId>
-      <artifactId>alto-northbound-features</artifactId>
-      <version>${project.version}</version>
-      <classifier>features</classifier>
-      <type>xml</type>
-      <scope>runtime</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.opendaylight.alto.core</groupId>
-      <artifactId>alto-resourcepool-features</artifactId>
-      <classifier>features</classifier>
-      <version>${project.version}</version>
-      <type>xml</type>
-      <scope>runtime</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.opendaylight.alto.core</groupId>
-      <artifactId>alto-service-model-networkmap-features</artifactId>
-      <classifier>features</classifier>
-      <version>${project.version}</version>
-      <type>xml</type>
-      <scope>runtime</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.opendaylight.alto.core</groupId>
-      <artifactId>alto-service-model-costmap-features</artifactId>
-      <classifier>features</classifier>
-      <version>${project.version}</version>
-      <type>xml</type>
-      <scope>runtime</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.opendaylight.alto.core</groupId>
-      <artifactId>alto-service-model-endpointcost-features</artifactId>
-      <classifier>features</classifier>
-      <version>${project.version}</version>
-      <type>xml</type>
-      <scope>runtime</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.opendaylight.alto.core</groupId>
-      <artifactId>alto-service-model-base-api</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.opendaylight.alto.core</groupId>
-      <artifactId>alto-service-model-ird-api</artifactId>
-      <version>${project.version}</version>
-    </dependency>
     <dependency>
       <groupId>${project.groupId}</groupId>
       <artifactId>alto-simple-ird-impl</artifactId>
       <version>${project.version}</version>
     </dependency>
-    <dependency>
-      <groupId>${project.groupId}</groupId>
-      <artifactId>alto-simple-ird-impl</artifactId>
-      <version>${project.version}</version>
-      <type>xml</type>
-      <classifier>config</classifier>
-    </dependency>
     <dependency>
       <groupId>${project.groupId}</groupId>
       <artifactId>alto-simple-ird-api</artifactId>
index 4cea52eae0332d9e7b7a05e28f0add956146dce9..03acbba0e3ab05571c7e5feccf50d055c649abe1 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- vi: set et smarttab sw=4 tabstop=4: -->
 <!--
-Copyright © 2015 Yale University and others. All rights reserved.
+Copyright © 2017 SNLab and others. All rights reserved.
 
 This program and the accompanying materials are made available under the
 terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -10,34 +10,19 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
 <features name="odl-alto-simple-ird-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0 http://karaf.apache.org/xmlns/features/v1.2.0">
-  <repository>mvn:org.opendaylight.yangtools/features-yangtools/${yangtools.version}/xml/features</repository>
-  <repository>mvn:org.opendaylight.controller/features-mdsal/${mdsal.version}/xml/features</repository>
-  <repository>mvn:org.opendaylight.mdsal.model/features-mdsal-model/${mdsal.model.version}/xml/features</repository>
-  <repository>mvn:org.opendaylight.netconf/features-restconf/${restconf.version}/xml/features</repository>
-  <repository>mvn:org.opendaylight.dluxapps/features-dluxapps/${dluxapps.version}/xml/features</repository>
-  <repository>mvn:org.opendaylight.alto.core/alto-resourcepool-features/${project.version}/xml/features</repository>
-  <repository>mvn:org.opendaylight.alto.core/alto-northbound-features/${project.version}/xml/features</repository>
-  <repository>mvn:org.opendaylight.alto.core/alto-service-model-networkmap-features/${project.version}/xml/features</repository>
-  <repository>mvn:org.opendaylight.alto.core/alto-service-model-endpointcost-features/${project.version}/xml/features</repository>
-  <repository>mvn:org.opendaylight.alto.core/alto-service-model-costmap-features/${project.version}/xml/features</repository>
-
+  <repository>mvn:org.opendaylight.yangtools/features-yangtools/{{VERSION}}/xml/features</repository>
+  <repository>mvn:org.opendaylight.controller/features-mdsal/{{VERSION}}/xml/features</repository>
+  <repository>mvn:org.opendaylight.mdsal.model/features-mdsal-model/{{VERSION}}/xml/features</repository>
+  <repository>mvn:org.opendaylight.netconf/features-restconf/{{VERSION}}/xml/features</repository>
+  <repository>mvn:org.opendaylight.dluxapps/features-dluxapps/{{VERSION}}/xml/features</repository>
   <feature name='odl-alto-simple-ird-api' version='${project.version}' description='OpenDaylight :: alto-simple-ird :: api'>
     <feature version='${mdsal.model.version}'>odl-mdsal-models</feature>
-    <feature version='${project.version}'>odl-alto-resourcepool-api</feature>
-    <bundle>mvn:org.opendaylight.alto.core/alto-service-model-base-api/${project.version}</bundle>
-    <bundle>mvn:org.opendaylight.alto.core/alto-service-model-ird-api/${project.version}</bundle>
-    <bundle>mvn:org.opendaylight.alto.basic/alto-simple-ird-api/${project.version}</bundle>
+    <bundle>mvn:org.opendaylight.alto.basic/alto-simple-ird-api/{{VERSION}}</bundle>
   </feature>
   <feature name='odl-alto-simple-ird' version='${project.version}' description='OpenDaylight :: alto-simple-ird'>
     <feature version='${mdsal.version}'>odl-mdsal-broker</feature>
     <feature version='${project.version}'>odl-alto-simple-ird-api</feature>
-    <feature version='${project.version}'>odl-alto-northbound</feature>
-    <feature version='${project.version}'>odl-alto-resourcepool</feature>
-    <feature version='${project.version}'>odl-alto-service-model-networkmap</feature>
-    <feature version='${project.version}'>odl-alto-service-model-endpointcost</feature>
-    <feature version='${project.version}'>odl-alto-service-model-costmap</feature>
-    <bundle>mvn:org.opendaylight.alto.basic/alto-simple-ird-impl/${project.version}</bundle>
-    <configfile finalname="${configfile.directory}/alto-simple-ird.xml">mvn:org.opendaylight.alto.basic/alto-simple-ird-impl/${project.version}/xml/config</configfile>
+    <bundle>mvn:org.opendaylight.alto.basic/alto-simple-ird-impl/{{VERSION}}</bundle>
   </feature>
   <feature name='odl-alto-simple-ird-rest' version='${project.version}' description='OpenDaylight :: alto-simple-ird :: REST'>
     <feature version="${project.version}">odl-alto-simple-ird</feature>
@@ -46,7 +31,12 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <feature name='odl-alto-simple-ird-ui' version='${project.version}' description='OpenDaylight :: alto-simple-ird :: UI'>
     <feature version="${project.version}">odl-alto-simple-ird-rest</feature>
     <feature version="${restconf.version}">odl-mdsal-apidocs</feature>
+    <feature version="${mdsal.version}">odl-mdsal-xsql</feature>
     <feature version="${dluxapps.version}">odl-dluxapps-yangman</feature>
   </feature>
+<!--  <feature name='odl-alto-simple-ird-cli' version='${project.version}' description='OpenDaylight :: alto-simple-ird :: CLI'>
+    <feature version="${project.version}">odl-alto-simple-ird</feature>
+    <bundle>mvn:org.opendaylight.alto.basic/alto-simple-ird-cli/{{VERSION}}</bundle>
+  </feature>-->
 
 </features>
index dbee13ba2047dcf2440e740b3c19b4dd8884db0c..5fc72681ce97bead9b06fa8ad6a6697f945a0585 100644 (file)
@@ -1,13 +1,16 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- vi: set et smarttab sw=4 tabstop=4: -->
 <!--
-Copyright © 2015 Yale University and others. All rights reserved.
+Copyright © 2017 SNLab and others. All rights reserved.
 
 This program and the accompanying materials are made available under the
 terms of the Eclipse Public License v1.0 which accompanies this distribution,
 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">
+<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>
     <groupId>org.opendaylight.controller</groupId>
@@ -16,12 +19,14 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
     <relativePath/>
   </parent>
 
-  <modelVersion>4.0.0</modelVersion>
   <groupId>org.opendaylight.alto.basic</groupId>
   <artifactId>alto-simple-ird-impl</artifactId>
   <version>0.4.0-SNAPSHOT</version>
+  <!-- <name> formatting is used by autorelease to parse and notify projects on
+       build failure. Please do not modify this unless you have a good reason. -->
   <name>ODL :: alto :: ${project.artifactId}</name>
   <packaging>bundle</packaging>
+
   <dependencies>
     <dependency>
       <groupId>${project.groupId}</groupId>
@@ -77,5 +82,4 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <scope>test</scope>
     </dependency>
   </dependencies>
-
 </project>
diff --git a/alto-basic/simple-ird/impl/src/main/config/default-config.xml b/alto-basic/simple-ird/impl/src/main/config/default-config.xml
deleted file mode 100644 (file)
index 38bda23..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
-Copyright © 2015 Yale University and others. All rights reserved.
-
-This program and the accompanying materials are made available under the
-terms of the Eclipse Public License v1.0 which accompanies this distribution,
-and is available at http://www.eclipse.org/legal/epl-v10.html
--->
-<snapshot>
-  <required-capabilities>
-      <capability>urn:alto:simple:ird:impl?module=alto-simple-ird-impl&amp;revision=2015-10-21</capability>
-      <capability>urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding?module=opendaylight-md-sal-binding&amp;revision=2013-10-28</capability>
-      <capability>urn:alto:northbound?module=alto-northbound&amp;revision=2015-10-21</capability>
-  </required-capabilities>
-  <configuration>
-
-    <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
-      <modules xmlns="urn:opendaylight:params:xml:ns:yang:controller:config">
-        <module>
-          <type xmlns:prefix="urn:alto:simple:ird:impl">prefix:alto-simple-ird</type>
-          <name>alto-simple-ird-default</name>
-          <broker>
-            <type xmlns:binding="urn:opendaylight:params:xml:ns:yang:controller:md:sal:binding">binding:binding-broker-osgi-registry</type>
-            <name>binding-osgi-broker</name>
-          </broker>
-          <alto-northbound-router>
-            <type xmlns:alto-northbound-router="urn:alto:northbound">alto-northbound-router:alto-northbound-router</type>
-            <name>alto-northbound-router</name>
-          </alto-northbound-router>
-        </module>
-      </modules>
-    </data>
-  </configuration>
-</snapshot>
diff --git a/alto-basic/simple-ird/impl/src/main/config/maven-metadata-local.xml b/alto-basic/simple-ird/impl/src/main/config/maven-metadata-local.xml
deleted file mode 100644 (file)
index eb59a69..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<metadata modelVersion="1.1.0">
-  <groupId>org.opendaylight.alto.basic</groupId>
-  <artifactId>alto-simple-ird-impl</artifactId>
-  <version>0.2.1-SNAPSHOT</version>
-  <versioning>
-    <snapshot>
-      <localCopy>true</localCopy>
-    </snapshot>
-    <lastUpdated>20151112013601</lastUpdated>
-    <snapshotVersions>
-      <snapshotVersion>
-        <classifier>config</classifier>
-        <extension>xml</extension>
-        <value>0.2.1-SNAPSHOT</value>
-        <updated>20151112013601</updated>
-      </snapshotVersion>
-    </snapshotVersions>
-  </versioning>
-</metadata>
index 84d80a33ec2a06fb4d19bb331aed002dea0d13b7..4e5dcc1eaeedf3907655d1f5596ebf3f1f82e770 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2015 Yale University and others.  All rights reserved.
+ * Copyright © 2017 SNLab and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -15,29 +15,27 @@ import org.opendaylight.controller.md.sal.binding.api.DataBroker;
 import org.opendaylight.controller.md.sal.binding.api.ReadTransaction;
 import org.opendaylight.controller.md.sal.binding.api.WriteTransaction;
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.ProviderContext;
-import org.opendaylight.controller.sal.binding.api.BindingAwareProvider;
-import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid;
 import org.opendaylight.yang.gen.v1.urn.alto.simple.ird.rev151021.Information;
 import org.opendaylight.yang.gen.v1.urn.alto.simple.ird.rev151021.InformationBuilder;
 import org.opendaylight.yang.gen.v1.urn.alto.simple.ird.rev151021.IrdInstance;
 import org.opendaylight.yang.gen.v1.urn.alto.simple.ird.rev151021.IrdInstanceConfiguration;
 import org.opendaylight.yang.gen.v1.urn.alto.simple.ird.rev151021.IrdInstanceConfigurationBuilder;
 import org.opendaylight.yang.gen.v1.urn.alto.types.rev150921.ResourceId;
+import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid;
 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import java.util.concurrent.ExecutionException;
 
-public class AltoSimpleIrdProvider implements BindingAwareProvider, AutoCloseable {
+public class AltoSimpleIrdProvider {
 
     public static final String ROOT_INSTANCE = "root";
     public static final String SIMPLE_IRD_ROUTE_NAME = "simpleird";
 
     private static final Logger LOG = LoggerFactory.getLogger(AltoSimpleIrdProvider.class);
 
-    private DataBroker m_dataBroker = null;
+    private final DataBroker m_dataBroker;
 
     InstanceIdentifier<IrdInstanceConfiguration> m_iid = null;
     InstanceIdentifier<IrdInstance> m_rootIID = null;
@@ -78,7 +76,7 @@ public class AltoSimpleIrdProvider implements BindingAwareProvider, AutoCloseabl
                 .setInstanceId(new ResourceId(SimpleIrdUtils.DEFAULT_IRD_RESOURCE));
 
         InstanceIdentifier<IrdInstanceConfiguration> iicIID =
-        SimpleIrdUtils.getInstanceConfigurationIID(new ResourceId(SimpleIrdUtils.DEFAULT_IRD_RESOURCE));
+                SimpleIrdUtils.getInstanceConfigurationIID(new ResourceId(SimpleIrdUtils.DEFAULT_IRD_RESOURCE));
 
         wx.put(LogicalDatastoreType.CONFIGURATION, iicIID, builder.build());
         wx.submit().get();
@@ -99,11 +97,14 @@ public class AltoSimpleIrdProvider implements BindingAwareProvider, AutoCloseabl
         }
     }
 
-    @Override
-    public void onSessionInitiated(ProviderContext session) {
-        LOG.info("AltoSimpleIrdProvider Session Initiated");
+    public AltoSimpleIrdProvider(final DataBroker dataBroker) {
+        this.m_dataBroker = dataBroker;
+    }
 
-        m_dataBroker = session.getSALService(DataBroker.class);
+    /**
+     * Method called when the blueprint container is created.
+     */
+    public void init() {
         m_iid = SimpleIrdUtils.getInstanceConfigurationListIID();
         m_rootIID = SimpleIrdUtils.getInstanceIID(ROOT_INSTANCE);
 
@@ -115,10 +116,13 @@ public class AltoSimpleIrdProvider implements BindingAwareProvider, AutoCloseabl
             LOG.error("Failed to create top-level containers");
             e.printStackTrace();
         }
+        LOG.info("AltoSimpleIrdProvider Session Initiated");
     }
 
-    @Override
-    public void close() throws Exception {
+    /**
+     * Method called when the blueprint container is destroyed.
+     */
+    public void close() {
         try {
             if (m_router != null) {
                 m_router.removeRoute(SIMPLE_IRD_ROUTE_NAME);
@@ -167,4 +171,4 @@ public class AltoSimpleIrdProvider implements BindingAwareProvider, AutoCloseabl
             LOG.error("Failed to reigster route");
         }
     }
-}
+}
\ No newline at end of file
diff --git a/alto-basic/simple-ird/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/alto/simple/ird/impl/rev151021/AltoSimpleIrdModule.java b/alto-basic/simple-ird/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/alto/simple/ird/impl/rev151021/AltoSimpleIrdModule.java
deleted file mode 100644 (file)
index 2269461..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-package org.opendaylight.yang.gen.v1.urn.alto.simple.ird.impl.rev151021;
-
-import org.opendaylight.alto.basic.impl.AltoSimpleIrdProvider;
-
-public class AltoSimpleIrdModule extends org.opendaylight.yang.gen.v1.urn.alto.simple.ird.impl.rev151021.AbstractAltoSimpleIrdModule {
-    public AltoSimpleIrdModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
-        super(identifier, dependencyResolver);
-    }
-
-    public AltoSimpleIrdModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, org.opendaylight.yang.gen.v1.urn.alto.simple.ird.impl.rev151021.AltoSimpleIrdModule oldModule, java.lang.AutoCloseable oldInstance) {
-        super(identifier, dependencyResolver, oldModule, oldInstance);
-    }
-
-    @Override
-    public void customValidation() {
-        // add custom validation form module attributes here.
-    }
-
-    @Override
-    public java.lang.AutoCloseable createInstance() {
-        final AltoSimpleIrdProvider provider = new AltoSimpleIrdProvider();
-
-        try {
-            getBrokerDependency().registerProvider(provider);
-            provider.setupRoute(getAltoNorthboundRouterDependency());
-        } catch (Exception e) {
-            e.printStackTrace();
-            return null;
-        }
-        return provider;
-    }
-
-}
diff --git a/alto-basic/simple-ird/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/alto/simple/ird/impl/rev151021/AltoSimpleIrdModuleFactory.java b/alto-basic/simple-ird/impl/src/main/java/org/opendaylight/yang/gen/v1/urn/alto/simple/ird/impl/rev151021/AltoSimpleIrdModuleFactory.java
deleted file mode 100644 (file)
index 52b3b7f..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
-* Generated file
-*
-* Generated from: yang module name: alto-simple-ird-impl yang module local name: alto-simple-ird
-* Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
-* Generated at: Wed Nov 11 21:58:28 CST 2015
-*
-* Do not modify this file unless it is present under src/main directory
-*/
-package org.opendaylight.yang.gen.v1.urn.alto.simple.ird.impl.rev151021;
-public class AltoSimpleIrdModuleFactory extends org.opendaylight.yang.gen.v1.urn.alto.simple.ird.impl.rev151021.AbstractAltoSimpleIrdModuleFactory {
-
-}
diff --git a/alto-basic/simple-ird/impl/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml b/alto-basic/simple-ird/impl/src/main/resources/org/opendaylight/blueprint/impl-blueprint.xml
new file mode 100644 (file)
index 0000000..5f001c8
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+Copyright © 2017 SNLab and others. All rights reserved.
+
+This program and the accompanying materials are made available under the
+terms of the Eclipse Public License v1.0 which accompanies this distribution,
+and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+  xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
+  odl:use-default-for-reference-types="true">
+
+  <reference id="dataBroker"
+    interface="org.opendaylight.controller.md.sal.binding.api.DataBroker"
+    odl:type="default" />
+
+  <bean id="altoSimpleIrdProvider"
+    class="org.opendaylight.alto.basic.impl.AltoSimpleIrdProvider"
+    init-method="init" destroy-method="close">
+    <argument ref="dataBroker" />
+  </bean>
+
+</blueprint>
diff --git a/alto-basic/simple-ird/impl/src/main/yang/alto-simple-ird-impl.yang b/alto-basic/simple-ird/impl/src/main/yang/alto-simple-ird-impl.yang
deleted file mode 100644 (file)
index c1a2d81..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-module alto-simple-ird-impl {
-    yang-version 1;
-    namespace "urn:alto:simple:ird:impl";
-    prefix "alto-simple-ird-impl";
-
-    import alto-northbound { prefix alto-northbound; revision-date 2015-10-21; }
-    import config { prefix config; revision-date 2013-04-05; }
-    import opendaylight-md-sal-binding { prefix md-sal-binding; revision-date 2013-10-28;}
-
-    description
-        "Service definition for alto-simple-ird project";
-
-    revision "2015-10-21" {
-        description
-            "Initial revision";
-    }
-
-    identity alto-simple-ird {
-        base config:module-type;
-        config:java-name-prefix AltoSimpleIrd;
-    }
-
-    augment "/config:modules/config:module/config:configuration" {
-        case alto-simple-ird {
-            when "/config:modules/config:module/config:type = 'alto-simple-ird'";
-            container broker {
-                uses config:service-ref {
-                    refine type {
-                        mandatory true;
-                        config:required-identity md-sal-binding:binding-broker-osgi-registry;
-                    }
-                }
-            }
-
-            container alto-northbound-router {
-                uses config:service-ref {
-                    refine type {
-                        mandatory true;
-                        config:required-identity alto-northbound:alto-northbound-router;
-                    }
-                }
-            }
-        }
-    }
-}
index e5e3bc307c4cbcd913a69c5c3dc4998b9d468b1f..20938a82c187ae007822093355225b2eb7813c6b 100644 (file)
@@ -153,7 +153,7 @@ public class SimpleIrdEntryListenerTest {
     public void isValidResource() throws Exception {
         ResourceBuilder rb = new ResourceBuilder()
                 .setKey(new ResourceKey(new ResourceId("test")))
-                 .setType(null);
+                .setType(null);
         assertEquals(simpleIrdEntryListener.isValidResource(rb.build()), false);
     }
 
@@ -173,8 +173,7 @@ public class SimpleIrdEntryListenerTest {
                 .setEntryId(new ResourceId("THE_FIRST_ENTRY_ID"))
                 .setInstance(instanceIID)
                 .setLocation(new FixedUrlBuilder()
-                .setUri(new Uri("http://alto.example.com/first_instance"))
-                .build());
+                    .setUri(new Uri("http://alto.example.com/first_instance")).build());
         configs.add(configBuilder.build());
         Map<IrdConfigurationEntry, Resource> result = simpleIrdEntryListener.readEntries(configs, rwx);
         assertEquals(result, null);
@@ -210,8 +209,7 @@ public class SimpleIrdEntryListenerTest {
                 .setEntryId(new ResourceId("THE_FIRST_ENTRY_ID"))
                 .setInstance(instanceIID)
                 .setLocation(new FixedUrlBuilder()
-                        .setUri(new Uri("http://alto.example.com/first_instance"))
-                        .build());
+                    .setUri(new Uri("http://alto.example.com/first_instance")).build());
         configs.add(configBuilder.build());
         IrdInstanceConfigurationBuilder iicb = new IrdInstanceConfigurationBuilder()
                 .setIrdConfigurationEntry(configs);
diff --git a/alto-basic/simple-ird/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/alto/simple/ird/impl/rev151021/AltoSimpleIrdModuleFactoryTest.java b/alto-basic/simple-ird/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/alto/simple/ird/impl/rev151021/AltoSimpleIrdModuleFactoryTest.java
deleted file mode 100644 (file)
index 4cf9de4..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Copyright © 2015 Yale University and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.yang.gen.v1.urn.alto.simple.ird.impl.rev151021;
-
-import org.junit.Test;
-
-public class AltoSimpleIrdModuleFactoryTest {
-    @Test
-    public void testFactoryConstructor() {
-        // ensure no exceptions on construction
-        new AltoSimpleIrdModuleFactory();
-    }
-}
diff --git a/alto-basic/simple-ird/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/alto/simple/ird/impl/rev151021/AltoSimpleIrdModuleTest.java b/alto-basic/simple-ird/impl/src/test/java/org/opendaylight/yang/gen/v1/urn/alto/simple/ird/impl/rev151021/AltoSimpleIrdModuleTest.java
deleted file mode 100644 (file)
index f103fd7..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright © 2015 Yale University and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.yang.gen.v1.urn.alto.simple.ird.impl.rev151021;
-
-import org.junit.Test;
-import org.opendaylight.alto.basic.impl.AltoSimpleIrdProvider;
-import org.opendaylight.alto.core.northbound.api.AltoNorthboundRouter;
-import org.opendaylight.controller.config.api.DependencyResolver;
-import org.opendaylight.controller.config.api.JmxAttribute;
-import org.opendaylight.controller.config.api.ModuleIdentifier;
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
-
-import javax.management.ObjectName;
-
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-public class AltoSimpleIrdModuleTest {
-    @Test
-    public void testCustomValidation() {
-        AltoSimpleIrdModule module = new AltoSimpleIrdModule(mock(ModuleIdentifier.class), mock(DependencyResolver.class));
-
-        // ensure no exceptions on validation
-        // currently this method is empty
-        module.customValidation();
-    }
-
-    @Test
-    public void testCreateInstance() throws Exception {
-        // configure mocks
-        DependencyResolver dependencyResolver = mock(DependencyResolver.class);
-        BindingAwareBroker broker = mock(BindingAwareBroker.class);
-        AltoNorthboundRouter router = mock(AltoNorthboundRouter.class);
-
-        when(dependencyResolver.resolveInstance(eq(BindingAwareBroker.class), any(ObjectName.class), any(JmxAttribute.class))).thenReturn(broker);
-        when(dependencyResolver.resolveInstance(eq(AltoNorthboundRouter.class), any(ObjectName.class), any(JmxAttribute.class))).thenReturn(router);
-
-        // create instance of module with injected mocks
-        AltoSimpleIrdModule module = new AltoSimpleIrdModule(mock(ModuleIdentifier.class), dependencyResolver);
-
-        // getInstance calls resolveInstance to get the broker dependency and then calls createInstance
-        AutoCloseable closeable = module.getInstance();
-
-        // verify that the module registered the returned provider with the broker
-        verify(broker).registerProvider((AltoSimpleIrdProvider)closeable);
-
-        // ensure no exceptions on close
-        closeable.close();
-    }
-}
index 1ccd13f5b3624b0b5f69195540644ad5dcd4c8e7..aeb89ed730674d9813aa5dd2def29613e7c3a089 100644 (file)
@@ -1,13 +1,15 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-Copyright © 2015 Yale University and others. All rights reserved.
+Copyright © 2017 SNLab and others. All rights reserved.
 
 This program and the accompanying materials are made available under the
 terms of the Eclipse Public License v1.0 which accompanies this distribution,
 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">
 
-<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>
     <groupId>org.opendaylight.controller</groupId>
@@ -16,10 +18,11 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
     <relativePath/>
   </parent>
 
-  <modelVersion>4.0.0</modelVersion>
   <groupId>org.opendaylight.alto.basic</groupId>
   <artifactId>alto-simple-ird-it</artifactId>
   <version>0.4.0-SNAPSHOT</version>
+  <!-- <name> formatting is used by autorelease to parse and notify projects on
+       build failure. Please do not modify this unless you have a good reason. -->
   <name>ODL :: alto :: ${project.artifactId}</name>
   <packaging>bundle</packaging>
 
@@ -27,7 +30,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
     <skipITs>false</skipITs>
     <karaf.distro.groupId>org.opendaylight.alto.basic</karaf.distro.groupId>
     <karaf.distro.artifactId>alto-simple-ird-karaf</karaf.distro.artifactId>
-    <karaf.distro.version>0.4.0-SNAPSHOT</karaf.distro.version>
+    <karaf.distro.version>0.1.0-SNAPSHOT</karaf.distro.version>
     <karaf.distro.type>zip</karaf.distro.type>
   </properties>
 
@@ -38,5 +41,4 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <version>${project.version}</version>
     </dependency>
   </dependencies>
-
 </project>
similarity index 82%
rename from alto-basic/simple-ird/it/src/test/java/org/opendaylight/alto/basic/it/AltoSimpleIRDIT.java
rename to alto-basic/simple-ird/it/src/test/java/org/opendaylight/alto/basic/it/AltoSimpleIrdIT.java
index 86d011888a7081621ff9d4d64a8de1584d01b893..6879f68b7a183e339c9bcf414db04919b68afdc1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2015 Yale University and others.  All rights reserved.
+ * Copyright © 2017 SNLab and others.  All rights reserved.
  *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -26,18 +26,8 @@ import org.slf4j.LoggerFactory;
 
 @RunWith(PaxExam.class)
 @ExamReactorStrategy(PerClass.class)
-public class AltoSimpleIRDIT extends AbstractMdsalTestBase {
-    private static final Logger LOG = LoggerFactory.getLogger(AltoSimpleIRDIT.class);
-
-    @Override
-    public String getModuleName() {
-        return "alto-simple-ird";
-    }
-
-    @Override
-    public String getInstanceName() {
-        return "alto-simple-ird-default";
-    }
+public class AltoSimpleIrdIT extends AbstractMdsalTestBase {
+    private static final Logger LOG = LoggerFactory.getLogger(AltoSimpleIrdIT.class);
 
     @Override
     public MavenUrlReference getFeatureRepo() {
@@ -57,7 +47,7 @@ public class AltoSimpleIRDIT extends AbstractMdsalTestBase {
     @Override
     public Option getLoggingOption() {
         Option option = editConfigurationFilePut(ORG_OPS4J_PAX_LOGGING_CFG,
-                logConfiguration(AltoSimpleIRDIT.class),
+                logConfiguration(AltoSimpleIrdIT.class),
                 LogLevel.INFO.name());
         option = composite(option, super.getLoggingOption());
         return option;
index f5899ee2b5c4a3cd7ae5b97c0d6270a1fba67f3f..bc8881d107655e0a49e4ba94546d2a4b85825396 100644 (file)
@@ -1,28 +1,32 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-Copyright © 2015 Yale University and others. All rights reserved.
+Copyright © 2017 SNLab and others. All rights reserved.
 This program and the accompanying materials are made available under the
 terms of the Eclipse Public License v1.0 which accompanies this distribution,
 and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
 -->
-<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>
     <groupId>org.opendaylight.odlparent</groupId>
     <artifactId>karaf-parent</artifactId>
     <version>1.8.0-SNAPSHOT</version>
-    <relativePath/>
   </parent>
-  <modelVersion>4.0.0</modelVersion>
+
   <groupId>org.opendaylight.alto.basic</groupId>
   <artifactId>alto-simple-ird-karaf</artifactId>
   <version>0.4.0-SNAPSHOT</version>
+  <!-- <name> formatting is used by autorelease to parse and notify projects on
+       build failure. Please do not modify this unless you have a good reason. -->
   <name>ODL :: alto :: ${project.artifactId}</name>
-  <prerequisites>
-    <maven>3.1.1</maven>
-  </prerequisites>
+
   <properties>
     <karaf.localFeature>odl-alto-simple-ird-ui</karaf.localFeature>
   </properties>
+
   <dependencyManagement>
     <dependencies>
       <dependency>
@@ -34,6 +38,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
       </dependency>
     </dependencies>
   </dependencyManagement>
+
   <dependencies>
     <dependency>
       <!-- scope is compile so all features (there is only one) are installed
@@ -51,9 +56,10 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
       <scope>runtime</scope>
     </dependency>
   </dependencies>
-  <!-- DO NOT install or deploy the karaf artifact -->
+
   <build>
     <plugins>
+      <!-- DO NOT deploy the karaf artifact -->
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-deploy-plugin</artifactId>
index e0cba427ce33ed81372fdf3cf6a628aea48aafe9..23fa39c47de2ef0e1e197d2ce7b5457744cd1230 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
-Copyright © 2015 Yale University and others. All rights reserved.
+Copyright © 2017 SNLab and others. All rights reserved.
 This program and the accompanying materials are made available under the
 terms of the Eclipse Public License v1.0 which accompanies this distribution,
 and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
@@ -17,12 +17,29 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
   <groupId>org.opendaylight.alto.basic</groupId>
   <artifactId>alto-simple-ird-aggregator</artifactId>
   <version>0.4.0-SNAPSHOT</version>
-  <name>ODL :: alto :: ${project.artifactId}</name>
+  <name>ODL :: alto :: ${project.artifactId}</name> <!-- DO NOT CHANGE - Used by Sonar to set project name -->
   <packaging>pom</packaging>
   <modelVersion>4.0.0</modelVersion>
-  <prerequisites>
-    <maven>3.1.1</maven>
-  </prerequisites>
+  <!-- DO NOT install or deploy the repo root pom as it's only needed to initiate a build -->
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-deploy-plugin</artifactId>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-install-plugin</artifactId>
+        <configuration>
+          <skip>true</skip>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
   <profiles>
     <profile>
       <id>minimal</id>
@@ -56,25 +73,58 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
         <module>it</module>
       </modules>
     </profile>
+    <profile>
+      <!--
+          This profile is to ensure we only build javadocs reports
+          when we plan to deploy Maven site for our project.
+      -->
+      <id>maven-site</id>
+      <activation>
+        <file>
+          <exists>${user.dir}/deploy-site.xml</exists>
+        </file>
+      </activation>
+
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-javadoc-plugin</artifactId>
+            <inherited>false</inherited>
+            <executions>
+              <execution>
+                <id>aggregate</id>
+                <goals>
+                  <goal>aggregate</goal>
+                </goals>
+                <phase>package</phase>
+              </execution>
+            </executions>
+          </plugin>
+          <plugin>
+            <artifactId>maven-checkstyle-plugin</artifactId>
+            <configuration>
+              <failsOnError>true</failsOnError>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
   </profiles>
-  <!-- DO NOT install or deploy the repo root pom as it's only needed to initiate a build -->
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-deploy-plugin</artifactId>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-install-plugin</artifactId>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
 
+  <!--
+      Maven Site Configuration
+
+      The following configuration is necessary for maven-site-plugin to
+      correctly identify the correct deployment path for OpenDaylight Maven
+      sites.
+  -->
+  <url>${odl.site.url}/${project.groupId}/${stream}/</url>
+
+  <distributionManagement>
+    <site>
+      <id>opendaylight-site</id>
+      <url>${nexus.site.url}/</url>
+    </site>
+  </distributionManagement>
 </project>
index 6d2a107fb61df2356a3c76b3e38ac5f5dcfe311a..f0fe1fac54613975ac989f2b12b6db23765d323c 100644 (file)
@@ -225,14 +225,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
       <version>${project.version}</version>
     </dependency>
 
-    <dependency>
-      <groupId>org.opendaylight.alto.basic</groupId>
-      <artifactId>alto-simple-ird-impl</artifactId>
-      <version>${project.version}</version>
-      <type>xml</type>
-      <classifier>config</classifier>
-    </dependency>
-
     <dependency>
       <groupId>org.opendaylight.alto.basic</groupId>
       <artifactId>alto-simple-ird-api</artifactId>
index 8d05a79e9331590062acbe71897390a4b79125e0..a4838d59ea024e68a79b72903df4317a93e10afa 100644 (file)
@@ -149,9 +149,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
 
     <bundle>mvn:org.opendaylight.alto.basic/alto-simple-ird-api/${project.version}</bundle>
     <bundle>mvn:org.opendaylight.alto.basic/alto-simple-ird-impl/${project.version}</bundle>
-    <configfile finalname="${configfile.directory}/alto-simple-ird.xml">
-      mvn:org.opendaylight.alto.basic/alto-simple-ird-impl/${project.version}/xml/config
-    </configfile>
   </feature>
 
   <feature name='odl-alto-manual-maps' version='${project.version}'
diff --git a/alto-release-features/odl-alto-simpleird/src/main/feature/feature.xml b/alto-release-features/odl-alto-simpleird/src/main/feature/feature.xml
deleted file mode 100644 (file)
index 6ec2dae..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<features name="odl-alto-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0">
-  <feature name="odl-alto-simpleird" version="${project.version}">
-    <configfile finalname="${configfile.directory}/alto-simple-ird.xml"> mvn:org.opendaylight.alto.basic/alto-simple-ird-impl/${project.version}/xml/config </configfile>
-  </feature>
-</features>