Skip to content
Permalink
Browse files
use karaf maven plugin to build feature
produces the same feature xml, but in a way that will allow us to make a kar
  • Loading branch information
ahgittin committed Mar 30, 2021
1 parent f758e1b commit 8e9f33709498eb092e63a2ce2db4a02fbb4dbffb
Showing 1 changed file with 41 additions and 47 deletions.
@@ -31,7 +31,7 @@
<artifactId>brooklyn-dist-features</artifactId>
<name>Brooklyn Dist Karaf Features</name>
<description>Defines Karaf features for Karaf runtime</description>
<packaging>pom</packaging>
<packaging>feature</packaging>

<dependencies>
<dependency>
@@ -55,59 +55,53 @@
<classifier>features</classifier>
<type>xml</type>
</dependency>

<dependency>
<groupId>org.apache.karaf.features</groupId>
<artifactId>standard</artifactId>
<classifier>features</classifier>
<version>${karaf.version}</version>
<type>xml</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.karaf.features</groupId>
<artifactId>enterprise</artifactId>
<classifier>features</classifier>
<version>${karaf.version}</version>
<type>xml</type>
<scope>runtime</scope>
<exclusions>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-osgi</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>


<build>
<resources>
<resource>
<directory>src/main/feature</directory>
<filtering>true</filtering>
<includes>
<include>**/*</include>
</includes>
</resource>
</resources>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>karaf-maven-plugin</artifactId>
<version>${karaf.plugin.version}</version>
<extensions>true</extensions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>karaf-maven-plugin</artifactId>
<configuration>
<useDefaultDelimiters>false</useDefaultDelimiters>
<delimiters>
<delimiter>${*}</delimiter>
</delimiters>
<aggregateFeatures>true</aggregateFeatures>
<includeTransitiveDependency>false</includeTransitiveDependency>
<startLevel>50</startLevel>
<resolver>(obr)</resolver>
</configuration>
<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>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>target/classes/feature.xml</file>
<classifier>features</classifier>
<type>xml</type>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

0 comments on commit 8e9f337

Please sign in to comment.