jvanzyl     2004/05/09 08:22:11

  Modified:    maven-pluggy/src/main/java/org/apache/maven/pluggy
                        Pluggy.java
               maven-pluggy/src/test/java/org/apache/maven/pluggy
                        PluggyTest.java
               maven-pluggy/src/test/resources/source IdeaPlugin.java
  Log:
  o add description processing to the goal for doco generationxc
  
  Revision  Changes    Path
  1.2       +16 -1     
maven-components/maven-pluggy/src/main/java/org/apache/maven/pluggy/Pluggy.java
  
  Index: Pluggy.java
  ===================================================================
  RCS file: 
/home/cvs/maven-components/maven-pluggy/src/main/java/org/apache/maven/pluggy/Pluggy.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Pluggy.java       9 May 2004 14:58:34 -0000       1.1
  +++ Pluggy.java       9 May 2004 15:22:11 -0000       1.2
  @@ -107,6 +107,12 @@
   
               w.endElement();
   
  +            w.startElement( "description" );
  +
  +            w.writeText( goal.getDescription() );
  +
  +            w.endElement();
  +
               List parameters = goal.getParameters();
   
               w.startElement( "parameters" );
  @@ -146,6 +152,10 @@
           writer.close();
       }
   
  +    // ----------------------------------------------------------------------
  +    // Plugin descriptor creation from @tags
  +    // ----------------------------------------------------------------------
  +
       private PluginDescriptor createPluginDescriptor( JavaSource javaSource )
       {
           PluginDescriptor pluginDescriptor = new PluginDescriptor();
  @@ -198,9 +208,14 @@
   
               goalDescriptor.setName( goalNameTag.getValue() );
   
  -            List parameters = new ArrayList();
  +            DocletTag goalDescriptionTag = javaClass.getTagByName( "goal." + 
goalNameTag.getValue() + ".description" );
   
  +            if ( goalDescriptionTag != null )
  +            {
  +                goalDescriptor.setDescription( goalDescriptionTag.getValue() );
  +            }
   
  +            List parameters = new ArrayList();
   
               for ( int j = 0; j < goalParameters.length; j++ )
               {
  
  
  
  1.2       +3 -1      
maven-components/maven-pluggy/src/test/java/org/apache/maven/pluggy/PluggyTest.java
  
  Index: PluggyTest.java
  ===================================================================
  RCS file: 
/home/cvs/maven-components/maven-pluggy/src/test/java/org/apache/maven/pluggy/PluggyTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PluggyTest.java   9 May 2004 14:58:34 -0000       1.1
  +++ PluggyTest.java   9 May 2004 15:22:11 -0000       1.2
  @@ -53,6 +53,8 @@
   
           assertEquals( "idea", gd.getName() );
   
  +        assertEquals( "Goal to create IDEA files from a POM", gd.getDescription() );
  +
           // ----------------------------------------------------------------------
           // Parameters
           // ----------------------------------------------------------------------
  
  
  
  1.2       +1 -0      
maven-components/maven-pluggy/src/test/resources/source/IdeaPlugin.java
  
  Index: IdeaPlugin.java
  ===================================================================
  RCS file: 
/home/cvs/maven-components/maven-pluggy/src/test/resources/source/IdeaPlugin.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- IdeaPlugin.java   9 May 2004 14:58:34 -0000       1.1
  +++ IdeaPlugin.java   9 May 2004 15:22:11 -0000       1.2
  @@ -12,6 +12,7 @@
    * @plugin.mode integrated
    *
    * @goal.name idea
  + * @goal.idea.description Goal to create IDEA files from a POM
    * @goal.idea.parameter project #project
    */
   public class IdeaPlugin
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to