mirror of https://github.com/apache/maven.git
[MNG-3787] Add plugin version to default reports
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@720001 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c0bbd26f11
commit
9811be2c3e
|
@ -484,14 +484,16 @@ public class DefaultLifecycleBindingManager
|
||||||
String report = (String) i.next();
|
String report = (String) i.next();
|
||||||
|
|
||||||
StringTokenizer tok = new StringTokenizer( report, ":" );
|
StringTokenizer tok = new StringTokenizer( report, ":" );
|
||||||
if ( tok.countTokens() != 2 )
|
int count = tok.countTokens();
|
||||||
|
if ( count != 2 && count != 3 )
|
||||||
{
|
{
|
||||||
logger.warn( "Invalid default report ignored: '" + report + "' (must be groupId:artifactId)" );
|
logger.warn( "Invalid default report ignored: '" + report + "' (must be groupId:artifactId[:version])" );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
String groupId = tok.nextToken();
|
String groupId = tok.nextToken();
|
||||||
String artifactId = tok.nextToken();
|
String artifactId = tok.nextToken();
|
||||||
|
String version = tok.hasMoreTokens() ? tok.nextToken() : null;
|
||||||
|
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
for ( Iterator j = reportPlugins.iterator(); j.hasNext() && !found; )
|
for ( Iterator j = reportPlugins.iterator(); j.hasNext() && !found; )
|
||||||
|
@ -509,6 +511,7 @@ public class DefaultLifecycleBindingManager
|
||||||
ReportPlugin reportPlugin = new ReportPlugin();
|
ReportPlugin reportPlugin = new ReportPlugin();
|
||||||
reportPlugin.setGroupId( groupId );
|
reportPlugin.setGroupId( groupId );
|
||||||
reportPlugin.setArtifactId( artifactId );
|
reportPlugin.setArtifactId( artifactId );
|
||||||
|
reportPlugin.setVersion( version );
|
||||||
reportPlugins.add( reportPlugin );
|
reportPlugins.add( reportPlugin );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -801,7 +801,7 @@ under the License.
|
||||||
</lifecycles>
|
</lifecycles>
|
||||||
<!-- START SNIPPET: default-reports -->
|
<!-- START SNIPPET: default-reports -->
|
||||||
<defaultReports>
|
<defaultReports>
|
||||||
<report>org.apache.maven.plugins:maven-project-info-reports-plugin</report>
|
<report>org.apache.maven.plugins:maven-project-info-reports-plugin:2.0.1</report>
|
||||||
<!-- TODO: currently in mojo - should they be defaults any more?
|
<!-- TODO: currently in mojo - should they be defaults any more?
|
||||||
<report>org.apache.maven.plugins:maven-checkstyle-plugin</report>
|
<report>org.apache.maven.plugins:maven-checkstyle-plugin</report>
|
||||||
<report>org.apache.maven.plugins:maven-javadoc-plugin</report>
|
<report>org.apache.maven.plugins:maven-javadoc-plugin</report>
|
||||||
|
|
Loading…
Reference in New Issue