Author: vsiveton Date: Fri Feb 22 04:42:27 2008 New Revision: 630181 URL: http://svn.apache.org/viewvc?rev=630181&view=rev Log: MPLUGIN-28: Error of goal value in Plugin documentation generation
o added a goal prefix parameter o updated warn msg Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/PluginReport.java Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java?rev=630181&r1=630180&r2=630181&view=diff ============================================================================== --- maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java (original) +++ maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/AbstractGeneratorMojo.java Fri Feb 22 04:42:27 2008 @@ -109,7 +109,8 @@ else { getLog().warn( - "Goal prefix is: " + goalPrefix + "; Maven currently expects it to be " + defaultGoalPrefix ); + "\n\nGoal prefix is specified as: '" + goalPrefix + "'. " + + "Maven currently expects it to be '" + defaultGoalPrefix + "'.\n" ); } mojoScanner.setActiveExtractors( extractors ); Modified: maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/PluginReport.java URL: http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/PluginReport.java?rev=630181&r1=630180&r2=630181&view=diff ============================================================================== --- maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/PluginReport.java (original) +++ maven/plugin-tools/trunk/maven-plugin-plugin/src/main/java/org/apache/maven/plugin/plugin/PluginReport.java Fri Feb 22 04:42:27 2008 @@ -108,6 +108,14 @@ */ private Requirements requirements; + /** + * The goal prefix that will appear before the ":". + * + * @parameter expression="${goalPrefix}" + * @since 2.4 + */ + protected String goalPrefix; + /** [EMAIL PROTECTED] */ protected Renderer getSiteRenderer() { @@ -135,7 +143,18 @@ return; } - String goalPrefix = PluginDescriptor.getGoalPrefixFromArtifactId( project.getArtifactId() ); + // Copy from AbstractGeneratorMojo#execute() + String defaultGoalPrefix = PluginDescriptor.getGoalPrefixFromArtifactId( project.getArtifactId() ); + if ( goalPrefix == null ) + { + goalPrefix = defaultGoalPrefix; + } + else + { + getLog().warn( + "\n\nGoal prefix is specified as: '" + goalPrefix + "'. Maven currently expects it to be '" + + defaultGoalPrefix + "'.\n" ); + } // TODO: could use this more, eg in the writing of the plugin descriptor! PluginDescriptor pluginDescriptor = new PluginDescriptor();