On 14 September 2010 06:22, Hervé BOUTEMY <herve.bout...@free.fr> wrote:
> > So far I doubt that we can find any magic/heuristic that works for all > > use cases. Hence I suggest that we go with some explicit configuration. > > In detail, I propose a CLI option like > > > > mvn <goals> --snapshot-versions gid,-gid:aid,*:aid > > > > This is meant to give a comma-separated list of glob-like > > inclusion/exclusion patterns (exclusions marked by prefixing with '-' or > > '!' like profiles) to denote the groupId:artifactId tuples of > > projects/artifacts whose snapshots are acceptable for ranges during the > > build. These patterns would be applied on the set of available versions > > before the range filters them, i.e. even a range giving snapshots > > explicitly like "[2.0-SNAPSHOT,)" would not select 2.0-SNAPSHOT unless > > enabled on CLI for the artifact in question. > this seems a reasonable approach IMHO > clearly, it fixes my main concern: version ranges are back to mathematical > notion > I don't really understand the use cases where problems happen (even it has > already been told), then my opinion on this point is not really a good > indicator > > > > > This new option, -sv in short form, would apply to the entire reactor. > > If somebody sees a good use case that requires to treat some projects > > within a reactor differently or to treat project dependency resolution > > and plugin resolution differently, please speak up. > > > > For the common case where one wants to consume snapshots of related > > projects, there should be a way to avoid the addition of -sv to the CLI. > > To address this case, I suggest to have Maven derive a default value for > > the -sv option by considering the groupIds of all snapshot projects in > > the reactor as inclusions. This is somewhat a combination of Mark's > > option 2 and my other thought which should make Maven usually do the > > right thing for builds, both during every day development and during a > > release (where no snapshot projects are in the reactor and hence the > > default -sv value would be emtpy and thereby disables any snapshots for > > ranges). > perhaps a special property in the pom.xml too, to avoid CLI-only and > improve > reproducibility? What would be the use case not covered by previous common > case? > 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 think we need something along the lines of benjamin's proposal, but I'd like to see some concrete examples of how it would work, on e.g. a wiki page -Stephen > Regards, > > Hervé > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org > >