Bug 8741: Fix broken Maven archetype 84/39484/13
authorMichael Vorburger <vorburger@redhat.com>
Thu, 26 May 2016 13:34:57 +0000 (15:34 +0200)
committerStephen Kitt <skitt@redhat.com>
Thu, 7 Sep 2017 11:40:58 +0000 (11:40 +0000)
Includes migration to Karaf 4 features, as per
https://wiki.opendaylight.org/view/Karaf_4_migration

The main goal here was just to get what I've found to be a completely
badly broken archetype; it even had some other other problems unrelated
to Karaf 4 migration; this looks like it had been haywire for quite a
while even before the Karaf 4 migration already?

This also contributes a basis for future automated self testing; see also
http://blog2.vorburger.ch/2016/05/how-to-make-maven-archetype-plugin.html,
but this is skipped in this change, because while it works great locally,
it fails for some strange reason related to SFT on (only) Jenkins.

I'm hoping that this just a very first step to ongoing active
maintenance of the archetype (by myself, but hopefully others too),
without ever breaking it anymore - thanks to the new self test. Here are
some possible future TBDs:

* remove archetype.test.skip and fix weird SFT problem (@vorburger)

* re-activate commented out IT which breaks during build self test

* odl-X* feature directory names with ${artifactId} instead of X
   (dunno how to get archetype to create folders named by variables)

* karaf.localFeature which breaks during build self test

* some clean-up e.g. remove useless site generation?

* real test of the produced Karaf distro? Using Pax Exam, but not *IT..

Change-Id: I013c305fb9b63cc965cbcc112cbe6017ae47de21
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
21 files changed:
opendaylight/archetypes/opendaylight-startup/pom.xml
opendaylight/archetypes/opendaylight-startup/src/main/resources/META-INF/maven/archetype-metadata.xml
opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/api/pom.xml
opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/api/src/main/yang/__artifactId__.yang
opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/artifacts/pom.xml
opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/cli/pom.xml
opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/cli/src/main/resources/org/opendaylight/blueprint/cli-blueprint.xml
opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/features/features-X/pom.xml [new file with mode: 0644]
opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/features/odl-X-api/pom.xml [new file with mode: 0644]
opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/features/odl-X-cli/pom.xml [new file with mode: 0644]
opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/features/odl-X-rest/pom.xml [new file with mode: 0644]
opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/features/odl-X/pom.xml [new file with mode: 0644]
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 [deleted file]
opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/impl/pom.xml
opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/it/pom.xml
opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/it/src/test/java/__packageInPathFormat__/it/__classPrefix__IT.java
opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/karaf/pom.xml
opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/pom.xml
opendaylight/archetypes/opendaylight-startup/src/test/resources/projects/basic/goal.txt
opendaylight/archetypes/pom.xml

index 51a21cd..0bfc27f 100644 (file)
   <packaging>maven-archetype</packaging>
   <name>${project.artifactId}</name>
 
-  <build>
-    <plugins>
-      <plugin>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-        <configuration>
-          <failsOnError>true</failsOnError>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
 </project>
index 72d36c8..797e071 100644 (file)
@@ -2,6 +2,7 @@
 <archetype-descriptor xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" name="example-aggregator"
     xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
   <requiredProperties>
     <requiredProperty key="classPrefix" >
         <defaultValue>
@@ -48,7 +49,6 @@
     </fileSet>
 
     <!-- features -->
-
     <fileSet filtered="true" encoding="UTF-8">
         <directory>features</directory>
         <includes>
         </includes>
     </fileSet>
     <fileSet filtered="true" encoding="UTF-8">
-        <directory>features/src/main/features</directory>
+        <directory>features/features-X</directory>
         <includes>
-            <include>**/*.xml</include>
-          </includes>
+            <include>pom.xml</include>
+        </includes>
+    </fileSet>
+    <fileSet filtered="true" encoding="UTF-8">
+        <directory>features/odl-X-api</directory>
+        <includes>
+            <include>pom.xml</include>
+        </includes>
+    </fileSet>
+    <fileSet filtered="true" encoding="UTF-8">
+        <directory>features/odl-X</directory>
+        <includes>
+            <include>pom.xml</include>
+        </includes>
+    </fileSet>
+    <fileSet filtered="true" encoding="UTF-8">
+        <directory>features/odl-X-cli</directory>
+        <includes>
+            <include>pom.xml</include>
+        </includes>
+    </fileSet>
+    <fileSet filtered="true" encoding="UTF-8">
+        <directory>features/odl-X-rest</directory>
+        <includes>
+            <include>pom.xml</include>
+        </includes>
     </fileSet>
 
     <!-- impl -->
-
     <fileSet filtered="true" encoding="UTF-8">
         <directory>impl</directory>
         <includes>
     </fileSet>
 
      <!-- api -->
-
      <fileSet filtered="true" encoding="UTF-8">
        <directory>api</directory>
        <includes>
index eb64ff6..c97c3e8 100644 (file)
@@ -8,7 +8,6 @@ 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>
 
   <parent>
index 75eb8e3..848cf48 100644 (file)
@@ -6,7 +6,7 @@ module ${artifactId} {
     namespace "urn:opendaylight:params:xml:ns:yang:${artifactId}";
     prefix "${artifactId}";
 
-    revision "${date}" {
+    revision "2017-08-30" { // TODO change revision to date of model creation
         description "Initial revision of ${artifactId} model";
     }
 }
index 4525c5d..8184bdf 100644 (file)
@@ -11,7 +11,6 @@ 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>
 
   <parent>
@@ -43,7 +42,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       </dependency>
       <dependency>
         <groupId>${symbol_dollar}{project.groupId}</groupId>
-        <artifactId>${artifactId}-features</artifactId>
+        <artifactId>features-${artifactId}</artifactId>
         <version>${symbol_dollar}{project.version}</version>
         <classifier>features</classifier>
         <type>xml</type>
index 79ae689..fa0c1fb 100644 (file)
@@ -12,7 +12,6 @@ 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>
 
   <parent>
@@ -30,6 +29,18 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <name>ODL :: ${groupId} :: ${project.artifactId}</name>
   <packaging>bundle</packaging>
 
+  <dependencyManagement>
+      <dependencies>
+          <dependency>
+              <groupId>org.opendaylight.controller</groupId>
+              <artifactId>mdsal-artifacts</artifactId>
+              <version>1.7.0-SNAPSHOT</version>
+              <type>pom</type>
+              <scope>import</scope>
+          </dependency>
+      </dependencies>
+  </dependencyManagement>
+
   <dependencies>
     <!-- Project Dependencies -->
     <dependency>
@@ -38,6 +49,11 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <version>${symbol_dollar}{project.version}</version>
     </dependency>
 
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>sal-binding-api</artifactId>
+    </dependency>
+
     <!-- Apache Karaf console dependency -->
     <dependency>
       <groupId>org.apache.karaf.shell</groupId>
index 5c3bd4d..c53c19d 100644 (file)
@@ -21,14 +21,15 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <bean id="cliCommandsImpl" class="${package}.cli.impl.${classPrefix}CliCommandsImpl">
     <argument ref="dataBroker" />
   </bean>
+
   <service ref="cliCommandsImpl" odl:type="default"
     interface="${package}.cli.api.${classPrefix}CliCommands" />
 
-    <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.0.0">
-        <command name="test-command">
-            <action class="${package}.cli.commands.${classPrefix}CliTestCommand">
-                <argument ref="cliCommandsImpl"/>
-            </action>
-        </command>
-    </command-bundle>
-</blueprint>
+  <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+    <command>
+        <action class="${package}.cli.commands.${classPrefix}CliTestCommand">
+            <argument ref="cliCommandsImpl"/>
+        </action>
+    </command>
+  </command-bundle>
+</blueprint>
\ No newline at end of file
diff --git a/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/features/features-X/pom.xml b/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/features/features-X/pom.xml
new file mode 100644 (file)
index 0000000..783b843
--- /dev/null
@@ -0,0 +1,48 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright © ${copyrightYear} ${copyright} 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">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.opendaylight.odlparent</groupId>
+    <artifactId>feature-repo-parent</artifactId>
+    <version>2.0.4</version>
+    <relativePath/>
+  </parent>
+
+  <groupId>${groupId}</groupId>
+  <artifactId>features-${artifactId}</artifactId>
+  <version>${version}</version>
+  <packaging>feature</packaging>
+  <!-- <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 :: ${groupId} :: ${project.artifactId}</name>
+
+  <properties>
+    <mdsal.model.version>0.12.0-SNAPSHOT</mdsal.model.version>
+    <mdsal.version>1.7.0-SNAPSHOT</mdsal.version>
+    <restconf.version>1.7.0-SNAPSHOT</restconf.version>
+    <yangtools.version>2.0.0-SNAPSHOT</yangtools.version>
+    <configfile.directory>etc/opendaylight/karaf</configfile.directory>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>${symbol_dollar}{project.groupId}</groupId>
+      <artifactId>odl-${artifactId}-api</artifactId>
+      <version>${symbol_dollar}{project.version}</version>
+      <type>xml</type>
+      <classifier>features</classifier>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/features/odl-X-api/pom.xml b/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/features/odl-X-api/pom.xml
new file mode 100644 (file)
index 0000000..72b657d
--- /dev/null
@@ -0,0 +1,54 @@
+<?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">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.opendaylight.odlparent</groupId>
+        <artifactId>single-feature-parent</artifactId>
+        <version>2.0.4</version>
+        <relativePath/>
+    </parent>
+
+    <groupId>${groupId}</groupId>
+    <artifactId>odl-${artifactId}-api</artifactId>
+    <version>${version}</version>
+    <packaging>feature</packaging>
+
+    <name>OpenDaylight :: ${artifactId} :: API [Karaf Feature]</name>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.opendaylight.mdsal.model</groupId>
+                <artifactId>mdsal-model-artifacts</artifactId>
+                <version>0.12.0-SNAPSHOT</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.opendaylight.controller</groupId>
+                <artifactId>mdsal-artifacts</artifactId>
+                <version>1.7.0-SNAPSHOT</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.opendaylight.mdsal.model</groupId>
+            <artifactId>odl-mdsal-models</artifactId>
+            <type>xml</type>
+            <classifier>features</classifier>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>${artifactId}-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+</project>
diff --git a/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/features/odl-X-cli/pom.xml b/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/features/odl-X-cli/pom.xml
new file mode 100644 (file)
index 0000000..b513ebf
--- /dev/null
@@ -0,0 +1,55 @@
+<?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">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.opendaylight.odlparent</groupId>
+        <artifactId>single-feature-parent</artifactId>
+        <version>2.0.4</version>
+        <relativePath/>
+    </parent>
+
+    <groupId>${groupId}</groupId>
+    <artifactId>odl-${artifactId}-cli</artifactId>
+    <version>${version}</version>
+    <packaging>feature</packaging>
+
+    <name>OpenDaylight :: ${artifactId} :: CLI [Karaf Feature]</name>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.opendaylight.mdsal.model</groupId>
+                <artifactId>mdsal-model-artifacts</artifactId>
+                <version>0.12.0-SNAPSHOT</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.opendaylight.controller</groupId>
+                <artifactId>mdsal-artifacts</artifactId>
+                <version>1.7.0-SNAPSHOT</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>odl-${artifactId}</artifactId>
+            <version>${project.version}</version>
+            <type>xml</type>
+            <classifier>features</classifier>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>${artifactId}-cli</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+</project>
diff --git a/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/features/odl-X-rest/pom.xml b/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/features/odl-X-rest/pom.xml
new file mode 100644 (file)
index 0000000..9376de5
--- /dev/null
@@ -0,0 +1,49 @@
+<?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">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.opendaylight.odlparent</groupId>
+        <artifactId>single-feature-parent</artifactId>
+        <version>2.0.4</version>
+        <relativePath/>
+    </parent>
+
+    <groupId>${groupId}</groupId>
+    <artifactId>odl-${artifactId}-rest</artifactId>
+    <version>${version}</version>
+    <packaging>feature</packaging>
+
+    <name>OpenDaylight :: ${artifactId} :: REST [Karaf Feature]</name>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.opendaylight.netconf</groupId>
+                <artifactId>restconf-artifacts</artifactId>
+                <version>1.7.0-SNAPSHOT</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.opendaylight.netconf</groupId>
+            <artifactId>odl-restconf</artifactId>
+            <type>xml</type>
+            <classifier>features</classifier>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>odl-${artifactId}-cli</artifactId>
+            <version>${project.version}</version>
+            <type>xml</type>
+            <classifier>features</classifier>
+        </dependency>
+    </dependencies>
+
+</project>
diff --git a/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/features/odl-X/pom.xml b/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/features/odl-X/pom.xml
new file mode 100644 (file)
index 0000000..a914901
--- /dev/null
@@ -0,0 +1,61 @@
+<?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">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.opendaylight.odlparent</groupId>
+        <artifactId>single-feature-parent</artifactId>
+        <version>2.0.4</version>
+        <relativePath/>
+    </parent>
+
+    <groupId>${groupId}</groupId>
+    <artifactId>odl-${artifactId}</artifactId>
+    <version>${version}</version>
+    <packaging>feature</packaging>
+
+    <name>OpenDaylight :: ${artifactId} :: Impl [Karaf Feature]</name>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.opendaylight.mdsal.model</groupId>
+                <artifactId>mdsal-model-artifacts</artifactId>
+                <version>0.12.0-SNAPSHOT</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+            <dependency>
+                <groupId>org.opendaylight.controller</groupId>
+                <artifactId>mdsal-artifacts</artifactId>
+                <version>1.7.0-SNAPSHOT</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.opendaylight.controller</groupId>
+            <artifactId>odl-mdsal-broker</artifactId>
+            <type>xml</type>
+            <classifier>features</classifier>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>odl-${artifactId}-api</artifactId>
+            <version>${project.version}</version>
+            <type>xml</type>
+            <classifier>features</classifier>
+        </dependency>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>${artifactId}-impl</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+</project>
index 990bca2..4b3373f 100644 (file)
@@ -11,102 +11,26 @@ 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">
-
   <modelVersion>4.0.0</modelVersion>
 
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
-    <artifactId>features-parent</artifactId>
+    <artifactId>odlparent-lite</artifactId>
     <version>2.0.4</version>
     <relativePath/>
   </parent>
 
   <groupId>${groupId}</groupId>
-  <artifactId>${artifactId}-features</artifactId>
+  <artifactId>${artifactId}-features-aggregator</artifactId>
   <version>${version}</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. -->
+  <packaging>pom</packaging>
   <name>ODL :: ${groupId} :: ${project.artifactId}</name>
 
-  <properties>
-    <mdsal.model.version>0.12.0-SNAPSHOT</mdsal.model.version>
-    <mdsal.version>1.7.0-SNAPSHOT</mdsal.version>
-    <restconf.version>1.7.0-SNAPSHOT</restconf.version>
-    <yangtools.version>2.0.0-SNAPSHOT</yangtools.version>
-    <configfile.directory>etc/opendaylight/karaf</configfile.directory>
-  </properties>
-
-  <dependencyManagement>
-    <dependencies>
-      <!-- project specific dependencies -->
-      <dependency>
-        <groupId>org.opendaylight.controller</groupId>
-        <artifactId>mdsal-artifacts</artifactId>
-        <version>${mdsal.version}</version>
-        <type>pom</type>
-        <scope>import</scope>
-      </dependency>
-      <dependency>
-        <groupId>org.opendaylight.netconf</groupId>
-        <artifactId>restconf-artifacts</artifactId>
-        <version>${restconf.version}</version>
-        <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>
-      <type>xml</type>
-      <scope>runtime</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.opendaylight.mdsal.model</groupId>
-      <artifactId>features-mdsal-model</artifactId>
-      <version>${mdsal.model.version}</version>
-      <classifier>features</classifier>
-      <type>xml</type>
-      <scope>runtime</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.opendaylight.controller</groupId>
-      <artifactId>features-mdsal</artifactId>
-      <classifier>features</classifier>
-      <type>xml</type>
-      <scope>runtime</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.opendaylight.netconf</groupId>
-      <artifactId>features-restconf</artifactId>
-      <classifier>features</classifier>
-      <type>xml</type>
-      <scope>runtime</scope>
-    </dependency>
-    <dependency>
-      <groupId>${symbol_dollar}{project.groupId}</groupId>
-      <artifactId>${artifactId}-impl</artifactId>
-      <version>${symbol_dollar}{project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>${symbol_dollar}{project.groupId}</groupId>
-      <artifactId>${artifactId}-api</artifactId>
-      <version>${symbol_dollar}{project.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>${symbol_dollar}{project.groupId}</groupId>
-      <artifactId>${artifactId}-cli</artifactId>
-      <version>${symbol_dollar}{project.version}</version>
-    </dependency>
-  </dependencies>
+  <modules>
+    <module>features-X</module>
+    <module>odl-X-api</module>
+    <module>odl-X</module>
+    <module>odl-X-rest</module>
+    <module>odl-X-cli</module>
+  </modules>
 </project>
diff --git a/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/features/src/main/features/features.xml b/opendaylight/archetypes/opendaylight-startup/src/main/resources/archetype-resources/features/src/main/features/features.xml
deleted file mode 100644 (file)
index 97d13a3..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#set( $symbol_pound = '#' )
-#set( $symbol_dollar = '$' )
-#set( $symbol_escape = '\' )
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- vi: set et smarttab sw=4 tabstop=4: -->
-<!--
-Copyright © ${copyrightYear} ${copyright} 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
--->
-<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/{{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>
-  <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/{{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>
-    <bundle>mvn:${groupId}/${artifactId}-impl/{{VERSION}}</bundle>
-  </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 version="${symbol_dollar}{restconf.version}">odl-restconf</feature>
-  </feature>
-  <feature name='odl-${artifactId}-cli' version='${symbol_dollar}{project.version}' description='OpenDaylight :: ${artifactId} :: CLI'>
-    <feature version="${symbol_dollar}{project.version}">odl-${artifactId}</feature>
-    <bundle>mvn:${groupId}/${artifactId}-cli/{{VERSION}}</bundle>
-  </feature>
-
-</features>
index d046a95..5f5e7d5 100644 (file)
@@ -12,7 +12,6 @@ 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>
 
   <parent>
@@ -30,6 +29,18 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <name>ODL :: ${groupId} :: ${project.artifactId}</name>
   <packaging>bundle</packaging>
 
+  <dependencyManagement>
+      <dependencies>
+          <dependency>
+              <groupId>org.opendaylight.controller</groupId>
+              <artifactId>mdsal-artifacts</artifactId>
+              <version>1.7.0-SNAPSHOT</version>
+              <type>pom</type>
+              <scope>import</scope>
+          </dependency>
+      </dependencies>
+  </dependencyManagement>
+
   <dependencies>
     <dependency>
       <groupId>${symbol_dollar}{project.groupId}</groupId>
@@ -37,6 +48,11 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
       <version>${symbol_dollar}{project.version}</version>
     </dependency>
 
+    <dependency>
+      <groupId>org.opendaylight.controller</groupId>
+      <artifactId>sal-binding-api</artifactId>
+    </dependency>
+
     <!-- Testing Dependencies -->
     <dependency>
       <groupId>junit</groupId>
index 7d3d398..5a64837 100644 (file)
@@ -8,7 +8,6 @@ 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>
 
   <parent>
@@ -37,7 +36,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
   <dependencies>
     <dependency>
       <groupId>${project.groupId}</groupId>
-      <artifactId>${artifactId}-features</artifactId>
+      <artifactId>features-${artifactId}</artifactId>
       <version>${project.version}</version>
     </dependency>
   </dependencies>
index 33b6484..23fb24d 100644 (file)
@@ -36,7 +36,7 @@ public class ${classPrefix}IT extends AbstractMdsalTestBase {
     public MavenUrlReference getFeatureRepo() {
         return maven()
                 .groupId("${groupId}")
-                .artifactId("${artifactId}-features")
+                .artifactId("features-${artifactId}")
                 .classifier("features")
                 .type("xml")
                 .versionAsInProject();
@@ -44,7 +44,7 @@ public class ${classPrefix}IT extends AbstractMdsalTestBase {
 
     @Override
     public String getFeatureName() {
-        return "odl-${artifactId}-ui";
+        return "odl-${artifactId}-rest";
     }
 
     @Override
index 8825453..d36e06d 100644 (file)
@@ -10,13 +10,13 @@ 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">
-
   <modelVersion>4.0.0</modelVersion>
 
   <parent>
     <groupId>org.opendaylight.odlparent</groupId>
-    <artifactId>karaf-parent</artifactId>
+    <artifactId>karaf4-parent</artifactId>
     <version>2.0.4</version>
+    <relativePath/>
   </parent>
 
   <groupId>${groupId}</groupId>
@@ -27,7 +27,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
   <name>ODL :: ${groupId} :: ${project.artifactId}</name>
 
   <properties>
-    <karaf.localFeature>odl-${artifactId}-ui</karaf.localFeature>
+    <!-- TODO <karaf.localFeature>odl-${artifactId}-rest</karaf.localFeature> -->
   </properties>
 
   <dependencyManagement>
@@ -53,7 +53,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
 
     <dependency>
       <groupId>${symbol_dollar}{project.groupId}</groupId>
-      <artifactId>${artifactId}-features</artifactId>
+      <artifactId>features-${artifactId}</artifactId>
       <classifier>features</classifier>
       <type>xml</type>
       <scope>runtime</scope>
index 0bc86b9..bd700f0 100644 (file)
@@ -35,7 +35,7 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
     <module>features</module>
     <module>artifacts</module>
     <module>cli</module>
-    <module>it</module>
+    <!-- <module>it</module> -->
   </modules>
 
   <!-- DO NOT install or deploy the repo root pom as it's only needed to initiate a build -->
index cb05da2..7ffd22c 100644 (file)
   <version>0.7.0-SNAPSHOT</version>
   <packaging>pom</packaging>
 
+  <properties>
+    <!-- TODO Bump maven-archetype-plugin version in odlparent instead of here: -->
+    <maven.archetype.version>3.0.1</maven.archetype.version>
+    <!-- TODO Figure out why SFT fails on archetype self test with:
+         ArtifactResolutionException: Error resolving artifact org.opendaylight.odlparent:opendaylight-karaf-empty:zip:2.0.4 -->
+    <archetype.test.skip>true</archetype.test.skip>
+  </properties>
+
   <build>
     <extensions>
       <extension>
         <groupId>org.apache.maven.archetype</groupId>
         <artifactId>archetype-packaging</artifactId>
-        <version>2.4</version>
+        <version>${maven.archetype.version}</version>
       </extension>
     </extensions>
-    <pluginManagement>
-      <plugins>
-        <plugin>
-          <artifactId>maven-archetype-plugin</artifactId>
-          <version>2.4</version>
-          <dependencies>
-            <dependency>
-              <groupId>commons-lang</groupId>
-              <artifactId>commons-lang</artifactId>
-              <version>2.6</version>
-            </dependency>
-          </dependencies>
-        </plugin>
-      </plugins>
-    </pluginManagement>
+
     <plugins>
       <plugin>
           <groupId>org.apache.maven.plugins</groupId>
             <addDefaultExcludes>false</addDefaultExcludes>
           </configuration>
       </plugin>
+      <plugin>
+        <artifactId>maven-help-plugin</artifactId>
+        <version>2.2</version>
+        <configuration>
+          <output>${project.build.directory}/effective-settings.xml</output>
+        </configuration>
+        <executions>
+          <execution>
+            <!-- This makes sure we run before maven-archetype-plugin -->
+            <phase>pre-integration-test</phase>
+            <goals>
+              <goal>effective-settings</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <artifactId>maven-archetype-plugin</artifactId>
+        <version>${maven.archetype.version}</version>
+        <configuration>
+          <settingsFile>${project.build.directory}/effective-settings.xml</settingsFile>
+        </configuration>
+        <dependencies>
+          <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+            <version>2.6</version>
+          </dependency>
+        </dependencies>
+      </plugin>
     </plugins>
   </build>
 

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.