Re: Magic - included resources for custom Ant task (magic plugin?)

Cameron Taggart <[email protected]>
Newsgroups gmane.comp.jakarta.avalon.user
Message-ID <[email protected]>
I just stumbled upon a major problem with the approach I have taken.  
The taskdef requires that the library already by present in the 
classpath.  After a fresh checkout in another environment, I need Magic 
to download those neccessary libraries first.  It can't make it to that 
step.  Some info on setting up a Magic plugin would be greatly appreciated!

Cameron


Cameron Taggart wrote:

> Without understanding how to build a magic plugin, I went forward with 
> creating ant tasks for my project, xsd2jibx, with standard ant includes.
> http://cvs.sourceforge.net/viewcvs.py/jibx/xsd2jibx/ant-xsd2jibx-task.xml?rev=1.2&view=markup 
>
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <project xmlns:x="antlib:org.apache.avalon.tools">
>  
>  <x:property name="xsd2jibx.path" key="xsd2jibx" feature="path"/>
>  <x:property name="xpp3.path" key="xpp3" feature="path"/>
>  <x:property name="jibx-run.path" key="jibx-run" feature="path"/>
>  <x:property name="commons-logging.path" key="commons-logging" 
> feature="path"/>
>  <x:property name="jaxmejs.path" key="jaxmejs" feature="path"/>
>  <x:property name="log4j.path" key="log4j" feature="path"/>
>  
>  <path id="xsd2jibx.classpath">
>    <fileset dir="${magic.cache}" includes="
>       ${log4j.path},
>       ${xsd2jibx.path},
>       ${jibx-run.path},
>       ${xpp3.path},
>       ${commons-logging.path},
>       ${jaxmejs.path}"/>
>  </path>
>  
>  <taskdef name="xsd2jibx" classname="org.jibx.xsd2jibx.GeneratorAntTask">
>    <classpath>
>      <path refid="xsd2jibx.classpath"/>
>    </classpath>
>  </taskdef>
>  
> </project>
>
>
> The issue that I run into is that other projects that wish to use 
> xsd2jibx must reference all those resources.
> http://cvs.sourceforge.net/viewcvs.py/jibx/xsd2jibx/resources-common.xml?rev=1.3&view=markup 
>
>
> I was hoping that I could have some ant variables to work with in 
> index.xml, but no such luck.
>  <import index="../xsd2jibx/magic/resources-common.xml"/>
>  <!--<import index="${xsd2jibx_home}/magic/resources-common.xml"/>-->
>
> Is the magic plugin mechanism a better approach?  If yes, how can I 
> use it in this situation.
>
> Thanks,
> Cameron
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.