maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Connolly <stephen.alan.conno...@gmail.com>
Subject Re: continuous releasing: versions:set and/or release:update-version to release an aggregator project
Date Thu, 01 Aug 2013 17:25:23 GMT
Yeah I need to write some tests...

You did use wildcards by the way? ie

$ mvn versions:set -DgroupId=\* -DartifactId=\* -DoldVersion=\*
-Dversion=...

Keep in mind you need to escape the wildcard appropriate for your shell or
it will replace with a glob that can never match


On Thursday, 1 August 2013, Stephen Colebourne wrote:

> I pulled svn and tried it, and it didn't work in my case. It didn't
> even set the root aggregator pom.
>
> My set-aggregated goal is here and does work:
> https://gist.github.com/jodastephen/6133391
>
> Unfortunately, half my test project is private so its hard to
> describe/publish logs.
>
> Stephen
>
>
>
> On 1 August 2013 16:25, Stephen Connolly
> <stephen.alan.connolly@gmail.com> wrote:
> > Please try 2.2-SNAPSHOT
> >
> > It may or may have wildcard support that works and doesn't cause any
> > regressions...
> >
> > I need to write some tests for the wildcard stuff.
> >
> >
> > On 1 August 2013 15:39, Stephen Colebourne <scolebourne@joda.org> wrote:
> >
> >> Thanks for the detailed description, which I hope your making a web page
> >> out of.
> >>
> >> Here is the current description "Sets the current projects version,
> >> updating the details of any child modules as necessary." From that I
> >> conclude it will set the current project version and any child modules
> >> necessary to make it all match.
> >>
> >> It also says "The set goal can be used to update the version of the
> >> current module. It will automatically climb up local directories to
> >> find the aggregation root. It will automatically update explicitly
> >> referenced dependencies"
> >>
> >> Again, the expectation is that it will correctly set all the versions
> >> I want it to set. From oldVersion to newVersion.
> >>
> >> Basically, it seems to be being too clever for its own good.
> >>
> >> As it is, even a batch script cnanot achieve my goal. I have projects
> like
> >> this:
> >>
> >> A
> >> B
> >> C
> >> - D
> >> - E
> >> F
> >>
> >> where A and B are children of C, but not within the aggregator of C
> >> (unlike D and E which are children and are within the aggregator). I
> >> have a separate overall aggregator R that runs A, B and C.
> >>
> >> If I set the version of C, and then try to set the version of A or B,
> >> the plugin fails with "Project version is inherited from parent".
> >>
> >> So, I get that I'm trying to use the plugin for something you didn't
> >> intend, but there isn't an alternative here that does do what I want,
> >> right?
> >>
> >> So, we really need a new goal - versions:set-aggregated - which sets
> >> every matching version within an aggregated pom structure when called
> >> from the root.
> >>
> >> Would you want such a thing included in the versions plugin? Or does
> >> it need to be a separate plugin?
> >>
> >> I have to have something, as the alternative is stupid amounts of manual
> >> work.
> >>
> >> Stephen
> >>
> >>
> >>
> >> On 1 August 2013 14:36, Stephen Connolly
> >> <stephen.alan.connolly@gmail.com> wrote:
> >> > first off versions:set is a @aggregator mojo. That means it only
> operates
> >> > on the -f specified pom file or the pom file in the working directory.
> >> >
> >> > The goal is to update *that one project's version* it is not trying to
> >> > update other project versions.
> >> >
> >> > So if you have
> >> >
> >> > A
> >> > +B
> >> > |+C
> >> > |+D
> >> > +E
> >> > |+F
> >> > \G
> >> >
> >> > where C and D inherits from B, F inherits from E and depends on C, A
> is
> >> an
> >> > aggregator with no parent-child relationship and G is a standalone
> >> project
> >> > that depends on F directly
> >> >
> >> > Further we have in C
> >> >
> >> > <project>
> >> >   <parent>
> >> >     ...
> >> >     <artifactId>B</artifactId>
> >> >     <version>2.1-SNAPSHOT</version>
> >> >   </parent>
> >> >   <artifactId>C</artifactId>
> >> >   <!-- no version tag -->
> >> > </project>
> >> >
> >> > and in D
> >> >
> >> > <project>
> >> >   <parent>
> >> >     ...
> >> >     <artifactId>B</artifactId>
> >> >     <version>2.1-SNAPSHOT</version>
> >> >   </parent>
> >> >   <artifactId>D</artifactI



-- 
Sent from my phone

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message