The error indicates that the content-package-maven-plugin is unable to parse the response from the AEM Package Manager properly. This issue is common when the plugin expects a specific JSON response format, but the server returns an HTML response instead.
The content-package-maven-plugin version 1.0.6 is outdated. Upgrade to a newer version (e.g., 1.0.8 or later) that may have fixes for response parsing issues:
<plugin>
<groupId>com.day.jcr.vault</groupId>
<artifactId>content-package-maven-plugin</artifactId>
<version>1.0.8</version>
</plugin>
AEM Package Manager can return responses in JSON format. Ensure that the plugin is configured to request JSON responses by adding the jsonResponse parameter:
<configuration>
<jsonResponse>true</jsonResponse>
</configuration>
Check Maven Configuration:
Verify the pom.xml configuration for the plugin. Ensure the correct URL, credentials, and parameters are set:
<plugin>
<groupId>com.day.jcr.vault</groupId>
<artifactId>content-package-maven-plugin</artifactId>
<version>1.0.8</version>
<configuration>
<url>http://localhost:4502/crx/packmgr/service.jsp</url>
<user>admin</user>
<password>admin</password>
<jsonResponse>true</jsonResponse>
</configuration>
</plugin>
Check AEM Logs:
Review the AEM error logs (error.log) for any issues related to the Package Manager or permissions.
Test with CURL:
Use CURL to test the /crx/packmgr/service.jsp endpoint and verify the response format:
curl -u admin:admin -X POST http://localhost:4502/crx/packmgr/service.jsp