Skip to content

Commit

Permalink
Handle import scope dependencies when updating dependencyManagement. F…
Browse files Browse the repository at this point in the history
…ixes mojohaus#346, mojohaus#395

(cherry picked from commit ed7f85c)
  • Loading branch information
frode-carlsen authored and agaengel committed Sep 3, 2021
1 parent f38c23d commit 678e00c
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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() )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() )
{
Expand Down

0 comments on commit 678e00c

Please sign in to comment.