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

AEM 6.3 Code deployment to Remote Server

narayanank84409
Level 4
Level 4

Am trying to push my local code to remote Server, In my pom.xml I gave HostName,PortNumber, username and password (dynamic ) from maven command line arguments, in that time am getting error Un-authorized to hit the server, If i gave hardcode username and password in my pom.xml i can able to deploy my code in remote server, How i can get rid of Hardcoded value and pass as arguments in Command line.

We set up the bamboo job to deploy our code in remote server, still bamboo is throwing Un-authorized error.

Command am using : mvn clean install -PautoInstallDevPackage -U -Daem.host=HostName -Daem.port=PortNumber -DUserName=UserName -Dpassword=Password (Created profile for autoInstallDevPackage in my parent pom.xml)

Suggestions are most welcome.

0 Replies
smacdonald2008
Level 10
Level 10

Does that Maven command work?

Command am using : mvn clean install -PautoInstallDevPackage -U -Daem.host=HostName -Daem.port=PortNumber -DUserName=UserName -Dpassword=Password (Created profile for autoInstallDevPackage in my parent pom.xml)

I have always used hard coded values myself.

narayanank84409
Level 4
Level 4

Nope maven command is not working,   If i hardcode username and password in my parent pom.xml and if i use mvn clean install -PautoInstallDevPackage its deploying to remote server

Jörg_Hoh
Employee
Employee

What archetype have you used?

Typically the content-package-maven-plugin (which does this job) is parametrized through maven properties. And you can overwrite each of these properties by giving them as command line parameters to maven.

mvn clean install -PautoInstallDevPackage -Dcrx.port=4506

(if the property crx.port is used in the content-package-maven-plugin to provide the port).

kind regards,
Jörg