I think I've figured out a way around this issue.

I did it by doing a very simple test case, where I had an aggregate project,
with a submodule *not* specifying the aggregate as the parent.

The simple case worked!

So, I then gradually narrowed the differences between my test project and my
real project, until I found the "cause".

The cause was that the <modules> element in my top aggregator pom was inside a
profile with id "apache-release".  The super pom chain of all the poms includes
the common Apache pom (org.apache:apache:7), which itself has a profile for
apache-release, and also configures the release plugin to use that profile for
releasing. 

The workaround seems to be that I need to specify -Papache-release on my top
level mvn command - then two things happen:

1) I no longer get the message:

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

Instead, it just proceeds to ask me about the submodules. 

2) It finds and processes the submodules, generating the updated poms for those.

I guess the super-pom turning on apache-release happened after my <profile> in
my top level aggregator project was "processed", maybe...  (not sure about 
this).

-Marshall Schor

On 9/25/2010 4:51 AM, Antonio Petrelli wrote:
> 2010/9/24 Marshall Schor <[email protected]>:
>>
>> On 9/24/2010 3:22 PM, Antonio Petrelli wrote:
>>> 2010/9/24 Marshall Schor <[email protected]>:
>>>> Are you saying that the Maven Release plugin, in particular, has the 
>>>> restriction
>>>> that in order for it to work, it the multimodule project has to be the 
>>>> parent?
>>> At this point I really don't know, since I always had modules that
>>> have the container as a parent, never tried in another way.
>>> Just a question: when you run release:prepare, does it ask you
>>> versions for every single module?
>> No, it asks just for versions where I had specified a <dependency> in the 
>> top pom.
>> It's as if the release plugin is set up to only work at the top pom, and not 
>> run
>> on the modules within (although it does run the build actions on the modules
>> within).
> Ok. Instead if you have child modules with the container pom as
> parent, it asks versions for every module.
>
>> I'm kind of stumped on how to "work around" this.
> Just a shot in the dark, try:
> http://maven.apache.org/plugins/maven-release-plugin/prepare-mojo.html#autoVersionSubmodules
>
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to