You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2018/01/16 14:11:39 UTC

[sling-initial-content-archetype] branch master updated: SLING-7387 - Update bundle archetypes to use the bnd-maven-plugin

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

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-initial-content-archetype.git


The following commit(s) were added to refs/heads/master by this push:
     new cc04ade  SLING-7387 - Update bundle archetypes to use the bnd-maven-plugin
cc04ade is described below

commit cc04adef8d8814294fd80521149cd775267a7104
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Tue Jan 16 16:11:20 2018 +0200

    SLING-7387 - Update bundle archetypes to use the bnd-maven-plugin
---
 pom.xml                                        |  2 +-
 src/main/resources/archetype-resources/pom.xml | 43 ++++++++++++++++----------
 2 files changed, 28 insertions(+), 17 deletions(-)

diff --git a/pom.xml b/pom.xml
index 134ab62..aba9608 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
         <groupId>org.apache.sling</groupId>
         <artifactId>sling-archetype-parent</artifactId>
         <relativePath />
-        <version>1</version>
+        <version>5-SNAPSHOT</version>
     </parent>
 
     <artifactId>sling-initial-content-archetype</artifactId>
diff --git a/src/main/resources/archetype-resources/pom.xml b/src/main/resources/archetype-resources/pom.xml
index 98a1a2c..e25f8d9 100644
--- a/src/main/resources/archetype-resources/pom.xml
+++ b/src/main/resources/archetype-resources/pom.xml
@@ -21,29 +21,40 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>\${groupId}</groupId>
     <artifactId>\${artifactId}</artifactId>
-    <packaging>bundle</packaging>
     <version>\${version}</version>
     <name>\${artifactId}</name>
     <description>\${groupId} - \${artifactId}</description>
     <build>
         <plugins>
             <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <extensions>true</extensions>
-                <version>${bundleplugin.version}</version>
+                <groupId>biz.aQute.bnd</groupId>
+                <artifactId>bnd-maven-plugin</artifactId>
+                <version>${bndplugin.version}</version>
+                <executions>
+                    <execution>
+                        <id>run-bnd</id>
+                        <goals>
+                            <goal>bnd-process</goal>
+                        </goals>
+                    </execution>
+                </executions>
                 <configuration>
-                    <instructions>
-                        <!-- Stop bnd complaining about unused Private-Package instructions -->
-                        <Private-Package></Private-Package>
-                        <Sling-Nodetypes>
-                            SLING-INF/nodetypes/nodetypes.cnd
-                        </Sling-Nodetypes>
-                        <Sling-Initial-Content>
-                            SLING-INF/scripts;overwrite:=true;uninstall:=true;path:=/apps/my/node,
-                            SLING-INF/content;overwrite:=true;uninstall:=true;path:=/content
-                        </Sling-Initial-Content>
-                    </instructions>
+                    <bnd><![CDATA[
+Sling-Nodetypes: SLING-INF/nodetypes/nodetypes.cnd
+Sling-Initial-Content: \
+  SLING-INF/scripts;overwrite:=true;uninstall:=true;path:=/apps/my/node,\
+  SLING-INF/content;overwrite:=true;uninstall:=true;path:=/content
+                    ]]></bnd>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <version>${jarplugin.version}</version>
+                <configuration>
+                    <archive>
+                        <manifestFile>\${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
+                    </archive>
                 </configuration>
             </plugin>
              <plugin>

-- 
To stop receiving notification emails like this one, please contact
['"commits@sling.apache.org" <co...@sling.apache.org>'].