jvanzyl     2004/05/26 23:47:45

  Modified:    maven-plugin/src/main/java/org/apache/maven/plugin/generator/jelly
                        JellyHarnessGenerator.java
  Log:
  o d:tag must be inside d:taglib
  o generate stub project.xml file with a dep on the maven-plugin jar
  
  Revision  Changes    Path
  1.5       +46 -3     
maven-components/maven-plugin/src/main/java/org/apache/maven/plugin/generator/jelly/JellyHarnessGenerator.java
  
  Index: JellyHarnessGenerator.java
  ===================================================================
  RCS file: 
/home/cvs/maven-components/maven-plugin/src/main/java/org/apache/maven/plugin/generator/jelly/JellyHarnessGenerator.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JellyHarnessGenerator.java        27 May 2004 01:58:26 -0000      1.4
  +++ JellyHarnessGenerator.java        27 May 2004 06:47:45 -0000      1.5
  @@ -13,7 +13,8 @@
   /**
    * @todo use the descriptions in the descriptor for the javadoc pushed into the 
source code.
    * @todo write plugin.properties (as a place holder, we don't technially need it)
  - * @todo convert POM or just strip out the dependencies
  + * @todo convert POM or just strip out the dependencies to create a project.xml that
  + *       will serve as the trigger to download dependencies.
    */
   public class JellyHarnessGenerator
       extends AbstractGenerator
  @@ -70,8 +71,6 @@
   
           w.endElement();
   
  -        w.endElement();
  -
           // ----------------------------------------------------------------------
           // tag
           // ----------------------------------------------------------------------
  @@ -116,6 +115,8 @@
   
           w.endElement();
   
  +        w.endElement();
  +
           // ----------------------------------------------------------------------
           // goals
           // ----------------------------------------------------------------------
  @@ -169,6 +170,48 @@
           // ----------------------------------------------------------------------
           //
           // ----------------------------------------------------------------------
  +
  +        writer.flush();
  +
  +        writer.close();
  +
  +        // ----------------------------------------------------------------------
  +        // project.xml
  +        // ----------------------------------------------------------------------
  +
  +        writer = new FileWriter( new File( destinationDirectory, "project.xml" ) );
  +
  +        w = new PrettyPrintXMLWriter( writer );
  +
  +        w.startElement( "project" );
  +
  +        w.startElement( "dependencies" );
  +
  +        w.startElement( "dependency" );
  +
  +        w.startElement( "groupId" );
  +
  +        w.writeText( "maven" );
  +
  +        w.endElement();
  +
  +        w.startElement( "artifactId" );
  +
  +        w.writeText( "maven-plugin" );
  +
  +        w.endElement();
  +
  +        w.startElement( "version" );
  +
  +        w.writeText( "2.0-SNAPSHOT" );
  +
  +        w.endElement();
  +
  +        w.endElement();
  +
  +        w.endElement();
  +
  +        w.endElement();
   
           writer.flush();
   
  
  
  

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

Reply via email to