You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Bill Lynch <bi...@gmail.com> on 2004/11/29 18:14:27 UTC
Strange JSPC/Taskdef issues
All,
I discovered recently that it's pretty much impossible to run the JSPC
task more than once. Others have had this issue before (I researched
the list a bit) and it seems like it's more of a taskdef problem. The
issue is this:
<taskdef classname="org.apache.jasper.JspC" name="jasper2">
<classpath>
... dynamic path elements here like so: ...
<pathelement location="lib/plugin-${plugin}.jar" />
</classpath>
</taskdef>
Calling that once is ok but calling it twice with a different set of
jars (notice the pathelement is dynamic) results in an error:
java.lang.ExceptionInInitializerError
That traces to the org.apache.tools.ant.taskdefs.Definer class at line 457:
addDefinition(..) method:
...
if (onError != OnError.IGNORE) {
cl = Class.forName(classname, true, al); // Line 457
}
..
I don't know if this is possible but I'd like to be able to do a
taskdef more than once. I'd expect that it would just override the
previous definition. Is that possible?
Also, is the user list the right place for this? I can repost to the
dev list if it's more appropriate.
Cheers,
--Bill
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Strange JSPC/Taskdef issues
Posted by Bill Lynch <bi...@gmail.com>.
Jake,
I did try this however the problem is that all taskdefs are copied
over too. :-\ Is there a way around this?
Cheers,
--Bill
On Tue, 30 Nov 2004 23:44:26 -0600, Jacob Kjome <ho...@visi.com> wrote:
> At 10:09 AM 11/30/2004 -0800, you wrote:
> >Jake,
> >
> >I tried doing that via <ant> but it didn't really work -- IOW, it
> >didn't reinitialize. Should I use antcall instead? What's the
> >difference?
>
> Did you set <ant> so that properties and references don't get
> propagated? See the Ant task manual for info on what attributes you need
> to set to do this. <ant> is actually the way to go here. It if doesn't
> work with <ant> (properly configured), it almost certainly won't work with
> <antcall>.
>
> Jake
>
>
>
> >
> >Thanks,
> >--Bill
> >
> >
> >On Mon, 29 Nov 2004 23:36:35 -0600, Jacob Kjome <ho...@visi.com> wrote:
> >>
> >> Does it work if you use <antcall> and (re)initialize the taskdef within the
> >> <antcall>?
> >>
> >> Jake
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> >For additional commands, e-mail: user-help@ant.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Strange JSPC/Taskdef issues
Posted by Jacob Kjome <ho...@visi.com>.
At 10:09 AM 11/30/2004 -0800, you wrote:
>Jake,
>
>I tried doing that via <ant> but it didn't really work -- IOW, it
>didn't reinitialize. Should I use antcall instead? What's the
>difference?
Did you set <ant> so that properties and references don't get
propagated? See the Ant task manual for info on what attributes you need
to set to do this. <ant> is actually the way to go here. It if doesn't
work with <ant> (properly configured), it almost certainly won't work with
<antcall>.
Jake
>
>Thanks,
>--Bill
>
>
>On Mon, 29 Nov 2004 23:36:35 -0600, Jacob Kjome <ho...@visi.com> wrote:
>>
>> Does it work if you use <antcall> and (re)initialize the taskdef within the
>> <antcall>?
>>
>> Jake
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Strange JSPC/Taskdef issues
Posted by Bill Lynch <bi...@gmail.com>.
Jake,
I tried doing that via <ant> but it didn't really work -- IOW, it
didn't reinitialize. Should I use antcall instead? What's the
difference?
Thanks,
--Bill
On Mon, 29 Nov 2004 23:36:35 -0600, Jacob Kjome <ho...@visi.com> wrote:
>
> Does it work if you use <antcall> and (re)initialize the taskdef within the
> <antcall>?
>
> Jake
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Strange JSPC/Taskdef issues
Posted by Jacob Kjome <ho...@visi.com>.
Does it work if you use <antcall> and (re)initialize the taskdef within the
<antcall>?
Jake
At 09:14 AM 11/29/2004 -0800, you wrote:
>All,
>
>I discovered recently that it's pretty much impossible to run the JSPC
>task more than once. Others have had this issue before (I researched
>the list a bit) and it seems like it's more of a taskdef problem. The
>issue is this:
>
><taskdef classname="org.apache.jasper.JspC" name="jasper2">
> <classpath>
> ... dynamic path elements here like so: ...
> <pathelement location="lib/plugin-${plugin}.jar" />
> </classpath>
></taskdef>
>
>Calling that once is ok but calling it twice with a different set of
>jars (notice the pathelement is dynamic) results in an error:
>
>java.lang.ExceptionInInitializerError
>
>That traces to the org.apache.tools.ant.taskdefs.Definer class at line 457:
>
>addDefinition(..) method:
>...
>if (onError != OnError.IGNORE) {
> cl = Class.forName(classname, true, al); // Line 457
>}
>..
>
>I don't know if this is possible but I'd like to be able to do a
>taskdef more than once. I'd expect that it would just override the
>previous definition. Is that possible?
>
>Also, is the user list the right place for this? I can repost to the
>dev list if it's more appropriate.
>
>Cheers,
>--Bill
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org