I am trying to have a common bundle deployed to internal central repository.
when I do mvn deploy on aem project it is giving me following error, any ideas?
mvn deploy fails with "installation on http://localhost:4502 ... failed" reason : connection refused
I was under the impression that , mvn deploy do not trigger "install to aem server" but it seems mvn deploy trying to install onto localhost, which does not exist in this case, all i need is to do build and deploy the artifacts to central repository.
Thanks,
Sri
Views
Replies
Total Likes
mvn clean install will only build the projecy
used with a profile like -PautoInstallPackage or -PautoInstallPackagePublish will deploy it.
Is this what you are looking for?
Views
Replies
Total Likes
Great answer - we marked this correct. If you do not have AEM running, then you can build your project by using this command mvn clean install. If you try and use this command - mvn -PautoInstallPublsh Install and you do not have AEM running - then you will get that error.
Let me rephrase my question.
What i want to do is mvn deploy and that should build, deploy artifacts to central nexus repository.
I do not want to trigger install or install with profiles.
This is a foundation project like acs commons used across all other projects as a dependency.
Views
Replies
Total Likes
Then you should create a new maven profile that will push it whenever you've installed the package in your local maven repository and run without the autoInstallPackage(Publish) profile, but with your new created profile.
Views
Replies
Total Likes
When we run 'mvn clean install', there are different plugins that come into action, all defined in pom.xml under the <pluginManagement>; for example maven-clean-plugin, maven-resources-plugin etc.
For your requirement here, you will have to use the maven-deploy plugin, please see details at Apache Maven Deploy Plugin - Introduction.
Its usage can be found at Apache Maven Deploy Plugin - Usage
This way, you wont have to run your command with a profile option and you can have artifacts deployed to your internal remote repository.
Hope this helps!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies