diff --git a/src/main/java/org/codehaus/mojo/versions/UseDepVersionMojo.java b/src/main/java/org/codehaus/mojo/versions/UseDepVersionMojo.java index 317eba5e9d..4e835deaa4 100644 --- a/src/main/java/org/codehaus/mojo/versions/UseDepVersionMojo.java +++ b/src/main/java/org/codehaus/mojo/versions/UseDepVersionMojo.java @@ -76,7 +76,11 @@ protected void update( ModifiedPomXMLEventReader pom ) { if ( getProject().getDependencyManagement() != null && isProcessingDependencyManagement() ) { + // handle normally declared dependencies useDepVersion( pom, getProject().getDependencyManagement().getDependencies() ); + + // handle import dependencies specially + useDepVersion( pom, PomHelper.readImportedPOMsFromDependencyManagementSection(pom) ); } if ( getProject().getDependencies() != null && isProcessingDependencies() ) diff --git a/src/main/java/org/codehaus/mojo/versions/UseLatestReleasesMojo.java b/src/main/java/org/codehaus/mojo/versions/UseLatestReleasesMojo.java index ab8b948f7a..e058a94d0c 100644 --- a/src/main/java/org/codehaus/mojo/versions/UseLatestReleasesMojo.java +++ b/src/main/java/org/codehaus/mojo/versions/UseLatestReleasesMojo.java @@ -101,7 +101,11 @@ protected void update( ModifiedPomXMLEventReader pom ) { if ( getProject().getDependencyManagement() != null && isProcessingDependencyManagement() ) { + // handle normally declared dependencies useLatestReleases( pom, getProject().getDependencyManagement().getDependencies() ); + + // handle import dependencies specially + useLatestReleases( pom, PomHelper.readImportedPOMsFromDependencyManagementSection(pom) ); } if ( getProject().getDependencies() != null && isProcessingDependencies() ) { diff --git a/src/main/java/org/codehaus/mojo/versions/UseLatestSnapshotsMojo.java b/src/main/java/org/codehaus/mojo/versions/UseLatestSnapshotsMojo.java index 6867642e85..eaf411e2fe 100644 --- a/src/main/java/org/codehaus/mojo/versions/UseLatestSnapshotsMojo.java +++ b/src/main/java/org/codehaus/mojo/versions/UseLatestSnapshotsMojo.java @@ -100,7 +100,11 @@ protected void update( ModifiedPomXMLEventReader pom ) { if ( getProject().getDependencyManagement() != null && isProcessingDependencyManagement() ) { + // handle normally declared dependencies useLatestSnapshots( pom, getProject().getDependencyManagement().getDependencies() ); + + // handle import dependencies specially + useLatestSnapshots( pom, PomHelper.readImportedPOMsFromDependencyManagementSection(pom) ); } if ( getProject().getDependencies() != null && isProcessingDependencies() ) { diff --git a/src/main/java/org/codehaus/mojo/versions/UseLatestVersionsMojo.java b/src/main/java/org/codehaus/mojo/versions/UseLatestVersionsMojo.java index d15c453954..663adf8c4e 100644 --- a/src/main/java/org/codehaus/mojo/versions/UseLatestVersionsMojo.java +++ b/src/main/java/org/codehaus/mojo/versions/UseLatestVersionsMojo.java @@ -96,7 +96,11 @@ protected void update( ModifiedPomXMLEventReader pom ) PomHelper.getRawModel( getProject() ).getDependencyManagement(); if ( dependencyManagement != null ) { + // handle normally declared dependencies useLatestVersions( pom, dependencyManagement.getDependencies() ); + + // handle import dependencies specially + useLatestVersions( pom, PomHelper.readImportedPOMsFromDependencyManagementSection(pom) ); } } if ( getProject().getDependencies() != null && isProcessingDependencies() ) diff --git a/src/main/java/org/codehaus/mojo/versions/UseNextReleasesMojo.java b/src/main/java/org/codehaus/mojo/versions/UseNextReleasesMojo.java index 9b176de0ec..1d509f94f5 100644 --- a/src/main/java/org/codehaus/mojo/versions/UseNextReleasesMojo.java +++ b/src/main/java/org/codehaus/mojo/versions/UseNextReleasesMojo.java @@ -67,7 +67,11 @@ protected void update( ModifiedPomXMLEventReader pom ) { if ( getProject().getDependencyManagement() != null && isProcessingDependencyManagement() ) { + // handle normally declared dependencies useNextReleases( pom, getProject().getDependencyManagement().getDependencies() ); + + // handle import dependencies specially + useNextReleases( pom, PomHelper.readImportedPOMsFromDependencyManagementSection(pom) ); } if ( getProject().getDependencies() != null && isProcessingDependencies() ) { diff --git a/src/main/java/org/codehaus/mojo/versions/UseNextSnapshotsMojo.java b/src/main/java/org/codehaus/mojo/versions/UseNextSnapshotsMojo.java index 4a503de277..f2835a1fad 100644 --- a/src/main/java/org/codehaus/mojo/versions/UseNextSnapshotsMojo.java +++ b/src/main/java/org/codehaus/mojo/versions/UseNextSnapshotsMojo.java @@ -97,7 +97,11 @@ protected void update( ModifiedPomXMLEventReader pom ) { if ( getProject().getDependencyManagement() != null && isProcessingDependencyManagement() ) { + // handle normally declared dependencies useNextSnapshots( pom, getProject().getDependencyManagement().getDependencies() ); + + // handle import dependencies specially + useNextSnapshots( pom, PomHelper.readImportedPOMsFromDependencyManagementSection(pom) ); } if ( getProject().getDependencies() != null && isProcessingDependencies() ) { diff --git a/src/main/java/org/codehaus/mojo/versions/UseNextVersionsMojo.java b/src/main/java/org/codehaus/mojo/versions/UseNextVersionsMojo.java index d1959a644e..a305411c65 100644 --- a/src/main/java/org/codehaus/mojo/versions/UseNextVersionsMojo.java +++ b/src/main/java/org/codehaus/mojo/versions/UseNextVersionsMojo.java @@ -60,7 +60,11 @@ protected void update( ModifiedPomXMLEventReader pom ) { if ( getProject().getDependencyManagement() != null && isProcessingDependencyManagement() ) { + // handle normally declared dependencies useNextVersions( pom, getProject().getDependencyManagement().getDependencies() ); + + // handle import dependencies specially + useNextVersions( pom, PomHelper.readImportedPOMsFromDependencyManagementSection(pom) ); } if ( getProject().getDependencies() != null && isProcessingDependencies() ) {