Expand my Community achievements bar.

AEM 6.3 Code deployment to Remote Server

Avatar

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.

3 Replies

Avatar

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.

Avatar

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

Avatar

Employee Advisor

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