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>
<artifactId>karaf-maven-plugin</artifactId>
<version>${karaf4.plugin.version}</version>
<extensions>true</extensions>
- <configuration>
- <aggregateFeatures>true</aggregateFeatures>
- </configuration>
</plugin>
</plugins>
</build>
<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>
<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>
<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>
--- /dev/null
+<?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