> Le 17 déc. 2014 à 22:25, Martin Flores <mflor...@gmail.com> a écrit :
> 
> Hi everyone, I'm about to develop to develop a custom Ivy parser but I
> haven't found enough information on the Ant/Ivy web sites about it.
> 
> I already checkout the Ivy code but, I would like to know if someone can
> point me to a sample about how to integrate a custom parser on Ivy.

A parser need to implement the interface 
org.apache.ivy.plugins.parser.ModuleDescriptorParser.

Once you have an implementation, you will have to reference it in an 
ivysettings in order to use it.
First you’ll need to ensure that your implementation can be looked up by Ivy, 
either by ensuring that it is within Ivy’s classpath, or via the classpath 
element [1].
Then use typedef [2] to declare your parser. And finally create an instance of 
it, with some parameters if needed, by declaring the element of your parser.
It should look like that:

<classpath file="myparser.jar" />
<tyepdef name="myparser" classname="org.acme.MyParser" />
<myparser someparameter="somevalue" />

Nicolas

[1] http://ant.apache.org/ivy/history/latest-milestone/settings/classpath.html 
<http://ant.apache.org/ivy/history/latest-milestone/settings/classpath.html>
[2] http://ant.apache.org/ivy/history/latest-milestone/settings/typedef.html 
<http://ant.apache.org/ivy/history/latest-milestone/settings/typedef.html>

Reply via email to