You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Oliver B. Fischer" <o....@swe-blog.net> on 2018/09/17 21:53:25 UTC

Differenz between mvn clean install and mvn clean install deploy

Hi all,

I stumbled on a strange problem with Maven. Therefore I would like to 
know if the following commands should have the same result or not:

1. mvn clean install deploy
2. mvn clean deploy

Best,

Oliver


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Differenz between mvn clean install and mvn clean install deploy

Posted by Manfred Moser <ma...@simpligility.com>.
The difference is that the first invocation is just simply wrong. When you call a mvn lifecycle phase it will run through all prior phases. If you specify 2 lifecycle phase from the same lifecycle (the default cycle) .. you run through things twice.. 

E.g. 

mvn install 

runs 

initialize, .. validate ..  compile, .... install

mvn deploy

runs

initialize, .. validate ..  compile, .... install deploy


So when you use

mvn install deploy 

you get

initialize, .. validate ..  compile, .... install .. initialize, .. validate ..  compile, .... install .. deploy

As you can see you duplicate a whole lot of stuff and that lead to confusing results and issues.

So .. just do that and learn more about Maven lifecycle phases and such.. 

Manfred



Oliver B. Fischer wrote on 2018-09-17 14:53:

> Hi all,
> 
> I stumbled on a strange problem with Maven. Therefore I would like to 
> know if the following commands should have the same result or not:
> 
> 1. mvn clean install deploy
> 2. mvn clean deploy
> 
> Best,
> 
> Oliver
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Differenz between mvn clean install and mvn clean install deploy

Posted by "Oliver B. Fischer" <o....@swe-blog.net>.
I thought so too but I have a project where calling mvn clean install 
deploy causes Maven to use wrong paths for some modules. I think I 
should create bug report for this.

Best,
Oliver

Am 18.09.18 um 00:02 schrieb Marco Schulz:
> jupp they have the same result. because. frist both run the clean lifecycle then comes the build lifecycle wich step through all phases. install is defined before deploy. so you don't need to call it when you plan to deploy
> 
> keep in mind deploy is a publishing to a remote repository like nexus. you just see effects when you have the right to deploy artifacts there and they not hurt rhe deploy conventions.
> 
> install is a cipy to your local repository .m2
> 
> regards
> .marco
> 
> Get Outlook for Android<https://aka.ms/ghei36>
> 
> 
> 
> From: Oliver B. Fischer
> Sent: Monday, September 17, 23:53
> Subject: Differenz between mvn clean install and mvn clean install deploy
> To: Maven Users List
> 
> 
> Hi all, I stumbled on a strange problem with Maven. Therefore I would like to know if the following commands should have the same result or not: 1. mvn clean install deploy 2. mvn clean deploy Best, Oliver --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@maven.apache.org For additional commands, e-mail: users-help@maven.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Differenz between mvn clean install and mvn clean install deploy

Posted by Marco Schulz <ma...@outlook.com>.
jupp they have the same result. because. frist both run the clean lifecycle then comes the build lifecycle wich step through all phases. install is defined before deploy. so you don't need to call it when you plan to deploy

keep in mind deploy is a publishing to a remote repository like nexus. you just see effects when you have the right to deploy artifacts there and they not hurt rhe deploy conventions.

install is a cipy to your local repository .m2

regards
.marco

Get Outlook for Android<https://aka.ms/ghei36>



From: Oliver B. Fischer
Sent: Monday, September 17, 23:53
Subject: Differenz between mvn clean install and mvn clean install deploy
To: Maven Users List


Hi all, I stumbled on a strange problem with Maven. Therefore I would like to know if the following commands should have the same result or not: 1. mvn clean install deploy 2. mvn clean deploy Best, Oliver --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@maven.apache.org For additional commands, e-mail: users-help@maven.apache.org