Bug 7900: make feature repos aggregate features 63/55963/2
authorStephen Kitt <skitt@redhat.com>
Wed, 8 Mar 2017 16:33:20 +0000 (17:33 +0100)
committerStephen Kitt <skitt@redhat.com>
Tue, 25 Apr 2017 09:56:14 +0000 (11:56 +0200)
Instead of redefining features and producing standalone feature
repositories, feature-repo-parent can produce features which list the
individual feature repositories produced by single-feature-parent.
This allows integration/distribution's integration-index to build much
faster (by rendering SFT moot there).

SFT now tests individual features in single-feature-test instead of
testing the full repository. This makes the -Psft profile useless so
it is removed. It also means that odl-bundles-test needs to be handled
specially, since it is used in features4-test: it can't use
single-feature-parent, otherwise it introduces a dependency loop. This
patch introduces a new, internal parent,
untested-single-feature-parent, which is used by odl-bundles-test and
single-feature-parent: untested- takes care of the actual feature
construction, and single-feature-parent adds the SFT tests.

(cherry picked from commit bd4340895f8ec544393f2ec75f0cb5cfd25eae1f)

Change-Id: Ib0de6ce1e6488944bcbe0aa7e84496676f6db19a
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
feature-repo-parent/pom.xml
features4/odl-triemap-0.2/pom.xml
pom.xml
single-feature-parent/pom.xml
untested-single-feature-parent/pom.xml [new file with mode: 0644]

index 7e8b9eb3afe51e4cfdfc8be24d4ce932788beb9f..3374ce95eb397ca2185a840afd35b0b7cabd410a 100644 (file)
@@ -91,9 +91,6 @@
                 <artifactId>karaf-maven-plugin</artifactId>
                 <version>${karaf4.plugin.version}</version>
                 <extensions>true</extensions>
-                <configuration>
-                    <aggregateFeatures>true</aggregateFeatures>
-                </configuration>
             </plugin>
         </plugins>
     </build>
index 9d5a77367fab60434a29fe332d9584b3a824ba69..3bfbe294c358b440b3e6ed28a378c98dbb44f71e 100644 (file)
@@ -13,9 +13,9 @@
 
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
-        <artifactId>single-feature-parent</artifactId>
+        <artifactId>untested-single-feature-parent</artifactId>
         <version>1.8.0-SNAPSHOT</version>
-        <relativePath>../../single-feature-parent</relativePath>
+        <relativePath>../../untested-single-feature-parent</relativePath>
     </parent>
 
     <groupId>org.opendaylight.odlparent</groupId>
diff --git a/pom.xml b/pom.xml
index c70bb16ccf38097ec82f8e35f8bff481a370c317..7a9b9f2d25418ae75a46c01b45cec8410c20e9de 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -45,6 +45,7 @@
         <module>bundle-parent</module>
         <module>features-parent</module>
         <module>single-feature3-parent</module>
+        <module>untested-single-feature-parent</module>
         <module>single-feature-parent</module>
         <module>feature3-repo-parent</module>
         <module>feature-repo-parent</module>
index b9298c2ffcd77e24c0884ec3c12b8d9c8c2c1720..63cc3a5cd584977562bb6754f9cb153f3bf89504 100644 (file)
@@ -33,9 +33,9 @@
 
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
-        <artifactId>odlparent</artifactId>
+        <artifactId>untested-single-feature-parent</artifactId>
         <version>1.8.0-SNAPSHOT</version>
-        <relativePath>../odlparent</relativePath>
+        <relativePath>../untested-single-feature-parent</relativePath>
     </parent>
 
     <groupId>org.opendaylight.odlparent</groupId>
         <jacoco.skip>true</jacoco.skip>
     </properties>
 
+    <dependencies>
+        <!-- Test the generated features.xml -->
+        <dependency>
+            <groupId>org.opendaylight.odlparent</groupId>
+            <artifactId>features4-test</artifactId>
+            <version>1.8.0-SNAPSHOT</version>
+            <scope>test</scope>
+        </dependency>
+        <!-- Force SLF4J to test scope -->
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+
     <build>
         <plugins>
             <plugin>
-                <!-- This generates the META-INF/maven/dependencies.properties file
-                     which is required by the versionAsInProject() used in SingleFeatureTest -->
-                <groupId>org.apache.servicemix.tooling</groupId>
-                <artifactId>depends-maven-plugin</artifactId>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.karaf.tooling</groupId>
-                <artifactId>karaf-maven-plugin</artifactId>
-                <version>${karaf4.plugin.version}</version>
-                <extensions>true</extensions>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>${maven.surefire.version}</version>
                 <configuration>
-                    <simplifyBundleDependencies>true</simplifyBundleDependencies>
-                    <excludedArtifactIds>
-                        <!-- These artifacts are provided by our Karaf distribution -->
-                        <!-- Aries Blueprint -->
-                        <excludedArtifactId>org.apache.aries.blueprint.api</excludedArtifactId>
-                        <excludedArtifactId>org.apache.aries.blueprint.core</excludedArtifactId>
-                        <!-- Aries Quiesce -->
-                        <excludedArtifactId>org.apache.aries.quiesce.api</excludedArtifactId>
-                        <!-- jline -->
-                        <excludedArtifactId>jline</excludedArtifactId>
-                        <!-- SLF4J -->
-                        <excludedArtifactId>slf4j-api</excludedArtifactId>
-                        <excludedArtifactId>jcl-over-slf4j</excludedArtifactId>
-                        <!-- sshd -->
-                        <excludedArtifactId>sshd-core</excludedArtifactId>
-                        <!-- Karaf artifacts -->
-                        <!-- TODO Rework this once Karaf supports wildcards here -->
-                        <excludedArtifactId>org.apache.karaf.jaas.config</excludedArtifactId>
-                        <excludedArtifactId>org.apache.karaf.jaas.modules</excludedArtifactId>
-                        <excludedArtifactId>org.apache.karaf.shell.console</excludedArtifactId>
-                        <excludedArtifactId>org.apache.karaf.shell.core</excludedArtifactId>
-                        <!-- OSGi -->
-                        <excludedArtifactId>org.osgi.compendium</excludedArtifactId>
-                        <excludedArtifactId>org.osgi.core</excludedArtifactId>
-                        <excludedArtifactId>org.osgi.enterprise</excludedArtifactId>
-                    </excludedArtifactIds>
+                    <dependenciesToScan>
+                        <dependency>org.opendaylight.odlparent:features4-test</dependency>
+                    </dependenciesToScan>
+                    <additionalClasspathElements>
+                        <additionalClasspathElement>${project.build.directory}/feature</additionalClasspathElement>
+                    </additionalClasspathElements>
                 </configuration>
+                <executions>
+                    <execution>
+                        <phase>test</phase>
+                        <goals>
+                            <goal>test</goal>
+                        </goals>
+                    </execution>
+                </executions>
             </plugin>
         </plugins>
     </build>
 
-    <profiles>
-        <profile>
-            <id>sft</id>
-            <activation>
-                <activeByDefault>false</activeByDefault>
-            </activation>
-            <dependencies>
-                <!-- Test the generated features.xml -->
-                <dependency>
-                    <groupId>org.opendaylight.odlparent</groupId>
-                    <artifactId>features4-test</artifactId>
-                    <version>1.8.0-SNAPSHOT</version>
-                    <scope>test</scope>
-                </dependency>
-                <!-- Force SLF4J to test scope -->
-                <dependency>
-                    <groupId>org.slf4j</groupId>
-                    <artifactId>slf4j-api</artifactId>
-                    <scope>test</scope>
-                </dependency>
-            </dependencies>
-            <build>
-                <plugins>
-                    <plugin>
-                        <artifactId>maven-surefire-plugin</artifactId>
-                        <version>${maven.surefire.version}</version>
-                        <configuration>
-                            <dependenciesToScan>
-                                <dependency>org.opendaylight.odlparent:features4-test</dependency>
-                            </dependenciesToScan>
-                            <additionalClasspathElements>
-                                <additionalClasspathElement>${project.build.directory}/feature</additionalClasspathElement>
-                            </additionalClasspathElements>
-                        </configuration>
-                        <executions>
-                            <execution>
-                                <phase>test</phase>
-                                <goals>
-                                    <goal>test</goal>
-                                </goals>
-                            </execution>
-                        </executions>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-    </profiles>
-
     <!--
         Maven Site Configuration
 
         </site>
     </distributionManagement>
 
-</project>
\ No newline at end of file
+</project>
diff --git a/untested-single-feature-parent/pom.xml b/untested-single-feature-parent/pom.xml
new file mode 100644 (file)
index 0000000..c329a5f
--- /dev/null
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2016, 2017 Red Hat, Inc. 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>
+
+    <!--
+         Internal parent for building and packaging single Karaf features *without tests*.
+
+         We need this in odlparent to build features which are used in other parents with tests.
+         Projects outside odlparent shouldn't use this, nor should modules in odlparent which can
+         build with single-feature-parent.
+    -->
+
+    <parent>
+        <groupId>org.opendaylight.odlparent</groupId>
+        <artifactId>odlparent</artifactId>
+        <version>1.8.0-SNAPSHOT</version>
+        <relativePath>../odlparent</relativePath>
+    </parent>
+
+    <groupId>org.opendaylight.odlparent</groupId>
+    <artifactId>untested-single-feature-parent</artifactId>
+    <version>1.8.0-SNAPSHOT</version>
+    <packaging>pom</packaging>
+    <name>ODL :: odlparent :: ${project.artifactId}</name>
+
+    <properties>
+        <karaf.version>${karaf4.version}</karaf.version>
+    </properties>
+
+    <build>
+        <plugins>
+            <plugin>
+                <!-- This generates the META-INF/maven/dependencies.properties file
+                     which is required by the versionAsInProject() used in SingleFeatureTest -->
+                <groupId>org.apache.servicemix.tooling</groupId>
+                <artifactId>depends-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.karaf.tooling</groupId>
+                <artifactId>karaf-maven-plugin</artifactId>
+                <version>${karaf4.plugin.version}</version>
+                <extensions>true</extensions>
+                <configuration>
+                    <simplifyBundleDependencies>true</simplifyBundleDependencies>
+                    <excludedArtifactIds>
+                        <!-- These artifacts are provided by our Karaf distribution -->
+                        <!-- Aries Blueprint -->
+                        <excludedArtifactId>org.apache.aries.blueprint.api</excludedArtifactId>
+                        <excludedArtifactId>org.apache.aries.blueprint.core</excludedArtifactId>
+                        <!-- Aries Quiesce -->
+                        <excludedArtifactId>org.apache.aries.quiesce.api</excludedArtifactId>
+                        <!-- jline -->
+                        <excludedArtifactId>jline</excludedArtifactId>
+                        <!-- SLF4J -->
+                        <excludedArtifactId>slf4j-api</excludedArtifactId>
+                        <excludedArtifactId>jcl-over-slf4j</excludedArtifactId>
+                        <!-- sshd -->
+                        <excludedArtifactId>sshd-core</excludedArtifactId>
+                        <!-- Karaf artifacts -->
+                        <!-- TODO Rework this once Karaf supports wildcards here -->
+                        <excludedArtifactId>org.apache.karaf.jaas.config</excludedArtifactId>
+                        <excludedArtifactId>org.apache.karaf.jaas.modules</excludedArtifactId>
+                        <excludedArtifactId>org.apache.karaf.shell.console</excludedArtifactId>
+                        <excludedArtifactId>org.apache.karaf.shell.core</excludedArtifactId>
+                        <!-- OSGi -->
+                        <excludedArtifactId>org.osgi.compendium</excludedArtifactId>
+                        <excludedArtifactId>org.osgi.core</excludedArtifactId>
+                        <excludedArtifactId>org.osgi.enterprise</excludedArtifactId>
+                    </excludedArtifactIds>
+                </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}/${project.artifactId}/</url>
+
+    <distributionManagement>
+        <site>
+            <id>opendaylight-site</id>
+            <url>${nexus.site.url}/${project.artifactId}/</url>
+        </site>
+    </distributionManagement>
+
+</project>
\ No newline at end of file