Le mardi 14 septembre 2010, Benjamin Bentmann a écrit :
> Stephen Connolly wrote:
> >> perhaps a special property in the pom.xml too, to avoid CLI-only and
> >> improve reproducibility?
> > 
> > would the release plugin therefore have to remote the property during a
> > release and then put it back in again.... also properties are not known
> > until after the model is constructed at which point it's too late
> 
> I agree with Stephen, having a special property that other tooling like
> the Release Plugin needs to be aware of sounds like superfluous
> complexity. And whether it's a POM property or later a dedicated POM
> element, the process of model building already involves artifact
> resolution (parents, imports/mixins, extensions) so I really think the
> snapshot resolution behavior should be set up front and not change
> somewhere down the road.
> 
> Also, what exactly is the issue with "CLI-only"? I was once thinking
> about an addition to the settings.xml but that doesn't play nicely with
> the release process where you want Maven to never include snapshots.
the idea is that the expected compile command during the development/SNAPSHOT 
phase would not be "mvn compile" but "mvn -sv gid,... compile", and if there 
is an API change in SNAPSHOT dependencies, "mvn compile" would even fail. 
Expected SNAPSHOT dependencies should be in the pom IMHO, since each bits of 
build info should be there so that "mvn compile" is sufficient.

Then release plugin would not be in charge of *removing* the property: the 
release plugin should only fail if the pom says it needs SNAPSHOT 
dependencies, and the developper has to change it to remove these SNAPSHOTs. 
Note that I don't know precisely how release plugin detects SNAPSHOT 
dependencies: does it do its own pom.xml analysis or use core API to resolve 
depencies then checks that no SNAPSHOT has been resolved?

Of course, the idea of a property is just to avoid changing the pom format 
until we have a viable solution: adding an element is the real need, property 
only a workaround.

Regards,

Hervé

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

Reply via email to