You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Nathan Coast <na...@codeczar.com> on 2003/09/25 08:04:30 UTC
ant or jelly tags
Hi,
I'd like to write a simple tag for use within a plugin. Should I write
an ant tag class, or do I have to write a Jelly tag class? If the
latter where are the docs on how to write a jelly tag? I found loads of
details on the jelly site about how to use the existing tags but very
little about how to write one.
The tag is simply going to take params and invoke a method with those
parameters.
thanks, Nathan
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: ant or jelly tags
Posted by Nathan Coast <na...@codeczar.com>.
fixed
xmlns:ejbgen="ejbgen">
<define:taglib uri="ejbgen">
<define:jellybean
className="com.codeczar.maven.plugins.ejbgen.EjbgenBean"
method="execute"
name="ejbgen"/>
</define:taglib>
<ejbgen:ejbgen outputDir="${maven.ejbgen.java.dir}"
descriptorDir="${maven.build.dest}\META-INF">
..........
Nathan Coast wrote:
> OK this is what's in my jelly
>
> .........
> xmlns:bean="jelly:bean">
>
>
> <bean:beandef
> className="com.codeczar.maven.plugins.ejbgen.EjbgenBean"
> methodName="execute"
> name="ejbgentag"/>
>
> <ejbgentag outputDir="${maven.ejbgen.java.dir}"
> descriptorDir="${maven.build.dest}\META-INF"
> .............
>
>
> and this is the exception
>
> java.lang.ClassNotFoundException: bean
> at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
> at
> org.apache.commons.jelly.parser.XMLParser.createTag(XMLParser.java:1039)
> at
> org.apache.commons.jelly.parser.XMLParser.startElement(XMLParser.java:647)
>
> I think I'm doing what I'm supposed to be doing following the docs here
> http://jakarta.apache.org/commons/jelly/libs/bean/tags.html
>
> any suggestions?
> cheers
> Nathan
>
> dion@multitask.com.au wrote:
>
>> Write a java bean. You can then use the jelly:bean tag to wrap it as a
>> jelly tag, and as long as the method name is execute, I believe Ant
>> will run it too.
>> --
>> dIon Gillard, Multitask Consulting
>> Blog: http://blogs.codehaus.org/people/dion/
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: ant or jelly tags
Posted by Nathan Coast <na...@codeczar.com>.
OK this is what's in my jelly
.........
xmlns:bean="jelly:bean">
<bean:beandef
className="com.codeczar.maven.plugins.ejbgen.EjbgenBean"
methodName="execute"
name="ejbgentag"/>
<ejbgentag outputDir="${maven.ejbgen.java.dir}"
descriptorDir="${maven.build.dest}\META-INF"
.............
and this is the exception
java.lang.ClassNotFoundException: bean
at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at org.apache.commons.jelly.parser.XMLParser.createTag(XMLParser.java:1039)
at
org.apache.commons.jelly.parser.XMLParser.startElement(XMLParser.java:647)
I think I'm doing what I'm supposed to be doing following the docs here
http://jakarta.apache.org/commons/jelly/libs/bean/tags.html
any suggestions?
cheers
Nathan
dion@multitask.com.au wrote:
> Write a java bean. You can then use the jelly:bean tag to wrap it as a
> jelly tag, and as long as the method name is execute, I believe Ant will
> run it too.
> --
> dIon Gillard, Multitask Consulting
> Blog: http://blogs.codehaus.org/people/dion/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: ant or jelly tags
Posted by Nathan Coast <na...@codeczar.com>.
cheers Dion,
figured there would be an easy answer. does jelly:bean supported nested
path structures?
e.g.
if my bean has a method
setSrc(Path srcPath)
{.....
can I declare
<mytag ......>
<src path="${src}"/>
<src path="${src2}"/>
</mytag>
dion@multitask.com.au wrote:
> Write a java bean. You can then use the jelly:bean tag to wrap it as a
> jelly tag, and as long as the method name is execute, I believe Ant will
> run it too.
> --
> dIon Gillard, Multitask Consulting
> Blog: http://blogs.codehaus.org/people/dion/
>
>
> Nathan Coast <na...@codeczar.com> wrote on 25/09/2003 04:04:30 PM:
>
>
>>Hi,
>>
>>I'd like to write a simple tag for use within a plugin. Should I write
>>an ant tag class, or do I have to write a Jelly tag class? If the
>>latter where are the docs on how to write a jelly tag? I found loads of
>
>
>>details on the jelly site about how to use the existing tags but very
>>little about how to write one.
>>
>>The tag is simply going to take params and invoke a method with those
>>parameters.
>>
>>thanks, Nathan
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>For additional commands, e-mail: users-help@maven.apache.org
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: ant or jelly tags
Posted by di...@multitask.com.au.
Write a java bean. You can then use the jelly:bean tag to wrap it as a
jelly tag, and as long as the method name is execute, I believe Ant will
run it too.
--
dIon Gillard, Multitask Consulting
Blog: http://blogs.codehaus.org/people/dion/
Nathan Coast <na...@codeczar.com> wrote on 25/09/2003 04:04:30 PM:
> Hi,
>
> I'd like to write a simple tag for use within a plugin. Should I write
> an ant tag class, or do I have to write a Jelly tag class? If the
> latter where are the docs on how to write a jelly tag? I found loads of
> details on the jelly site about how to use the existing tags but very
> little about how to write one.
>
> The tag is simply going to take params and invoke a method with those
> parameters.
>
> thanks, Nathan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org