Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
laurie committed Feb 5, 2017
1 parent f84139d commit 46a7a74
Showing 1 changed file with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@
public class DependencyUpdatesReport
extends AbstractVersionsReport
{

/**
* Whether to process the dependencyManagement section of the project. If not set will default to true.
*
* @parameter property="processDependencyManagement" defaultValue="true"
* @since 2.4-SNAPSHOT
*/
protected Boolean processDependencyManagement = Boolean.TRUE;

/**
* {@inheritDoc}
*/
Expand Down Expand Up @@ -84,8 +93,12 @@ protected void doGenerateReport( Locale locale, Sink sink )
{
Map<Dependency, ArtifactVersions> dependencyUpdates =
getHelper().lookupDependenciesUpdates( dependencies, false );
Map<Dependency, ArtifactVersions> dependencyManagementUpdates =
getHelper().lookupDependenciesUpdates( dependencyManagement, false );

Map<Dependency, ArtifactVersions> dependencyManagementUpdates = Collections.emptyMap();
if(isProcessingDependencyManagement())
{
dependencyManagementUpdates = getHelper().lookupDependenciesUpdates(dependencyManagement, false);
}
DependencyUpdatesRenderer renderer =
new DependencyUpdatesRenderer( sink, getI18n(), getOutputName(), locale, dependencyUpdates,
dependencyManagementUpdates );
Expand Down Expand Up @@ -149,4 +162,9 @@ public String getOutputName()
return "dependency-updates-report";
}

public boolean isProcessingDependencyManagement()
{
// true if true or null
return !Boolean.FALSE.equals( processDependencyManagement );
}
}

0 comments on commit 46a7a74

Please sign in to comment.