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
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

AEM 6.4 Code deployment to Remote Server

Jeanmaradiaga
Level 3
Level 3

If I have a remote server with AEM installed can I push my current code with something as simple as:

mvn clean install -PautoInstallDevPackage -U -Daem.host=test-author.dev.com -Daem.port=4502 -DUserName=admin-Dpassword=admin

 Or do I need to use cURL? POM? I haven't been able to find much information on how I can push my local changes to a remove server for some reason.

1 Accepted Solution
Singaiah_Chintalapudi
Correct answer by
Community Advisor
Community Advisor

Yes, this is one of the way.

mvn clean install -PautoInstallPackage -Daem.host=test-author.dev.com -Daem.port=4502 -Daem.author.user=admin -Daem.author.password=admin

 

View solution in original post

10 Replies
Singaiah_Chintalapudi
Correct answer by
Community Advisor
Community Advisor

Yes, this is one of the way.

mvn clean install -PautoInstallPackage -Daem.host=test-author.dev.com -Daem.port=4502 -Daem.author.user=admin -Daem.author.password=admin

 

View solution in original post

kishorekumar14
Level 8
Level 8

yes using the mvn command line and providing system properties to it would be the sufficient to build to remote server without touching a code. If we make a changes in POM.xml and sometimes if we forget to revert it, it may create an unwanted issue.

BrianKasingli
Community Advisor
Community Advisor

@Jeanmaradiaga,

Your maven command looks correct; can you share with us your error messages please?

Jeanmaradiaga
Level 3
Level 3

@BrianKasingli 

 

 The requested profile "autoInstallDevPackage" could not be activated because it does not exist.
[ERROR] Failed to execute goal com.day.jcr.vault:content-package-maven-plugin:0.5.24:install (install-package) on project com.bla.bla.config: The host did not accept the connection within timeout of 5000 ms: connect timed out -> [Help 1]
Jeanmaradiaga
Level 3
Level 3

Or with the following command:

clean install -PautoInstallBundle -U -Daem.host=blabla.com -Daem.port=4502 -DUserName=admin -Dpassword=admin

I get:

ERROR] [ERROR] Some problems were encountered while processing the POMs:
[WARNING] 'version' contains an expression but should be a constant. @ com..:${app.version}, C:\blabla\pom.xml, line 22, column 14
[WARNING] 'version' contains an expression but should be a constant. @ com..:${app.version}, C:\blabla\pom.xml, line 22, column 14
[ERROR] Unresolveable build extension: Plugin com.day.jcr.vault:content-package-maven-plugin:0.5.24 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.day.jcr.vault:content-package-maven-plugin:jar:0.5.24 @ 

 

BrianKasingli
Community Advisor
Community Advisor

now this error says that your <version> XML in column 14, contains an expression, and requires a constant like "1.0.0-SNAPSHOT".

[ERROR] Unresolveable build extension: Plugin com.day.jcr.vault:content-package-maven-plugin:0.5.24 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.day.jcr.vault:content-package-maven-plugin:jar:0.5.24  - exactly like what the error message says, Failed to read artifact descriptor for com.day.jcr.vault:content-package-maven-plugin:jar:0.5.24

BrianKasingli
Community Advisor
Community Advisor

Does your code even build to locally? 

 

 

mvn clean install ?

Jeanmaradiaga
Level 3
Level 3

Yes it does, it is importing it to a remote server the only issue I am having right now.

BrianKasingli
Community Advisor
Community Advisor

in your pom.xml, the user profile "autoInstallDevPackage" does not exist. as mentioned in the error message. You might need to take a deeper look at the maven build profiles, and determine which correct profile to run.

Jeanmaradiaga
Level 3
Level 3

True, thanks. I tried with

install -PautoInstallPackage -Daem.host=test.bla.com -Daem.port=4502 -Daem.author.user=admin -Daem.author.password=admin

 Which is the one we use locally and it throws a timeout error instead. Perhaps my IP needs to be whitelisted in the server. Here is the error:

[ERROR] Unresolveable build extension: Plugin com.day.jcr.vault:content-package-maven-plugin:0.5.24 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.day.jcr.vault:content-package-maven-plugin:jar:0.5.24 @