Are the maven-bundle-plugin and content-package-maven-plugin not compatible with newer archtypes compatible with AEM6.5 | Community
Skip to main content
Level 2
January 6, 2021
Solved

Are the maven-bundle-plugin and content-package-maven-plugin not compatible with newer archtypes compatible with AEM6.5

  • January 6, 2021
  • 2 replies
  • 3012 views

When creating an AEM project with new ArcheTypes(version > 22) for AEM 6.5 we see the pom files are getting generated with org.apache.jackrabbit:filevault-package-maven-plugin and biz.aQute.bnd:bnd-maven-plugin. 

If we try to remove org.apache.jackrabbit:filevault-package-maven-plugin from file the build fails.

Is it recommended to use org.apache.jackrabbit:filevault-package-maven-plugin instead of com.day.jcr.vault:content-package-maven-plugin for newer archetypes based project compatible with AEM 6.5 version ?

 

Similarly is biz.aQute.bnd:bnd-maven-plugin recommended to be used instead of org.apache.felix:maven-bundle-plugin for newer archetypes based project compatible with AEM 6.5 version ?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by joerghoh

Technically both the filevault-package-maven-plugin and the content-package-maven-plugin can largely the same work, but the Jackrabbit plugin is currently maintained and developed, but the development of the content-package-maven-plugin got stalled for quite some time now. I would recommend to stick to the filevault-package-maven-plugin, because only that is supported on AEM cloud service.

 

And more or less the same with the bnd-maven-plugin. The maven-bundle-plugin was only a shell around bnd for quite some time, but since bnd provides a maven plugin as well, it's not longer needed.

2 replies

joerghoh
Adobe Employee
joerghohAdobe EmployeeAccepted solution
Adobe Employee
January 8, 2021

Technically both the filevault-package-maven-plugin and the content-package-maven-plugin can largely the same work, but the Jackrabbit plugin is currently maintained and developed, but the development of the content-package-maven-plugin got stalled for quite some time now. I would recommend to stick to the filevault-package-maven-plugin, because only that is supported on AEM cloud service.

 

And more or less the same with the bnd-maven-plugin. The maven-bundle-plugin was only a shell around bnd for quite some time, but since bnd provides a maven plugin as well, it's not longer needed.

January 27, 2021
One more query, the jackrabbit plugin could create package from both source and target folder, but the filevault-package-maven-plugin creates package from source directory only. Is there any way to mention multiple paths to create package from in filevault plugin ?
February 1, 2021

Mainly the maven-bundle-plugin needs to be replaced with bnd-maven-plugin.

 

You do this like this:

 

 

<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> <version>${maven.enforcer.version}</version> <executions> <execution> <id>ban-maven-scr-plugin</id> <goals> <goal>enforce</goal> </goals> <configuration> <rules> <bannedPlugins> <excludes> <exclude>org.apache.felix:maven-scr-plugin</exclude> </excludes> <message>Felix SCR annotations and the maven-scr-plugin are no longer supported - please migrate to OSGi annotations or stick with Sling Parent 29. </message> </bannedPlugins> </rules> </configuration> </execution> <execution> <id>ban-maven-bundle-plugin</id> <goals> <goal>enforce</goal> </goals> <configuration> <rules> <bannedPlugins> <excludes> <exclude>org.apache.felix:maven-bundle-plugin</exclude> </excludes> <message>The maven-bundle-plugin is no longer supported - please migrate to bnd-maven-plugin or stick with Sling Parent 34. </message> </bannedPlugins> </rules> </configuration> </execution> <execution> <id>enforce-java</id> <goals> <goal>enforce</goal> </goals> <configuration> <rules> <!-- Require Java 8 or higher for building (as bnd since version 4.0 only supports Java 8, https://github.com/bndtools/bnd/wiki/Changes-in-4.0.0) --> <requireJavaVersion> <message> Apache Sling must be compiled with Java 8 or higher as the bnd-maven-plugin requires that. </message> <version>1.8.0</version> </requireJavaVersion> </rules> </configuration> </execution> </executions> </plugin> <plugin> <groupId>biz.aQute.bnd</groupId> <artifactId>bnd-maven-plugin</artifactId> <version>${bnd.version}</version> <executions> <execution> <id>bnd-process</id> <goals> <goal>bnd-process</goal> </goals> <configuration> <bnd><![CDATA[ Bundle-SymbolicName: design.aem.aemdesign-aem-services Bundle-Category: design.aem Bundle-Description: ${project.description} Bundle-DocURL: https://aem.design Bundle-License: Apache License, Version 2.0 Bundle-Vendor: AEM.Design Embed-Transitive: true Sling-Model-Packages: design.aem Export-Service: design.aem.workflow.process.* Export-Package: design.aem.*,\ org.jsoup,\ org.jsoup.examples,\ org.jsoup.helper,\ org.jsoup.nodes,\ org.jsoup.parser,\ org.jsoup.safety,\ org.jsoup.select,\ org.apache.commons.jexl3.*,\ org.apache.sling.installer.api.info,\ org.apache.sling.installer.api.tasks,\ com.adobe.acs.commons.fam,\ com.adobe.acs.commons.util,\ com.adobe.acs.commons.workflow,\ com.adobe.acs.commons.util.visitors,\ com.luciad.imageio.webp.*,\ com.github.jai-imageio.*,\ com.github.jaiimageio.* -includeresource:\ lib/jsoup-${jsoup.version}.jar=jsoup-${jsoup.version}.jar;lib:=true,\ lib/gson-${gson.version}.jar=gson-${gson.version}.jar;lib:=true,\ lib/webp-imageio-sejda-${webp.version}.jar=webp-imageio-sejda-${webp.version}.jar;lib:=true,\ lib/jai-imageio-core-${imageio.version}.jar=jai-imageio-core-${imageio.version}.jar;lib:=true # export all versioned packages by default -exportcontents: design.aem.*,\ org.jsoup,\ org.jsoup.examples,\ org.jsoup.helper,\ org.jsoup.nodes,\ org.jsoup.parser,\ org.jsoup.safety,\ org.jsoup.select,\ org.apache.commons.jexl3.*,\ org.apache.sling.installer.api.info,\ org.apache.sling.installer.api.tasks,\ com.adobe.acs.commons.fam,\ com.adobe.acs.commons.util,\ com.adobe.acs.commons.workflow,\ com.adobe.acs.commons.util.visitors,\ com.luciad.imageio.webp.*,\ com.github.jai-imageio.*,\ com.github.jaiimageio.* #-sources: false ]]></bnd> </configuration> </execution> </executions> </plugin>