maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Markus Karg" <>
Subject RE: mvn release:prepare does not update parent version
Date Mon, 22 Jul 2013 20:43:32 GMT
Thanks for picking this up. Please find answers inlined. :-)

> > 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?

[INFO] Checking dependencies and plugins for snapshots ...
There are still some remaining snapshot dependencies.: Do you want to
resolve them now? (yes/no) no: : yes
Dependency type to resolve,: specify the selection number ( 0:All
1:Project Dependencies 2:Plugins 3:Reports 4:Extensions ): (0/1/2/3) 1:
: 1
Resolve Project Dependency Snapshots.: '' set to
release? (yes/no) yes: : yes
What is the next development version? (4.34.5-SNAPSHOT) 4.34.5-SNAPSHOT:
: 4.34.5-SNAPSHOT
'' set to release? (yes/no) yes: : ...

As you see, it asks whether I want to set the reference to the parent
(my-company-pom) to release, and I say: "yes".
Then it suggests to reference the latest company pom, which actually is
4.34.5-SNAPSHOT, which I confirmed.
(in reality I just press [Enter], but I added the value here for better

> > I say "yes" and confirm all suggested replacement versions
> > 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
> would go update the parent project also.

I do not want to update the parent project itself. I want to replace the
reference to the SNAPSHOT parent by a reference to the RELEASE parent.
Which is not horrible, but certainly what everybody wants when doing a
release and having just released the parent one minute before.

> > 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.

This is not a submodule. I do not talk about a multi-module project at
all. This is a simple standalone project, which references a company
POM. The company POM was released a minute ago, and now I want to
release this project. So I cannot run the release "from the parent",

> > 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
> > 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.

Please read above lines. As it is a standalone project, I DO run the
release from the proper location. I actually HAVE released the parent
bevore. All I want to get is that the release plugin doeas what it
actually announced to do. It asked me what parent version I want, and it
just discards the information. That's what I complain about.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message