Skip to content

Commit

Permalink
Handle import scope dependencies when updating dependencyManagement. F…
Browse files Browse the repository at this point in the history
  • Loading branch information
frode-carlsen committed Aug 2, 2021
1 parent 30f0d36 commit ed7f85c
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 0 deletions.
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
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
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
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
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
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
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 ed7f85c

Please sign in to comment.