Use Karaf 4.0.x plugin to preserve JDK 7 compatibility. As the 4.0.x plugin does not have a way to disable the feature generation, don't use the feature packaging, but call all plugins explicitly.
Project: http://git-wip-us.apache.org/repos/asf/jclouds-karaf/repo Commit: http://git-wip-us.apache.org/repos/asf/jclouds-karaf/commit/1d96d88b Tree: http://git-wip-us.apache.org/repos/asf/jclouds-karaf/tree/1d96d88b Diff: http://git-wip-us.apache.org/repos/asf/jclouds-karaf/diff/1d96d88b Branch: refs/heads/master Commit: 1d96d88b672ed1755251580d0e21f0e00504ee5a Parents: 7e7f9ce Author: Guillaume Nodet <[email protected]> Authored: Thu May 11 08:25:50 2017 +0200 Committer: Guillaume Nodet <[email protected]> Committed: Thu May 11 08:27:49 2017 +0200 ---------------------------------------------------------------------- feature-labs/pom.xml | 92 ++++++++---- feature-labs/src/main/feature/feature.xml | 2 +- feature/pom.xml | 188 ++++++++++++++----------- feature/src/main/feature/feature.xml | 6 +- 4 files changed, 179 insertions(+), 109 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/jclouds-karaf/blob/1d96d88b/feature-labs/pom.xml ---------------------------------------------------------------------- diff --git a/feature-labs/pom.xml b/feature-labs/pom.xml index 3d88eac..ae99655 100644 --- a/feature-labs/pom.xml +++ b/feature-labs/pom.xml @@ -29,13 +29,9 @@ limitations under the License. <groupId>org.apache.jclouds.karaf</groupId> <artifactId>jclouds-karaf-labs</artifactId> - <packaging>feature</packaging> + <packaging>pom</packaging> <name>jclouds :: Karaf :: Feature Labs</name> - <properties> - <karaf.plugin.version>4.1.1</karaf.plugin.version> - </properties> - <dependencies> <dependency> <groupId>org.apache.karaf.features</groupId> @@ -47,30 +43,76 @@ limitations under the License. </dependencies> <build> + <resources> + <resource> + <directory>${project.basedir}/src/main/feature</directory> + <filtering>true</filtering> + <targetPath>${project.build.directory}/feature</targetPath> + </resource> + </resources> <plugins> <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-resources-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>resources</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <version>${build-helper-maven-plugin.version}</version> + <executions> + <execution> + <id>attach-feature</id> + <phase>package</phase> + <goals> + <goal>attach-artifact</goal> + </goals> + <configuration> + <artifacts> + <artifact> + <file>target/feature/feature.xml</file> + <classifier>features</classifier> + <type>xml</type> + </artifact> + </artifacts> + </configuration> + </execution> + </executions> + </plugin> + <plugin> <groupId>org.apache.karaf.tooling</groupId> <artifactId>karaf-maven-plugin</artifactId> - <version>${karaf.plugin.version}</version> - <extensions>true</extensions> - <configuration> - <descriptors> - <descriptor>mvn:org.apache.karaf.features/framework/${karaf.version}/xml/features</descriptor> - <descriptor>mvn:org.apache.karaf.features/standard/${karaf.version}/xml/features</descriptor> - <descriptor>file:${project.build.directory}/feature/feature.xml</descriptor> - </descriptors> - <distribution>org.apache.karaf.features:framework</distribution> - <javase>1.8</javase> - <framework> - <feature>framework</feature> - <feature>shell-compat</feature> - </framework> - <features> - jclouds* - </features> - <verifyTransitive>false</verifyTransitive> - <enableGeneration>false</enableGeneration> - </configuration> + <version>${karaf.version}</version> + <executions> + <execution> + <id>verify</id> + <phase>process-resources</phase> + <goals> + <goal>verify</goal> + </goals> + <configuration> + <descriptors> + <descriptor>mvn:org.apache.karaf.features/framework/${karaf.version}/xml/features</descriptor> + <descriptor>mvn:org.apache.karaf.features/standard/${karaf.version}/xml/features</descriptor> + <descriptor>file:${project.build.directory}/feature/feature.xml</descriptor> + </descriptors> + <distribution>org.apache.karaf.features:framework</distribution> + <javase>1.7</javase> + <framework> + <feature>framework</feature> + </framework> + <features> + <feature>jclouds*</feature> + </features> + </configuration> + </execution> + </executions> </plugin> </plugins> </build> http://git-wip-us.apache.org/repos/asf/jclouds-karaf/blob/1d96d88b/feature-labs/src/main/feature/feature.xml ---------------------------------------------------------------------- diff --git a/feature-labs/src/main/feature/feature.xml b/feature-labs/src/main/feature/feature.xml index 346e00a..e78d927 100644 --- a/feature-labs/src/main/feature/feature.xml +++ b/feature-labs/src/main/feature/feature.xml @@ -15,7 +15,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> -<features name="jclouds-labs-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.0.0"> +<features name="jclouds-labs-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.3.0"> <repository>mvn:org.apache.jclouds.karaf/jclouds-karaf/${jclouds.version}/xml/features</repository> <feature name='jclouds-labs-all-blobstore' description='jclouds-labs - all - macro feature to bundle all blobstores' version='${project.version}'> http://git-wip-us.apache.org/repos/asf/jclouds-karaf/blob/1d96d88b/feature/pom.xml ---------------------------------------------------------------------- diff --git a/feature/pom.xml b/feature/pom.xml index 1163554..7c30988 100644 --- a/feature/pom.xml +++ b/feature/pom.xml @@ -15,88 +15,114 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> -<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> - <artifactId>jclouds-karaf</artifactId> - <groupId>org.apache.jclouds</groupId> - <version>2.1.0-SNAPSHOT</version> - <relativePath>..</relativePath> - </parent> - <modelVersion>4.0.0</modelVersion> - - <groupId>org.apache.jclouds.karaf</groupId> - <artifactId>jclouds-karaf</artifactId> - <packaging>feature</packaging> - <name>jclouds :: Karaf :: Feature</name> +<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> + <artifactId>jclouds-karaf</artifactId> + <groupId>org.apache.jclouds</groupId> + <version>2.1.0-SNAPSHOT</version> + <relativePath>..</relativePath> + </parent> + <modelVersion>4.0.0</modelVersion> - <properties> - <karaf.plugin.version>4.1.1</karaf.plugin.version> - </properties> + <groupId>org.apache.jclouds.karaf</groupId> + <artifactId>jclouds-karaf</artifactId> + <packaging>pom</packaging> + <name>jclouds :: Karaf :: Feature</name> - <dependencies> - <dependency> - <groupId>org.apache.karaf.features</groupId> - <artifactId>framework</artifactId> - <version>${karaf.version}</version> - <type>kar</type> - <scope>provided</scope> - </dependency> - </dependencies> + <dependencies> + <dependency> + <groupId>org.apache.karaf.features</groupId> + <artifactId>framework</artifactId> + <version>${karaf.version}</version> + <type>kar</type> + <scope>provided</scope> + </dependency> + </dependencies> - <build> - <plugins> - <!-- Attaches config files referenced in feature.xml (mvn protocol) as artifacts --> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - <version>${build-helper-maven-plugin.version}</version> - <executions> - <execution> - <id>attach-feature-config</id> - <phase>package</phase> - <goals> - <goal>attach-artifact</goal> - </goals> - <configuration> - <artifacts> - <artifact> - <file>src/main/resources/credentials.cfg</file> - <type>cfg</type> - <classifier>credentials</classifier> - </artifact> - <artifact> - <file>src/main/resources/shell.cfg</file> - <type>cfg</type> - <classifier>shell</classifier> - </artifact> - </artifacts> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.karaf.tooling</groupId> - <artifactId>karaf-maven-plugin</artifactId> - <version>${karaf.plugin.version}</version> - <extensions>true</extensions> - <configuration> - <descriptors> - <descriptor>mvn:org.apache.karaf.features/framework/${karaf.version}/xml/features</descriptor> - <descriptor>mvn:org.apache.karaf.features/standard/${karaf.version}/xml/features</descriptor> - <descriptor>file:${project.build.directory}/feature/feature.xml</descriptor> - </descriptors> - <distribution>org.apache.karaf.features:framework</distribution> - <javase>1.8</javase> - <framework> - <feature>framework</feature> - <feature>shell-compat</feature> - </framework> - <features> - jclouds* - </features> - <enableGeneration>false</enableGeneration> - </configuration> - </plugin> - </plugins> - </build> + <build> + <resources> + <resource> + <directory>${project.basedir}/src/main/feature</directory> + <filtering>true</filtering> + <targetPath>${project.build.directory}/feature</targetPath> + </resource> + </resources> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-resources-plugin</artifactId> + <executions> + <execution> + <goals> + <goal>resources</goal> + </goals> + </execution> + </executions> + </plugin> + <!-- Attaches config files referenced in feature.xml (mvn protocol) as artifacts --> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <version>${build-helper-maven-plugin.version}</version> + <executions> + <execution> + <id>attach-feature-config</id> + <phase>package</phase> + <goals> + <goal>attach-artifact</goal> + </goals> + <configuration> + <artifacts> + <artifact> + <file>src/main/resources/credentials.cfg</file> + <type>cfg</type> + <classifier>credentials</classifier> + </artifact> + <artifact> + <file>src/main/resources/shell.cfg</file> + <type>cfg</type> + <classifier>shell</classifier> + </artifact> + <artifact> + <file>target/feature/feature.xml</file> + <classifier>features</classifier> + <type>xml</type> + </artifact> + </artifacts> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.karaf.tooling</groupId> + <artifactId>karaf-maven-plugin</artifactId> + <version>${karaf.version}</version> + <executions> + <execution> + <id>verify</id> + <phase>process-resources</phase> + <goals> + <goal>verify</goal> + </goals> + <configuration> + <descriptors> + <descriptor>mvn:org.apache.karaf.features/framework/${karaf.version}/xml/features</descriptor> + <descriptor>mvn:org.apache.karaf.features/standard/${karaf.version}/xml/features</descriptor> + <descriptor>file:${project.build.directory}/feature/feature.xml</descriptor> + </descriptors> + <distribution>org.apache.karaf.features:framework</distribution> + <javase>1.7</javase> + <framework> + <feature>framework</feature> + </framework> + <features> + <feature>jclouds*</feature> + </features> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> </project> http://git-wip-us.apache.org/repos/asf/jclouds-karaf/blob/1d96d88b/feature/src/main/feature/feature.xml ---------------------------------------------------------------------- diff --git a/feature/src/main/feature/feature.xml b/feature/src/main/feature/feature.xml index cedefa0..6dc2050 100644 --- a/feature/src/main/feature/feature.xml +++ b/feature/src/main/feature/feature.xml @@ -15,7 +15,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> -<features name="jclouds-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.0.0"> +<features name="jclouds-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.3.0"> <feature name='jclouds-all-blobstore' description='jclouds - all - macro feature to bundle all blobstores' version='${project.version}'> <feature version='${project.version}'>jclouds-api-s3</feature> @@ -558,6 +558,7 @@ limitations under the License. <!-- SERVICES --> <feature name="jclouds-services" description="OSGi Service Factories for jclouds" version="${project.version}"> <configfile finalname="${karaf.etc}/org.apache.jclouds.credentials.cfg">mvn:org.apache.jclouds.karaf/jclouds-karaf/${project.version}/cfg/credentials</configfile> + <feature>aries-blueprint</feature> <feature version='${project.version}'>jclouds-compute</feature> <feature version='${project.version}'>jclouds-blobstore</feature> <bundle dependency='true'>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jsch/${jsch.bundle.version}</bundle> @@ -580,6 +581,7 @@ limitations under the License. <feature name="jclouds-commands" description="Karaf Commands for jclouds" version="${project.version}"> <configfile finalname="/etc/org.apache.jclouds.shell.cfg">mvn:org.apache.jclouds.karaf/jclouds-karaf/${project.version}/cfg/shell</configfile> + <feature>shell-compat</feature> <feature version='${project.version}'>jclouds-services</feature> <bundle dependency="true">mvn:org.codehaus.groovy/groovy/${groovy.version}</bundle> <bundle dependency="true">mvn:org.codehaus.groovy/groovy-jsr223/${groovy.version}</bundle> @@ -598,7 +600,7 @@ limitations under the License. </feature> <feature name="jclouds-url-handler" description="Url Handler for jclouds Blobs" version="${project.version}"> - <feature version='${project.version}'>jclouds</feature> + <feature>aries-blueprint</feature> <feature version='${project.version}'>jclouds-services</feature> <bundle>mvn:org.apache.jclouds.karaf/urlhandler/${project.version}</bundle> </feature>
