maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r720001 - in /maven/components/trunk/maven-core/src/main: java/org/apache/maven/lifecycle/binding/DefaultLifecycleBindingManager.java resources/META-INF/plexus/components.xml
Date Sun, 23 Nov 2008 16:09:58 GMT
Author: bentmann
Date: Sun Nov 23 08:09:58 2008
New Revision: 720001

URL: http://svn.apache.org/viewvc?rev=720001&view=rev
Log:
[MNG-3787] Add plugin version to default reports

Modified:
    maven/components/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/binding/DefaultLifecycleBindingManager.java
    maven/components/trunk/maven-core/src/main/resources/META-INF/plexus/components.xml

Modified: maven/components/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/binding/DefaultLifecycleBindingManager.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/binding/DefaultLifecycleBindingManager.java?rev=720001&r1=720000&r2=720001&view=diff
==============================================================================
--- maven/components/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/binding/DefaultLifecycleBindingManager.java
(original)
+++ maven/components/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/binding/DefaultLifecycleBindingManager.java
Sun Nov 23 08:09:58 2008
@@ -484,14 +484,16 @@
                 String report = (String) i.next();
 
                 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
                 {
                     String groupId = tok.nextToken();
                     String artifactId = tok.nextToken();
+                    String version = tok.hasMoreTokens() ? tok.nextToken() : null;
 
                     boolean found = false;
                     for ( Iterator j = reportPlugins.iterator(); j.hasNext() && !found;
)
@@ -509,6 +511,7 @@
                         ReportPlugin reportPlugin = new ReportPlugin();
                         reportPlugin.setGroupId( groupId );
                         reportPlugin.setArtifactId( artifactId );
+                        reportPlugin.setVersion( version );
                         reportPlugins.add( reportPlugin );
                     }
                 }

Modified: maven/components/trunk/maven-core/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-core/src/main/resources/META-INF/plexus/components.xml?rev=720001&r1=720000&r2=720001&view=diff
==============================================================================
--- maven/components/trunk/maven-core/src/main/resources/META-INF/plexus/components.xml (original)
+++ maven/components/trunk/maven-core/src/main/resources/META-INF/plexus/components.xml Sun
Nov 23 08:09:58 2008
@@ -801,7 +801,7 @@
         </lifecycles>
         <!-- START SNIPPET: default-reports -->
         <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?
           <report>org.apache.maven.plugins:maven-checkstyle-plugin</report>
           <report>org.apache.maven.plugins:maven-javadoc-plugin</report>



Mime
View raw message