You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Chas Emerick <ch...@cemerick.com> on 2012/02/23 05:11:35 UTC
Functional distinction between install and deploy operations
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
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Functional distinction between install and deploy operations
Posted by Chas Emerick <ch...@cemerick.com>.
Yeah, I'll post over there shortly.
However, while Aether is the now-canonical implementation of these operations, many other tools exist (and will exist) that create, update, and access Apache Maven repository data. It seems like having well-defined semantics for such things separate from any particular implementation or API would be desirable.
Cheers,
- Chas
On Feb 23, 2012, at 9:53 AM, Vincent Latombe wrote:
> In my opinion you'll get more relevant answers on the Aether ML.
>
> Vincent
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Functional distinction between install and deploy operations
Posted by Vincent Latombe <vi...@gmail.com>.
In my opinion you'll get more relevant answers on the Aether ML.
Vincent
2012/2/23 Chas Emerick <ch...@cemerick.com>
> As I said, I'm building a Clojure library on top of Aether, so the notions
> of goals and lifecycles and plugins are nowhere to be found.
>
> By "'deploy' operation", I mean the operation implemented by e.g.
> RepositorySystem.deploy in Aether, or the same operation implemented in the
> maven-ant-tasks, or in whatever was the underpinning of Maven 2.x.
> Likewise for "'install' operation".
>
> It seems odd to me that all of the responses so far have been referring to
> userland concepts, rather than the semantics of the fundamental operations
> implemented by those libraries/APIs...
>
> - Chas
>
> On Feb 23, 2012, at 8:24 AM, Thiessen, Todd (Todd) wrote:
>
> > Interesting thread, although I find it a big confusing. Are you using
> the deploy goal, not lifecycle, to deploy artifacts to your local
> repository? What do you mean by "'deploy' operation"? Are you actually
> using the deploy plugin?
> >
> > Your comment about them not being documented well I also find a bit
> confusing. The deploy and install plugins are both documented quite well.
> But I don't think you are referring to the plugin. I think you mean
> something else when you say "deploy operation".
> >
> >> -----Original Message-----
> >> From: Chas Emerick [mailto:chas@cemerick.com]
> >> Sent: Thursday, February 23, 2012 7:38 AM
> >> To: Maven Developers List
> >> Subject: Re: Functional distinction between install and deploy
> >> operations
> >>
> >>
> >> On Feb 23, 2012, at 1:01 AM, Chris Graham wrote:
> >>
> >>> Remember that 'deploy' still calls 'install'.
> >>
> >> Very true for `mvn`. Not true in Aether; this would seem to be a
> >> userland tool convention, and not a fundamental characteristic of the
> >> 'deploy' operation.
> >>
> >> However, even Aether leaves some resolver-status and metadata files in
> >> the local repository after completing a 'deploy'...although I can't
> >> determine the significance of them.
> >>
> >> One thing I've discovered is that an installed SNAPSHOT will always
> >> take precedence over SNAPSHOTs from remote repositories, whereas this
> >> is not the case for SNAPSHOTs that are deployed to a local repository.
> >> So, there's one significant difference at least.
> >>
> >> It's unfortunate that the most fundamental things in Maven are
> >> essentially undocumented AFAICT: what 'deploy' and 'install' do, the
> >> various contents (and potential contents) of repositories in different
> >> contexts and their semantics, and so on.
> >>
> >> - Chas
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: dev-help@maven.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> > For additional commands, e-mail: dev-help@maven.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>
Re: Functional distinction between install and deploy operations
Posted by Chas Emerick <ch...@cemerick.com>.
As I said, I'm building a Clojure library on top of Aether, so the notions of goals and lifecycles and plugins are nowhere to be found.
By "'deploy' operation", I mean the operation implemented by e.g. RepositorySystem.deploy in Aether, or the same operation implemented in the maven-ant-tasks, or in whatever was the underpinning of Maven 2.x. Likewise for "'install' operation".
It seems odd to me that all of the responses so far have been referring to userland concepts, rather than the semantics of the fundamental operations implemented by those libraries/APIs...
- Chas
On Feb 23, 2012, at 8:24 AM, Thiessen, Todd (Todd) wrote:
> Interesting thread, although I find it a big confusing. Are you using the deploy goal, not lifecycle, to deploy artifacts to your local repository? What do you mean by "'deploy' operation"? Are you actually using the deploy plugin?
>
> Your comment about them not being documented well I also find a bit confusing. The deploy and install plugins are both documented quite well. But I don't think you are referring to the plugin. I think you mean something else when you say "deploy operation".
>
>> -----Original Message-----
>> From: Chas Emerick [mailto:chas@cemerick.com]
>> Sent: Thursday, February 23, 2012 7:38 AM
>> To: Maven Developers List
>> Subject: Re: Functional distinction between install and deploy
>> operations
>>
>>
>> On Feb 23, 2012, at 1:01 AM, Chris Graham wrote:
>>
>>> Remember that 'deploy' still calls 'install'.
>>
>> Very true for `mvn`. Not true in Aether; this would seem to be a
>> userland tool convention, and not a fundamental characteristic of the
>> 'deploy' operation.
>>
>> However, even Aether leaves some resolver-status and metadata files in
>> the local repository after completing a 'deploy'...although I can't
>> determine the significance of them.
>>
>> One thing I've discovered is that an installed SNAPSHOT will always
>> take precedence over SNAPSHOTs from remote repositories, whereas this
>> is not the case for SNAPSHOTs that are deployed to a local repository.
>> So, there's one significant difference at least.
>>
>> It's unfortunate that the most fundamental things in Maven are
>> essentially undocumented AFAICT: what 'deploy' and 'install' do, the
>> various contents (and potential contents) of repositories in different
>> contexts and their semantics, and so on.
>>
>> - Chas
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Functional distinction between install and deploy operations
Posted by Manfred Moser <ma...@mosabuam.com>.
He is talking about the notion of a install and deploy operating as
implemented by the deploy and install plugins. He is porting them to
Coljure for usage with Clojure build tools like Leiningen and it using
the same library Maven is using for it - Aether.
manfred
On 12-02-23 05:24 AM, Thiessen, Todd (Todd) wrote:
> Interesting thread, although I find it a big confusing. Are you using the deploy goal, not lifecycle, to deploy artifacts to your local repository? What do you mean by "'deploy' operation"? Are you actually using the deploy plugin?
>
> Your comment about them not being documented well I also find a bit confusing. The deploy and install plugins are both documented quite well. But I don't think you are referring to the plugin. I think you mean something else when you say "deploy operation".
>
>> -----Original Message-----
>> From: Chas Emerick [mailto:chas@cemerick.com]
>> Sent: Thursday, February 23, 2012 7:38 AM
>> To: Maven Developers List
>> Subject: Re: Functional distinction between install and deploy
>> operations
>>
>>
>> On Feb 23, 2012, at 1:01 AM, Chris Graham wrote:
>>
>>> Remember that 'deploy' still calls 'install'.
>> Very true for `mvn`. Not true in Aether; this would seem to be a
>> userland tool convention, and not a fundamental characteristic of the
>> 'deploy' operation.
>>
>> However, even Aether leaves some resolver-status and metadata files in
>> the local repository after completing a 'deploy'...although I can't
>> determine the significance of them.
>>
>> One thing I've discovered is that an installed SNAPSHOT will always
>> take precedence over SNAPSHOTs from remote repositories, whereas this
>> is not the case for SNAPSHOTs that are deployed to a local repository.
>> So, there's one significant difference at least.
>>
>> It's unfortunate that the most fundamental things in Maven are
>> essentially undocumented AFAICT: what 'deploy' and 'install' do, the
>> various contents (and potential contents) of repositories in different
>> contexts and their semantics, and so on.
>>
>> - Chas
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
RE: Functional distinction between install and deploy operations
Posted by "Thiessen, Todd (Todd)" <tt...@avaya.com>.
Interesting thread, although I find it a big confusing. Are you using the deploy goal, not lifecycle, to deploy artifacts to your local repository? What do you mean by "'deploy' operation"? Are you actually using the deploy plugin?
Your comment about them not being documented well I also find a bit confusing. The deploy and install plugins are both documented quite well. But I don't think you are referring to the plugin. I think you mean something else when you say "deploy operation".
> -----Original Message-----
> From: Chas Emerick [mailto:chas@cemerick.com]
> Sent: Thursday, February 23, 2012 7:38 AM
> To: Maven Developers List
> Subject: Re: Functional distinction between install and deploy
> operations
>
>
> On Feb 23, 2012, at 1:01 AM, Chris Graham wrote:
>
> > Remember that 'deploy' still calls 'install'.
>
> Very true for `mvn`. Not true in Aether; this would seem to be a
> userland tool convention, and not a fundamental characteristic of the
> 'deploy' operation.
>
> However, even Aether leaves some resolver-status and metadata files in
> the local repository after completing a 'deploy'...although I can't
> determine the significance of them.
>
> One thing I've discovered is that an installed SNAPSHOT will always
> take precedence over SNAPSHOTs from remote repositories, whereas this
> is not the case for SNAPSHOTs that are deployed to a local repository.
> So, there's one significant difference at least.
>
> It's unfortunate that the most fundamental things in Maven are
> essentially undocumented AFAICT: what 'deploy' and 'install' do, the
> various contents (and potential contents) of repositories in different
> contexts and their semantics, and so on.
>
> - Chas
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Functional distinction between install and deploy operations
Posted by Chas Emerick <ch...@cemerick.com>.
On Feb 23, 2012, at 8:35 PM, Chris Graham wrote:
>> I can imagine that many of the Maven-interoperability issues that ivy had/has (I've not been near it for some years) are attributable to the lack of a usable specification of repository layouts, operational semantics, etc.
>
> I think that you've found the real issue there. It's the same one as Ivy has.
>
> What I think you have, is an 'impedance mismatch' between two systems,
> one with a well defined lifecycle and structure (maven) and one
> without (Ant/Ivy).
I think the lack of clear answers on this thread demonstrates that Maven _doesn't_ have a well-defined structure and semantics (talking here about the repository, operations on it, etc., not the modes and knobs of `mvn`). If it did, and it was documented, then Ivy's interoperability with Maven repositories would be on par with `mvn`.
- Chas
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Functional distinction between install and deploy operations
Posted by Chris Graham <ch...@gmail.com>.
> I can imagine that many of the Maven-interoperability issues that ivy had/has (I've not been near it for some years) are attributable to the lack of a usable specification of repository layouts, operational semantics, etc.
I think that you've found the real issue there. It's the same one as Ivy has.
What I think you have, is an 'impedance mismatch' between two systems,
one with a well defined lifecycle and structure (maven) and one
without (Ant/Ivy).
-Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Functional distinction between install and deploy operations
Posted by Chas Emerick <ch...@cemerick.com>.
On Feb 23, 2012, at 12:29 PM, Manfred Moser wrote:
> On 12-02-23 04:37 AM, Chas Emerick wrote:
>> On Feb 23, 2012, at 1:01 AM, Chris Graham wrote:
>>
>>> Remember that 'deploy' still calls 'install'.
>> Very true for `mvn`. Not true in Aether; this would seem to be a userland tool convention, and not a fundamental characteristic of the 'deploy' operation.
>>
>> However, even Aether leaves some resolver-status and metadata files in the local repository after completing a 'deploy'...although I can't determine the significance of them.
>>
>> One thing I've discovered is that an installed SNAPSHOT will always take precedence over SNAPSHOTs from remote repositories, whereas this is not the case for SNAPSHOTs that are deployed to a local repository. So, there's one significant difference at least.
>>
>> It's unfortunate that the most fundamental things in Maven are essentially undocumented AFAICT: what 'deploy' and 'install' do, the various contents (and potential contents) of repositories in different contexts and their semantics, and so on.
>
> Very true. It would be great to get your findings documented. Btw I still think the best thing to do is to do the same as Maven does .. just so you dont create slight differences in behaviour. The potential debugging problems are way more of a time waste then just doing the install like maven does even if that is a bit inefficient..
Heh, I'm not sure if my crude observation re: SNAPSHOTs counts as a "finding".
I can only manage to do the same as Maven thanks to my usage of Aether and liberal reading of source. If that's the best option available, it's surely not in the best interests of the broader Maven community. i.e. Now that I'm down this "low" in the stack, I can imagine that many of the Maven-interoperability issues that ivy had/has (I've not been near it for some years) are attributable to the lack of a usable specification of repository layouts, operational semantics, etc. So, when it "breaks", that's just a symptom of it not being implemementation-identical to maven/aether.
I'm sure someone on this list knows where the bodies are buried. A brain dump along with a set of conformance tests would be immensely beneficial long-term. That would at least provide a basis for later improvements and migrations that third-party implementations could follow along with sanely.
Cheers,
- Chas
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Functional distinction between install and deploy operations
Posted by Manfred Moser <ma...@mosabuam.com>.
On 12-02-23 04:37 AM, Chas Emerick wrote:
> On Feb 23, 2012, at 1:01 AM, Chris Graham wrote:
>
>> Remember that 'deploy' still calls 'install'.
> Very true for `mvn`. Not true in Aether; this would seem to be a userland tool convention, and not a fundamental characteristic of the 'deploy' operation.
>
> However, even Aether leaves some resolver-status and metadata files in the local repository after completing a 'deploy'...although I can't determine the significance of them.
>
> One thing I've discovered is that an installed SNAPSHOT will always take precedence over SNAPSHOTs from remote repositories, whereas this is not the case for SNAPSHOTs that are deployed to a local repository. So, there's one significant difference at least.
>
> It's unfortunate that the most fundamental things in Maven are essentially undocumented AFAICT: what 'deploy' and 'install' do, the various contents (and potential contents) of repositories in different contexts and their semantics, and so on.
Very true. It would be great to get your findings documented. Btw I
still think the best thing to do is to do the same as Maven does .. just
so you dont create slight differences in behaviour. The potential
debugging problems are way more of a time waste then just doing the
install like maven does even if that is a bit inefficient..
just my 2c though..
manfred
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Functional distinction between install and deploy operations
Posted by Chas Emerick <ch...@cemerick.com>.
On Feb 23, 2012, at 1:01 AM, Chris Graham wrote:
> Remember that 'deploy' still calls 'install'.
Very true for `mvn`. Not true in Aether; this would seem to be a userland tool convention, and not a fundamental characteristic of the 'deploy' operation.
However, even Aether leaves some resolver-status and metadata files in the local repository after completing a 'deploy'...although I can't determine the significance of them.
One thing I've discovered is that an installed SNAPSHOT will always take precedence over SNAPSHOTs from remote repositories, whereas this is not the case for SNAPSHOTs that are deployed to a local repository. So, there's one significant difference at least.
It's unfortunate that the most fundamental things in Maven are essentially undocumented AFAICT: what 'deploy' and 'install' do, the various contents (and potential contents) of repositories in different contexts and their semantics, and so on.
- Chas
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Functional distinction between install and deploy operations
Posted by Chris Graham <ch...@gmail.com>.
Remember that 'deploy' still calls 'install'.
-Chris
On Thu, Feb 23, 2012 at 4:35 PM, Chas Emerick <ch...@cemerick.com> wrote:
>
> On Feb 22, 2012, at 11:54 PM, Manfred Moser wrote:
>
>> 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..
>
> Sure, I understand the userland distinction well, but I fail to see what the 'deploy' operation provides from an API/semantics standpoint that is not provided by 'deploy'. That is, what would be the consequences of always performing a 'deploy' in order to push artifacts into a local file-based repository (like that at ~/.m2/repository)? i.e. Should *any* other Maven tooling be able to resolve dependencies "installed" into a local repo in such a fashion, or would resolution potentially fail because, say, the 'deploy' operation targeting a file-based repository won't create certain files that are required/expected in a local repository?
>
> Note that the portion of pomegranate that provides a natural Clojure API for Aether is decidedly _not_ a user-oriented API. It is intended for consumption by tools that handle the user-facing bits, like Leiningen[1] and Counterclockwise[2]. In any case, simplifying its API if possible is a primary concern, and the (artificial?) distinction between installation and deployment seems like it's ripe for optimization. :-)
>
> Thanks,
>
> - Chas
>
> [1] https://github.com/technomancy/leiningen
> [2] http://code.google.com/p/counterclockwise/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Functional distinction between install and deploy operations
Posted by Chas Emerick <ch...@cemerick.com>.
On Feb 22, 2012, at 11:54 PM, Manfred Moser wrote:
> 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..
Sure, I understand the userland distinction well, but I fail to see what the 'deploy' operation provides from an API/semantics standpoint that is not provided by 'deploy'. That is, what would be the consequences of always performing a 'deploy' in order to push artifacts into a local file-based repository (like that at ~/.m2/repository)? i.e. Should *any* other Maven tooling be able to resolve dependencies "installed" into a local repo in such a fashion, or would resolution potentially fail because, say, the 'deploy' operation targeting a file-based repository won't create certain files that are required/expected in a local repository?
Note that the portion of pomegranate that provides a natural Clojure API for Aether is decidedly _not_ a user-oriented API. It is intended for consumption by tools that handle the user-facing bits, like Leiningen[1] and Counterclockwise[2]. In any case, simplifying its API if possible is a primary concern, and the (artificial?) distinction between installation and deployment seems like it's ripe for optimization. :-)
Thanks,
- Chas
[1] https://github.com/technomancy/leiningen
[2] http://code.google.com/p/counterclockwise/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: Functional distinction between install and deploy operations
Posted by Manfred Moser <ma...@mosabuam.com>.
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-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org