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

mvn deploy fails with "installation on http://localhost:4502 ... failed" reason : connection refused

Avatar

Avatar
Validate 10
Level 4
sreenu539
Level 4

Likes

7 likes

Total Posts

158 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 20
View profile

Avatar
Validate 10
Level 4
sreenu539
Level 4

Likes

7 likes

Total Posts

158 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 20
View profile
sreenu539
Level 4

23-03-2018

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

Replies

Avatar

Avatar
Validate 1
Level 4
Rima_Mittal
Level 4

Likes

30 likes

Total Posts

82 posts

Correct Reply

17 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Validate 1
Level 4
Rima_Mittal
Level 4

Likes

30 likes

Total Posts

82 posts

Correct Reply

17 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
Rima_Mittal
Level 4

23-03-2018

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?

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

23-03-2018

@Rima Mittal -

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.

Avatar

Avatar
Validate 10
Level 4
sreenu539
Level 4

Likes

7 likes

Total Posts

158 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 20
View profile

Avatar
Validate 10
Level 4
sreenu539
Level 4

Likes

7 likes

Total Posts

158 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 20
View profile
sreenu539
Level 4

23-03-2018

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.

Avatar

Avatar
Validate 1
Level 2
dylanr72808383
Level 2

Likes

3 likes

Total Posts

18 posts

Correct Reply

3 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 3
Affirm 1
View profile

Avatar
Validate 1
Level 2
dylanr72808383
Level 2

Likes

3 likes

Total Posts

18 posts

Correct Reply

3 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 3
Affirm 1
View profile
dylanr72808383
Level 2

26-03-2018

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.

Avatar

Avatar
Validate 1
Level 4
Rima_Mittal
Level 4

Likes

30 likes

Total Posts

82 posts

Correct Reply

17 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Validate 1
Level 4
Rima_Mittal
Level 4

Likes

30 likes

Total Posts

82 posts

Correct Reply

17 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
Rima_Mittal
Level 4

26-03-2018

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!