Hi Team,
I am facing an issue during the Maven build and installation of an AEM package to my local instance.
The build completes successfully for all modules, but the All-in-one package fails during the installation step.
Environment:
AEM Version: (add your version, e.g., AEM 6.5.20 or AEM Cloud SDK)
Java Version: (example: Java 11)
Maven Version: (example: Maven 3.8.8)
OS: (Windows 10 / macOS, etc.)
Local AEM running on: http://localhost:4502
Full Error Snippet:
Request to http://localhost:4502/crx/packmgr/service.jsp failed, response=Moved Permanently
...
Error while installing package. Check log for details.
Views
Replies
Total Likes
The error may occur because Maven is attempting to use system or IDE proxy settings when connecting to http://localhost:4502/crx/packmgr/service.jsp, which causes the request to be redirected (HTTP 301) instead of being processed directly by your local AEM instance.
Try to disable proxy usage for the content package plugin in your POM file. Add the following configuration to your content-package-maven-plugin or filevault-package-maven-plugin section: <useProxy>false</useProxy>
content-package-maven-plugin:
<plugin>
<groupId>com.day.jcr.vault</groupId>
<artifactId>content-package-maven-plugin</artifactId>
<configuration>
<targetURL>http://${aem.host}:${aem.port}/crx/packmgr/service.jsp</targetURL>
<username>${vault.user}</username>
<password>${vault.password}</password>
<useProxy>false</useProxy>
</configuration>
</plugin><plugin>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>filevault-package-maven-plugin</artifactId>
<configuration>
<serviceURL>http://${aem.host}:${aem.port}/crx/packmgr/service.jsp</serviceURL>
<userId>${vault.user}</userId>
<password>${vault.password}</password>
<useProxy>false</useProxy>
</configuration>
</plugin>
If you require proxy configuration for external repositories but not for localhost, update your Maven settings.xml to exclude localhost from proxy routing:
<proxies>
<proxy>
<id>corporate-proxy</id>
<active>true</active>
<protocol>http</protocol>
<host>proxy.company.com</host>
<port>8080</port>
<nonProxyHosts>localhost|127.0.0.1|*.local</nonProxyHosts>
</proxy>
</proxies>The nonProxyHosts element ensures local connections bypass the proxy.
Views
Replies
Total Likes
Hi @giuseppebaglio
[ERROR] Some problems were encountered while processing the POMs:
“Unrecognised tag: 'useProxy'” in AEM All Package POM
Malformed POM ... Unrecognised tag: 'useProxy' (position: START_TAG seen ...</extensions><useProxy>... )
Views
Replies
Total Likes
It appears from the error message that the <useProxy> tag is placed after the </extensions> tag, which is incorrect. The tag must be placed under the <configuration> tag of the <plugin>. Please have a look at my previous examples on how to use <useProxy>.
Views
Replies
Total Likes
Views
Likes
Replies