On 12-02-22 08:11 PM, Chas Emerick wrote:
I am working on a Clojure facade for Aether,[1] and would like to clarify some 
semantics.  Though I'm working with Aether, I think this question is generally 
applicable for all Maven tools…but let me know if I should simply bounce to the 
Aether ML.

In short, I'd like to know what the functional differences are between the 
install and deploy operations, and whether the latter safely supersets the 
former.

I know that 'install' is intended for local file-based repositories, and 
'deploy' is for remote repositories using any of a half-dozen well-known 
transports.  I can readily see that installs produce a slightly different set 
of files and metadata than deploying to the same local file repository; 
however, those differences do not seem to affect the resolution of dependencies 
in any way.

I presume there must be some subtle ways in which 'install' must remain a 
distinct operation with its own semantics, but I've not discovered them (and 
I've not found any documentation which points the way, official or otherwise).  
Without knowing this, it seems like there's no reason for 'install' to exist at 
all, insofar as it seems you just use 'deploy' to push artifacts into a 
file-based repository and successfully use the results.

Thanks,

- Chas

[1] https://github.com/cemerick/pomegranate

The main difference is probably that install installs the artifacts in the local repository of the user. This is normally .m2/repository. This local repository is different for each user and will be created when Maven is first run and be populated with the plugins and whatever else comes down as dependencies required for the Maven invocations. This is all done by the install plugin

Deploy on the other hand deploys to a repository as defined in the pom. Without that repository defined the deployment will not work. Typically this is done together with username/password in settings.xml and the target is a repository server like nexus. That server in terms is accessed by other developers in with access as well as CI servers and so on. Once a artifact is deployed to a repo it does not need to be built locally by developer because a team member or ci server made it available on the repo server. All this is done by the deploy plugin.

So there are distinct differences and the goals/lifecycle phases serve different purposes. As such I think you should not collapse them..

manfred
http://simpligility.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to