[ http://jira.codehaus.org/browse/MNG-897?page=comments#action_47179 ] 

Steve Loughran commented on MNG-897:
------------------------------------

I'm not going to comment on the merites of the idea; that is for a maven 
person. 

but from the perspective of the Ant team, there are better ways to embed stuff. 

just define a new ant datatype, give it an ID. Then ant itself can read (and 
ignore it), or it can be extracted using XSLT

<mojo:metadata id="my-metadata" >
      <mojo goal="myGoal" phase="generate-sources">
      <description>This goal does something really cool</description>
      <parameters>
        <parameter name="basedir" expression="${basedir}" required="true" 
type="java.io.File"/>
      </parameters>
      <call>myGoalTarget</call>
    </mojo>

    <mojo goal="defaultGoal" phase="compile">
      <description>This goal does something really cool</description>
      <parameters>
        <parameter name="basedir" expression="${basedir}" required="true" 
type="java.io.File"/>
      </parameters>
    </mojo>
</mojo:metadata>

The metadata type would do nothing with it ('cept flag if there was a duplicate 
definition), but you could extract this stuff programmatically, or by an xpath 
expression like //*/mojo:[EMAIL PROTECTED]"my-metadata"]

Also, you do have to parse an XML doc as an XML doc, not a string. otherwise 
you wont handle entity includes, ant imports, etc properly.


> allows use of Ant build files
> -----------------------------
>
>          Key: MNG-897
>          URL: http://jira.codehaus.org/browse/MNG-897
>      Project: Maven 2
>         Type: Improvement
>   Components: maven-ant-plugin
>     Versions: 2.0-alpha-3
>     Reporter: Chris Berry
>     Assignee: John Casey
>      Fix For: 2.0-beta-3
>  Attachments: antfile.zip
>
> Original Estimate: 8 hours
>        Time Spent: 6 hours
>         Remaining: 2 hours
>
> Per John Casey, This is logged to that it stays on the radar.
> Please consider incorporating my antfile plugin.
> I have included the following in the ZIP
> maven-antrun-plugin --> the basic antrun w/ a few small mods
> maven-antfile-plugin
> maven-axisant-plugin --> an example plugin using the antfile plugin
> axis-master --> a "grouping" plugin for axis example
> my-app --> an example app using the axisant plugin.
> Cheers,
> -- Chris 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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

Reply via email to