Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Maven install on Publish Instance - AEM 6.1

Lokesh_Shivalingaiah
Community Advisor
Community Advisor

when I try installing a package or a bundle from maven to publish instance, I am seeing a below error

[ERROR] Failed to execute goal org.apache.sling:maven-sling-plugin:2.1.0:install
 (default) on project testsite.core: Installation on http://localhost:4503/crx/r
epository/crx.default/apps/testsite/install/ failed, cause: Installation failed,
 cause: Method Not Allowed -> [Help 1]

where as it works fine if I install it on author instance. 

Note: I have the project and the install folder under /apps

I was able to build the same in AEM 5.6.1. Am I missing anything here ??

1 Accepted Solution
Lokesh_Shivalingaiah
Correct answer by
Community Advisor
Community Advisor

@Jitendra and @Kautuk,

I had already created 'install' folder and it exists in /apps folder as I mentioned in my post.

@kautuk

making <usePut>false</usePut> will use POST and it would again fail for publish instance. 

Instead, I was able to fix this issue by removing the <usePut> tag itself.

View solution in original post

6 Replies
Jitendra_S_Toma
Level 9
Level 9

You can try creating "/apps/testsite/install" manually and then deploy code again.

Jitendra

kautuk_sahni
Community Manager
Community Manager

Hi Lokesh

Please have a look at this community article:-

Case 1:-

    Link:- https://mkbansal.wordpress.com/2013/02/22/abobe-cq5-deployment-error-of-code-mojoexecutionexception/

    Link:- http://stackoverflow.com/questions/23183751/unable-to-deploy-the-osgi-bundle-using-auto-deploy-profi...

    Root cause: This error occurred because build script is trying to deploying the packet under /apps/testsite/install directory which actually do not exists.

    Solution:Create folder named "testsite" & "testsite/install" under "apps". Use CRXDE Light to create folders.

Case 2:- 

    Link:- https://github.com/Adobe-Marketing-Cloud/aem-project-archetype/issues/56

    // Change the maven-sling-plugin configuration to <usePut>false</usePut>, then the bundle install works as expected.

I hope this would help you.

Thanks and Regards

Kautuk Sahni

Lokesh_Shivalingaiah
Correct answer by
Community Advisor
Community Advisor

@Jitendra and @Kautuk,

I had already created 'install' folder and it exists in /apps folder as I mentioned in my post.

@kautuk

making <usePut>false</usePut> will use POST and it would again fail for publish instance. 

Instead, I was able to fix this issue by removing the <usePut> tag itself.

View solution in original post

kautuk_sahni
Community Manager
Community Manager

bsloki wrote...

@Jitendra and @Kautuk,

I had already created 'install' folder and it exists in /apps folder as I mentioned in my post.

@kautuk

making <usePut>false</usePut> will use POST and it would again fail for publish instance. 

Instead, I was able to fix this issue by removing the <usePut> tag itself.

 

Yes, default value of this tag is false. so removing this would also help.

Link:- http://sling.apache.org/site/sling.html#Sling-install

       
usePutfalsesling.usePutIf a simple HTTP PUT should be used instead of the standard POST to the felix console. In the uninstall goal, a HTTP DELETE will be used.

 

Thanks and Regards

Kautuk Sahni