Update features archetypes 14/31814/3
authorStephen Kitt <skitt@redhat.com>
Wed, 23 Dec 2015 11:01:00 +0000 (12:01 +0100)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 13 Jan 2016 15:40:09 +0000 (15:40 +0000)
* Use {{VERSION}} in the documentation comments.
* Use {{VERSION}} in the generated features.xml.
* Remove an invalid space in the schema locations.
* Hook up opendaylight-karaf-features to features-parent.
* Import yangtools-artifacts in the generated features pom.xml.
* Remove redundant versions in the generated features pom.xml.

Change-Id: I60e7d49d0d29a1d9040501e7a8fa0a61ef6fc1bc
Signed-off-by: Stephen Kitt <skitt@redhat.com>
opendaylight/archetypes/opendaylight-karaf-features/src/main/resources/archetype-resources/pom.xml
opendaylight/archetypes/opendaylight-karaf-features/src/main/resources/archetype-resources/src/main/resources/features.xml
opendaylight/archetypes/opendaylight-startup/pom.xml
opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/features/pom.xml
opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/features/src/main/features/features.xml
opendaylight/archetypes/pom.xml

index 8b8bc2584958841661984d8d303f29aca690f6b0..641b6988cd49e9a86d6b798677d1cfaaa8106ea1 100644 (file)
@@ -8,28 +8,21 @@
 -->
 <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">
    <modelVersion>4.0.0</modelVersion>
-   <!--
-    Necessary TODO: Hookup your parent pom here, else you will not get necessary versions,
-    maven repos etc.  If you run this archetype in a subdirectory of your project, it
-    will pick the pom.xml from the parent directory as the parent pom, which may or may
-    not be correct.
-  -->
+   <parent>
+      <groupId>org.opendaylight.odlparent</groupId>
+      <artifactId>features-parent</artifactId>
+      <version>1.6.0-SNAPSHOT</version>
+   </parent>
    <artifactId>features-${repoName}</artifactId>
    <groupId>${groupId}</groupId>
    <artifactId>features-${repoName}</artifactId>
    <groupId>${groupId}</groupId>
-   <!-- Optional TODO: Uncomment version if you are not using a parent pom.xml
    <version>${version}</version>
    <version>${version}</version>
-   -->
    <packaging>jar</packaging>
    <properties>
       <features.file>features.xml</features.file>
    <packaging>jar</packaging>
    <properties>
       <features.file>features.xml</features.file>
-      <!-- Optional TODO: Move these properties to your parent pom and possibly
-            DependencyManagement section of your parent pom -->
       <branding.version>1.2.0-SNAPSHOT</branding.version>
       <karaf.resources.version>1.6.0-SNAPSHOT</karaf.resources.version>
       <branding.version>1.2.0-SNAPSHOT</branding.version>
       <karaf.resources.version>1.6.0-SNAPSHOT</karaf.resources.version>
-      <karaf.version>3.0.3</karaf.version>
       <feature.test.version>1.6.0-SNAPSHOT</feature.test.version>
       <karaf.empty.version>1.6.0-SNAPSHOT</karaf.empty.version>
       <feature.test.version>1.6.0-SNAPSHOT</feature.test.version>
       <karaf.empty.version>1.6.0-SNAPSHOT</karaf.empty.version>
-      <surefire.version>2.16</surefire.version>
    </properties>
    <dependencies>
     <!--
    </properties>
    <dependencies>
     <!--
     -->
 
    </dependencies>
     -->
 
    </dependencies>
-   <build>
-      <resources>
-         <resource>
-            <directory>src/main/resources</directory>
-            <filtering>true</filtering>
-         </resource>
-      </resources>
-      <plugins>
-         <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-resources-plugin</artifactId>
-            <executions>
-               <execution>
-                  <id>filter</id>
-                  <phase>generate-resources</phase>
-                  <goals>
-                     <goal>resources</goal>
-                  </goals>
-               </execution>
-            </executions>
-         </plugin>
-         <plugin>
-            <groupId>org.codehaus.mojo</groupId>
-            <artifactId>build-helper-maven-plugin</artifactId>
-            <executions>
-               <execution>
-                  <id>attach-artifacts</id>
-                  <phase>package</phase>
-                  <goals>
-                     <goal>attach-artifact</goal>
-                  </goals>
-                  <configuration>
-                     <artifacts>
-                        <artifact>
-                           <file>${project.build.directory}/classes/${features.file}</file>
-                           <type>xml</type>
-                           <classifier>features</classifier>
-                        </artifact>
-                     </artifacts>
-                  </configuration>
-               </execution>
-            </executions>
-         </plugin>
-         <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-surefire-plugin</artifactId>
-            <version>${surefire.version}</version>
-            <configuration>
-              <systemPropertyVariables>
-                <karaf.distro.groupId>org.opendaylight.controller</karaf.distro.groupId>
-                <karaf.distro.artifactId>opendaylight-karaf-empty</karaf.distro.artifactId>
-                <karaf.distro.version>${karaf.empty.version}</karaf.distro.version>
-              </systemPropertyVariables>
-              <dependenciesToScan>
-               <dependency>org.opendaylight.odlparent:features-test</dependency>
-              </dependenciesToScan>
-            </configuration>
-          </plugin>
-      </plugins>
-   </build>
    <scm>
       <connection>scm:git:ssh://git.opendaylight.org:29418/${repoName}.git</connection>
       <developerConnection>scm:git:ssh://git.opendaylight.org:29418/${repoName}.git</developerConnection>
    <scm>
       <connection>scm:git:ssh://git.opendaylight.org:29418/${repoName}.git</connection>
       <developerConnection>scm:git:ssh://git.opendaylight.org:29418/${repoName}.git</developerConnection>
index 1a1eb03d534db55c890c5c526a41cec2f87011a6..f030b906b3f3d939f053ec6ac8c470e030d7f574 100644 (file)
@@ -21,9 +21,9 @@
     Necessary TODO: Add repo entries for the repositories of features you refer to
         in this feature file but do not define here.
         Examples:
     Necessary TODO: Add repo entries for the repositories of features you refer to
         in this feature file but do not define here.
         Examples:
-            <repository>mvn:org.opendaylight.yangtools/features-yangtools/0.8.0-SNAPSHOT/xml/features</repository>
-            <repository>mvn:org.opendaylight.controller/features-mdsal/1.3.0-SNAPSHOT/xml/features</repository>
-            <repository>mvn:org.opendaylight.openflowplugin/features-openflowplugin/0.2.0-SNAPSHOT/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.openflowplugin/features-openflowplugin/{{VERSION}}/xml/features</repository>
     -->
     <feature name='odl-${repoName}-all' version='${symbol_dollar}{project.version}' description='OpenDaylight :: ${repoName} :: All'>
         <!--
     -->
     <feature name='odl-${repoName}-all' version='${symbol_dollar}{project.version}' description='OpenDaylight :: ${repoName} :: All'>
         <!--
@@ -66,7 +66,7 @@
         <feature name='odl-${repoName}-provider' version='${symbol_dollar}{project.version}' description='OpenDaylight :: ${repoName} :: Provider '>
             <feature version='1.3.0-SNAPSHOT'>odl-mdsal-broker</feature>
             <feature version='${symbol_dollar}{project.version}'>odl-${repoName}-model</feature>
         <feature name='odl-${repoName}-provider' version='${symbol_dollar}{project.version}' description='OpenDaylight :: ${repoName} :: Provider '>
             <feature version='1.3.0-SNAPSHOT'>odl-mdsal-broker</feature>
             <feature version='${symbol_dollar}{project.version}'>odl-${repoName}-model</feature>
-            <bundle>mvn:${groupId}/${repoName}-provider/${symbol_dollar}{project.version}</bundle>
+            <bundle>mvn:${groupId}/${repoName}-provider/{{VERSION}}</bundle>
             ... whatever other bundles you need
         </feature>
 
             ... whatever other bundles you need
         </feature>
 
         <feature name='odl-${repoName}-model' version='${symbol_dollar}{project.version}' description='OpenDaylight :: ${repoName} :: Model'>
             <feature version='0.8.0-SNAPSHOT'>odl-yangtools-binding</feature>
             <feature version='0.8.0-SNAPSHOT'>odl-yangtools-models</feature>
         <feature name='odl-${repoName}-model' version='${symbol_dollar}{project.version}' description='OpenDaylight :: ${repoName} :: Model'>
             <feature version='0.8.0-SNAPSHOT'>odl-yangtools-binding</feature>
             <feature version='0.8.0-SNAPSHOT'>odl-yangtools-models</feature>
-            <bundle>mvn:${groupId}/${repoName}-model/${symbol_dollar}{project.version}</bundle>
+            <bundle>mvn:${groupId}/${repoName}-model/{{VERSION}}</bundle>
             ... whatever other bundles you need
         </feature>
 
         * Config Subsystem example - the config file is your config subsystem configuration
         <feature name='odl-${repoName}-provider' version='${symbol_dollar}{project.version}' description='OpenDaylight :: ${repoName} :: Provider'>
             <feature version='1.3.0-SNAPSHOT'>odl-mdsal-broker</feature>
             ... whatever other bundles you need
         </feature>
 
         * Config Subsystem example - the config file is your config subsystem configuration
         <feature name='odl-${repoName}-provider' version='${symbol_dollar}{project.version}' description='OpenDaylight :: ${repoName} :: Provider'>
             <feature version='1.3.0-SNAPSHOT'>odl-mdsal-broker</feature>
-            <bundle>mvn:${groupId}/${repoName}-provider/${symbol_dollar}{project.version}</bundle>
-            <configfile finalname="etc/opendaylight/karaf/80-${repoName}.xml">mvn:${groupId}/${repoName}-config/${symbol_dollar}{project.version}/xml/config</configfile>
+            <bundle>mvn:${groupId}/${repoName}-provider/{{VERSION}}</bundle>
+            <configfile finalname="etc/opendaylight/karaf/80-${repoName}.xml">mvn:${groupId}/${repoName}-config/{{VERSION}}/xml/config</configfile>
             ... whatever other bundles you need
         </feature>
 
         * Basic MD-SAL Provider that uses openflowplugin-flow-services (which brings along odl-mdsal-broker)
         <feature name='odl-${repoName}-provider' version='${symbol_dollar}{project.version}' description='OpenDaylight :: ${repoName} :: Provider'>
             <feature version='0.2.0-SNAPSHOT'>odl-openflowplugin-flow-services</feature>
             ... whatever other bundles you need
         </feature>
 
         * Basic MD-SAL Provider that uses openflowplugin-flow-services (which brings along odl-mdsal-broker)
         <feature name='odl-${repoName}-provider' version='${symbol_dollar}{project.version}' description='OpenDaylight :: ${repoName} :: Provider'>
             <feature version='0.2.0-SNAPSHOT'>odl-openflowplugin-flow-services</feature>
-            <bundle>mvn:${groupId}/${repoName}-provider/${symbol_dollar}{project.version}</bundle>
+            <bundle>mvn:${groupId}/${repoName}-provider/{{VERSION}}</bundle>
             ... whatever other bundles you need
         </feature>
 
             ... whatever other bundles you need
         </feature>
 
index 54fb4b860177a1b77ab20108bf040a15a5f08bdf..2839279e52616d50514be110d6951ef68c80eb0a 100644 (file)
@@ -18,7 +18,6 @@
   <build>
     <plugins>
       <plugin>
   <build>
     <plugins>
       <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-checkstyle-plugin</artifactId>
         <configuration>
           <failsOnError>false</failsOnError>
         <artifactId>maven-checkstyle-plugin</artifactId>
         <configuration>
           <failsOnError>false</failsOnError>
index 91f818cb4c0603dc93b69f9c6dc91270f28b9393..f8cc1e52c3f9e59432f6fb8403798f58e393e604 100644 (file)
@@ -49,6 +49,13 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
         <type>pom</type>
         <scope>import</scope>
       </dependency>
         <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>
     </dependencies>
   </dependencyManagement>
   <dependencies>
@@ -56,7 +63,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
       <groupId>org.opendaylight.yangtools</groupId>
       <artifactId>features-yangtools</artifactId>
       <classifier>features</classifier>
       <groupId>org.opendaylight.yangtools</groupId>
       <artifactId>features-yangtools</artifactId>
       <classifier>features</classifier>
-      <version>${yangtools.version}</version>
       <type>xml</type>
       <scope>runtime</scope>
     </dependency>
       <type>xml</type>
       <scope>runtime</scope>
     </dependency>
@@ -72,7 +78,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>
       <groupId>org.opendaylight.controller</groupId>
       <artifactId>features-mdsal</artifactId>
       <classifier>features</classifier>
-      <version>${mdsal.version}</version>
       <type>xml</type>
       <scope>runtime</scope>
     </dependency>
       <type>xml</type>
       <scope>runtime</scope>
     </dependency>
@@ -80,7 +85,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>
       <groupId>org.opendaylight.netconf</groupId>
       <artifactId>features-restconf</artifactId>
       <classifier>features</classifier>
-      <version>${restconf.version}</version>
       <type>xml</type>
       <scope>runtime</scope>
     </dependency>
       <type>xml</type>
       <scope>runtime</scope>
     </dependency>
index 0446ec6bae201fc9706bbe9a3eca174952edeeba..42d88b7420692fddcfe158a2d9388ba897e32eb3 100644 (file)
@@ -13,20 +13,20 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
 <features name="odl-${artifactId}-${symbol_dollar}{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">
 <features name="odl-${artifactId}-${symbol_dollar}{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/${symbol_dollar}{yangtools.version}/xml/features</repository>
-  <repository>mvn:org.opendaylight.controller/features-mdsal/${symbol_dollar}{mdsal.version}/xml/features</repository>
-  <repository>mvn:org.opendaylight.mdsal.model/features-mdsal-model/${symbol_dollar}{mdsal.model.version}/xml/features</repository>
-  <repository>mvn:org.opendaylight.netconf/features-restconf/${symbol_dollar}{restconf.version}/xml/features</repository>
-  <repository>mvn:org.opendaylight.dlux/features-dlux/${symbol_dollar}{dlux.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.dlux/features-dlux/{{VERSION}}/xml/features</repository>
   <feature name='odl-${artifactId}-api' version='${symbol_dollar}{project.version}' description='OpenDaylight :: ${artifactId} :: api'>
     <feature version='${symbol_dollar}{mdsal.model.version}'>odl-mdsal-models</feature>
   <feature name='odl-${artifactId}-api' version='${symbol_dollar}{project.version}' description='OpenDaylight :: ${artifactId} :: api'>
     <feature version='${symbol_dollar}{mdsal.model.version}'>odl-mdsal-models</feature>
-    <bundle>mvn:${groupId}/${artifactId}-api/${symbol_dollar}{project.version}</bundle>
+    <bundle>mvn:${groupId}/${artifactId}-api/{{VERSION}}</bundle>
   </feature>
   <feature name='odl-${artifactId}' version='${symbol_dollar}{project.version}' description='OpenDaylight :: ${artifactId}'>
     <feature version='${symbol_dollar}{mdsal.version}'>odl-mdsal-broker</feature>
     <feature version='${symbol_dollar}{project.version}'>odl-${artifactId}-api</feature>
   </feature>
   <feature name='odl-${artifactId}' version='${symbol_dollar}{project.version}' description='OpenDaylight :: ${artifactId}'>
     <feature version='${symbol_dollar}{mdsal.version}'>odl-mdsal-broker</feature>
     <feature version='${symbol_dollar}{project.version}'>odl-${artifactId}-api</feature>
-    <bundle>mvn:${groupId}/${artifactId}-impl/${symbol_dollar}{project.version}</bundle>
-    <configfile finalname="${configfile.directory}/${artifactId}.xml">mvn:${groupId}/${artifactId}-impl/${symbol_dollar}{project.version}/xml/config</configfile>
+    <bundle>mvn:${groupId}/${artifactId}-impl/{{VERSION}}</bundle>
+    <configfile finalname="${configfile.directory}/${artifactId}.xml">mvn:${groupId}/${artifactId}-impl/{{VERSION}}/xml/config</configfile>
   </feature>
   <feature name='odl-${artifactId}-rest' version='${symbol_dollar}{project.version}' description='OpenDaylight :: ${artifactId} :: REST'>
     <feature version="${symbol_dollar}{project.version}">odl-${artifactId}</feature>
   </feature>
   <feature name='odl-${artifactId}-rest' version='${symbol_dollar}{project.version}' description='OpenDaylight :: ${artifactId} :: REST'>
     <feature version="${symbol_dollar}{project.version}">odl-${artifactId}</feature>
index 8ff1492dd5f008798a7e64afb4e6c19778d29628..c4fcc84ace9c2ffa0cff8bda7976aa965f5b7c52 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
-<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>
   <modelVersion>4.0.0</modelVersion>
   <parent>
     <groupId>org.opendaylight.controller</groupId>