Skip to content

Commit

Permalink
Sort properties by Property name in "Property Updates Report" (mojoha…
Browse files Browse the repository at this point in the history
  • Loading branch information
sultan authored and obfischer committed Jun 25, 2021
1 parent 6b4cbb2 commit 6aba5c4
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -21,6 +21,7 @@

import java.util.Locale;
import java.util.Map;
import java.util.TreeMap;

import org.apache.maven.doxia.sink.Sink;
import org.apache.maven.plugin.MojoExecutionException;
Expand All @@ -29,6 +30,7 @@
import org.apache.maven.plugins.annotations.ResolutionScope;
import org.apache.maven.reporting.MavenReportException;
import org.codehaus.mojo.versions.api.PropertyVersions;
import org.codehaus.mojo.versions.utils.PropertyComparator;

/**
* Generates a report of available updates for properties of a project which are linked to the dependencies and/or
Expand Down Expand Up @@ -98,11 +100,11 @@ private boolean haveBuildProperties()
protected void doGenerateReport( Locale locale, Sink sink )
throws MavenReportException
{
final Map<Property, PropertyVersions> updateSet;
final Map<Property, PropertyVersions> updateSet = new TreeMap<>( new PropertyComparator() );
try
{
updateSet = getHelper().getVersionPropertiesMap( getProject(), properties, includeProperties,
excludeProperties, autoLinkItems );
updateSet.putAll( getHelper().getVersionPropertiesMap( getProject(), properties, includeProperties,
excludeProperties, autoLinkItems ));
}
catch ( MojoExecutionException e )
{
Expand Down

0 comments on commit 6aba5c4

Please sign in to comment.