This is an automated email from the ASF dual-hosted git repository.

heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-dist.git

commit 8e9f33709498eb092e63a2ce2db4a02fbb4dbffb
Author: Alex Heneveld <[email protected]>
AuthorDate: Tue Mar 30 11:56:40 2021 +0100

    use karaf maven plugin to build feature
    
    produces the same feature xml, but in a way that will allow us to make a kar
---
 karaf/features/pom.xml | 88 +++++++++++++++++++++++---------------------------
 1 file changed, 41 insertions(+), 47 deletions(-)

diff --git a/karaf/features/pom.xml b/karaf/features/pom.xml
index c629350..269c425 100644
--- a/karaf/features/pom.xml
+++ b/karaf/features/pom.xml
@@ -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>

Reply via email to