On 06/12/2012, at 3:24 AM, Daz DeBoer wrote:

> G'day
> I'm adding 'mvn install' type support to the new 'maven-publish' plugin. Just 
> wanted to confirm some behaviour:
> Should we _always_ try to install to maven local repo when publishing to a 
> remote maven repository. So 'publish' with the 'maven-publish' plugin will 
> combine the current 'deploy' and 'install' of the 'maven' plugin. I think 
> this makes sense, as it matches the behaviour of 'mvn deploy'. An alternative 
> would be a separate lifecycle task for 'maven-install'.

I'd rather not install. It strikes me as it would cause problems with 
reproducibility, as any subsequent Maven builds that you run on the machine 
will use the stuff from the machine, rather than authoritative repository. So 
if you're doing the publish from a CI machine, you're affecting the results of 
any subsequent CI builds that consumers may run on the same machine.

So, running 'gradle publish' should publish to exactly those repositories 
listed in the publishing.repositories container. If you want to do an install 
on publish, you can add mavenLocal() there.


--
Adam Murdoch
Gradle Co-founder
http://www.gradle.org
VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting
http://www.gradleware.com

Reply via email to