Hi all,
I have a multi-level project, for example (B & C are submodules of A;  B1 &
B2 are submodlules of B ; ...):

A ---- B ------ B1
   |        |----  B2
   |
   |--- C ------C1
             |-----C2

B2 depends from B1
C1 depends from B1
C2 depends from C1 & B2

In C are defined  B1 & B2 & C1  as 
<dependencyManagement> 
...  
</dependencyManagement> 

and used as real dependencies

<dependencies>
                <dependency>
                 ...
                </dependency>
</dependencies>
in C2 & C1

What I want is that after execution of:
mvn  -DpreparationGoals=clean install -DautoVersionSubmodules=true 
-DupdateDependencies=false release:clean release:prepare    on C project 

the dependencies present in  <dependencyManagement> of C project do not get
update to the next snapshot versions (development versions) but remain that
released.
Instead I get always the snapshot versions, like if updateDependencies=
false was ignored.

Than I debugged and I tried this piece of code the, for me, is where the
program fails.

AbstractRewritePomsPhase.java   Class
updateDomVersion()                   Function

if ( mappedVersion != null && mappedVersion.endsWith( "SNAPSHOT" ) &&
   !dependencyVersion.endsWith( "SNAPSHOT" ) &&     
!releaseDescriptor.isUpdateDependencies() )
               {
                   return;
               }

The mappedVersion variable is always null when the code execute the
dependencies present in <dependencyManagement> of C project. This because:
String mappedVersion = (String) mappedVersions.get( key ); 
has the Map mappedVersions that does not contains dependencies bat only the
mapped released version of C projects.  Unfortunately I can't still a valid
solution ...
Morover, this piece of code is marked to MRELEASE-220 that is an issue of
JIRA that explains a similar problem. But no fix generated.

Anyone can help me ?
Nobody else met this problem ?
May be the problem is due to use of  <dependencyManagement> without define
the real dependency in the some pom where  <dependencyManagement> is
defined?

Best regards
Alex









-- 
View this message in context: 
http://www.nabble.com/updateDependencies-doesn%27t-run-correctly-in-release-plugin-tp19287555p19287555.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to