maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Markus Karg" <k...@quipsy.de>
Subject AW: mvn release:prepare does not update parent version
Date Tue, 23 Jul 2013 11:45:51 GMT
But why is release:prepare explicitly asking me whether I want to update that number and what
that number is, when it is intended behaviour that it does not actually set that number into
the POM? I would understand all what you say if the plugin would not ask for the next development
version of <parent>. But it DOES ask.

-----Urspr√ľngliche Nachricht-----
Von: Russell Gold [mailto:russ@gold-family.us] 
Gesendet: Dienstag, 23. Juli 2013 10:27
An: Maven Users List
Betreff: Re: mvn release:prepare does not update parent version

The example you mention updates the build artifacts only.

When you release code, you would of course assign a version number to the release, and you
can specify what snapshot version you want to use next. That makes the release consistent
with all of the tests. It's simple labeling what is being released.

Changing the version number of outside artifacts that you reference, on the other hand, is
a change in the definition and functionality of the system. There is no particular reason
to expect it to work, and more than if you decided to ask Maven to modify any other code in
your system. 

Russ

On Jul 23, 2013, at 4:10 AM, christofer.dutz@c-ware.de wrote:

> Hi,
> 
> is there actually a reason why only the artifacts in the build are updated?
> 
> I would agree that without providing versions for artifacts manually, this could cause
problems, but when using the feature described here:
> http://maven.apache.org/maven-release/maven-release-plugin/examples/no
> n-interactive-release.html It is possible to provide separate versions 
> for every module.
> 
> In my release I provided release and development versions for all modules (also ones
not in the reactor), but the release:prepare simply skipped those not in the build.
> I had to create a patched version for this, but it was a pretty unsatisfying solution.
If the plugin would for example update all those versions in the reactor plus all those I
manually provided a version for, might solve Markus' problems.
> 
> Chris
> 
> 
> -----Urspr√ľngliche Nachricht-----
> Von: jieryn [mailto:jieryn@gmail.com]
> Gesendet: Montag, 22. Juli 2013 20:36
> An: Maven Users List
> Betreff: Re: mvn release:prepare does not update parent version
> 
> Greetings,
> 
> On Mon, Jul 22, 2013 at 8:25 AM, Markus Karg <karg@quipsy.de> wrote:
>> When I do mvn release:prepare, Maven asks whether I want to update 
>> all SNAPSHOT version referenced in the POM.
> 
> I don't think the language says that at all. I ran a quick build and I'm not seeing where
it says it will update every single SNAPSHOT version referenced in the POM. Can you please
paste it?
> 
>> I say "yes" and confirm all suggested replacement versions unchanged.
>> When Maven is done, I check the POM.xml.
>> It is correctly rewritten for all references, but not for the parent 
>> version.
> 
> And it should not. It will rewrite the versions for the artifacts in its build plan,
and the parent is not part of the build plan in this way. It would be horrifying, frankly,
if running a release in a project would go update the parent project also.
> 
>> The parent version still references the *old* SNAPSHOT, while 
>> obviously it should now name the *next* SNAPSHOT.
> 
> I don't think it should obviously do that. Perhaps you actually intended to run the release
from the parent, if that is true, then you should do it from there. Not from within some submodule.
> 
>> Can somebody tell me what I have to do so that mvn release:prepare 
>> will also make the parent version point tot he *next* SNAPSHOT, as it 
>> does it correctly with the dependencies and the project's own version?
> 
> Run the release from the proper location. Or if the parent really does not have a submodule
of the project you're errantly trying to run the release from right now, then you should release
it (parent) first and then make the updates in the unlinked child projects to the latest release
number. The m-versions-p is quite adept at automating this process.
> 
> -Jesse
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 

-----------------
Come read my webnovel, Take a Lemon <http://www.takealemon.com>, and listen to the Misfile
radio play <http://www.gold-family.us/audio/misfile.html>!





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message