Trying to compile a app build on AEM 6.3 created with old archetype template. Initially it showing error for <groupId>com.day.jcr.vault</groupId><artifactId>content-package-maven-plugin</artifactId> since the version was 0.5.1 so I updated it to 1.0.4 but now it show error on <packaging> tag of application module pom on below section.
When I hover over the <packaging> tag below description in VSCode IDE.
<packaging>
The type of artifact this project produces, for example jar war ear pom. Plugins can create their own packaging, and therefore their own packaging types, so this list does not contain all possible types.
I did google and it only show for mismatch dependency version but could not find which dependency is causing <packaging> tag issue.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hello @maddy_23 ,
You’re seeing that because Maven (and the VS Code Maven extension) can’t find the plugin that defines the custom packaging type content-package. In AEM projects, that packaging is provided by the FileVault/Content Package plugin. If the plugin isn’t on the build with <extensions>true</extensions> (or the repo isn’t reachable), the IDE will say only jar/war/ear/pom are valid.
You can use Old Adobe plugin (matches older 6.3 archetypes):
<build>
<plugins>
<plugin>
<groupId>com.day.jcr.vault</groupId>
<artifactId>content-package-maven-plugin</artifactId>
<version>0.0.24</version> <!-- or the version your project originally used -->
<extensions>true</extensions>
</plugin>
</plugins>
</build>
<!-- Make sure the Adobe repo is declared so Maven can resolve this plugin -->
<pluginRepositories>
<pluginRepository>
<id>adobe-public-releases</id>
<url>https://repo.adobe.com/nexus/content/groups/public/</url>
</pluginRepository>
</pluginRepositories>
Views
Replies
Total Likes
Hi @maddy_23,
could you also share the mvn output that contains the error? I believe the pom.xml would also be helpful for troubleshooting.
Views
Replies
Total Likes
@giuseppebaglio here are the error I am getting.
First I got error for com.day.jcr.vault (version 0.5.1), which I updated to 1.0.4. the the next I got error on <packaging> tag.
Error 1: -
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Unresolveable build extension: Plugin com.day.jcr.vault:content-package-maven-plugin:0.5.1 or one of its dependencies could not be resolved:
Failed to read artifact descriptor for com.day.jcr.vault:content-package-maven-plugin:jar:0.5.1
@
[ERROR] Unknown packaging: bundle @ line 13, column 18
[ERROR] Unresolveable build extension: Plugin com.day.jcr.vault:content-package-maven-plugin:0.5.1 or one of its dependencies could not be resolved:
Failed to read artifact descriptor for com.day.jcr.vault:content-package-maven-plugin:jar:0.5.1
@
[ERROR] Unknown packaging: content-package @ line 21, column 13
Error 2 :-
[ERROR] Unknown packaging: content-package @ line 21, column 13
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
Views
Replies
Total Likes
the plugin content-package-maven-plugin at version 1.0.4 no longer handles the content-package packaging type, which is why Maven doesn't recognize it.
Add filevault-package-maven-plugin (for building content packages):
<plugin>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>filevault-package-maven-plugin</artifactId>
<version>1.0.4</version>
<extensions>true</extensions>
</plugin>Keep content-package-maven-plugin (for deployment to AEM):
<plugin>
<groupId>com.day.jcr.vault</groupId>
<artifactId>content-package-maven-plugin</artifactId>
<version>1.0.4</version>
<!-- Note: Do NOT add <extensions>true</extensions> here -->
</plugin>
For the "Unknown packaging: bundle" error, you need to add the maven-bundle-plugin to your parent POM or the specific module's POM:
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.3.0</version>
<extensions>true</extensions>
</plugin>
<profile>
<id>adobe-public</id>
<repositories>
<repository>
<id>adobe-public-releases</id>
<name>Adobe Public Repository</name>
<url>https://repo.adobe.com/nexus/content/groups/public</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>adobe-public-releases</id>
<name>Adobe Public Repository</name>
<url>https://repo.adobe.com/nexus/content/groups/public</url>
</pluginRepository>
</pluginRepositories>
</profile>Views
Replies
Total Likes
Hi @giuseppebaglio, Thank you for your input.
<artifactId>maven-bundle-plugin</artifactId>
already there in parent pom, I tried updating version from 2.3.4 to 3.3.0, but did not worked. The profile also exist.
Views
Replies
Total Likes
Hello @maddy_23 ,
You’re seeing that because Maven (and the VS Code Maven extension) can’t find the plugin that defines the custom packaging type content-package. In AEM projects, that packaging is provided by the FileVault/Content Package plugin. If the plugin isn’t on the build with <extensions>true</extensions> (or the repo isn’t reachable), the IDE will say only jar/war/ear/pom are valid.
You can use Old Adobe plugin (matches older 6.3 archetypes):
<build>
<plugins>
<plugin>
<groupId>com.day.jcr.vault</groupId>
<artifactId>content-package-maven-plugin</artifactId>
<version>0.0.24</version> <!-- or the version your project originally used -->
<extensions>true</extensions>
</plugin>
</plugins>
</build>
<!-- Make sure the Adobe repo is declared so Maven can resolve this plugin -->
<pluginRepositories>
<pluginRepository>
<id>adobe-public-releases</id>
<url>https://repo.adobe.com/nexus/content/groups/public/</url>
</pluginRepository>
</pluginRepositories>
Views
Replies
Total Likes
Hi @ManviSharma, I tried adding <extensions>true</extensions> but still error is there. I get same error for both 0.5.1 and new 1.0.4 content-package-maven-plugin versions.
Views
Replies
Total Likes
myapp.apps/pom.xml (copy/paste):
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.example</groupId>
<artifactId>myapp</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>myapp.apps</artifactId>
<packaging>content-package</packaging>
<name>myapp - Apps</name>
<build>
<plugins>
<plugin>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>filevault-package-maven-plugin</artifactId>
<version>1.3.8</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
</project>
------------------------------------------------------
-> If it still errors, paste the output of:
mvn -v
mvn -X -U clean package
Views
Replies
Total Likes
Hi @ManviSharma, Thank you for your input.
I am using Maven 3.9.9, I get same error after running the clean package command.
[ERROR] The build could not read 1 project -> [Help 1]
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[ERROR] Unknown packaging: content-package @ line 21, column 13
Views
Replies
Total Likes