AEM 6.3 Code deployment to Remote Server

Avatar

Avatar

narayanank84409

Avatar

narayanank84409

narayanank84409

05-10-2017

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.

Replies

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K
smacdonald2008

05-10-2017

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

Avatar

narayanank84409

Avatar

narayanank84409

narayanank84409

05-10-2017

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

Avatar

Jörg_Hoh

Employee

Total Posts

3.1K

Likes

1.1K

Correct Reply

1.1K

Avatar

Jörg_Hoh

Employee

Total Posts

3.1K

Likes

1.1K

Correct Reply

1.1K
Jörg_Hoh
Employee

05-10-2017

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