You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Brett Porter <bp...@f2network.com.au> on 2003/04/10 04:27:22 UTC

taskdef in plugin

Hi,

I'm having problems with using a taskdef in a plugin in beta-9.

The plugin compiles and installs ok, but when I run something that uses 
it, I get:
null:24:113: <ant:taskdef> taskdef class com.sun.tools.xjc.XJCTask 
cannot be found

I have xjc as a dependency in the plugin (set with 
<properties><classloader>root</classloader></properties>), and have 
tried making it a dep inside the one I'm compiling too, but it doesn't 
seem to help

maven -X shows that the xjc JAR is in the maven.dependency.classpath and 
  I checked the class is present.

This is line 24:
   <ant:taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask" 
classpathref="maven.dependency.classpath" />
(tried without cpref as well)

Any ideas why it isn't finding it in the class loader?

Thanks,
Brett

-- 
Web Developer
f2 network ~ everything essential
02 8596 4437


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: taskdef in plugin

Posted by di...@multitask.com.au.
Brett Porter <bp...@f2network.com.au> wrote on 14/04/2003 08:22:51 AM:

> Thanks.
> 
> I wonder would "ant" and "maven" be more appropriate for these values? I
> know this means another plugin change, but would be best to do in the
> beta phase and the old ones could perhaps be kept and deprecated, to
> remove for 1.0.
> 
> What do you think?

Jason has apparently switched the codebase to classwords from forehead, so 
we'll have to see what happens out of that change..

> Would you like me to do a short blurb for the page:
> http://maven.apache.org/reference/developer-guide.html
> that describes plugin dependencies and classloaders?
That'd be great!

We can keep it up to date once the new code comes in....
--
dIon Gillard, Multitask Consulting
Blog:      http://www.freeroller.net/page/dion/Weblog
Work:      http://www.multitask.com.au




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: taskdef in plugin

Posted by Brett Porter <bp...@f2network.com.au>.
Thanks.

I wonder would "ant" and "maven" be more appropriate for these values? I
know this means another plugin change, but would be best to do in the
beta phase and the old ones could perhaps be kept and deprecated, to
remove for 1.0.

What do you think?

Would you like me to do a short blurb for the page:
http://maven.apache.org/reference/developer-guide.html
that describes plugin dependencies and classloaders?

Cheers,
Brett

dion@multitask.com.au wrote:
> Brett Porter <bp...@f2network.com.au> wrote on 11/04/2003 03:31:34 PM:
> 
> 
>>I got this sorted out - turned out it was a missing dependency on a 
>>class required by the task.
>>
>>I haven't seen it written anywhere, but is 
>><properties><classloader>root</classloader></properties the best way to 
>>go here? What other classloaders are there? (I've seen root.maven).
> 
> 
> Yep. the 'root' classloader is where ant finds jars in maven.
> 
> The 'root.maven' classloader is where maven finds jars.
> 
> These are defined in $MAVEN_HOME/bin/forehead.conf
> --
> dIon Gillard, Multitask Consulting
> Blog:      http://www.freeroller.net/page/dion/Weblog
> Work:      http://www.multitask.com.au
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org

-- 
Web Developer
f2 network ~ everything essential
02 8596 4437


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: taskdef in plugin

Posted by di...@multitask.com.au.
Brett Porter <bp...@f2network.com.au> wrote on 11/04/2003 03:31:34 PM:

> I got this sorted out - turned out it was a missing dependency on a 
> class required by the task.
> 
> I haven't seen it written anywhere, but is 
> <properties><classloader>root</classloader></properties the best way to 
> go here? What other classloaders are there? (I've seen root.maven).

Yep. the 'root' classloader is where ant finds jars in maven.

The 'root.maven' classloader is where maven finds jars.

These are defined in $MAVEN_HOME/bin/forehead.conf
--
dIon Gillard, Multitask Consulting
Blog:      http://www.freeroller.net/page/dion/Weblog
Work:      http://www.multitask.com.au

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: taskdef in plugin

Posted by Brett Porter <bp...@f2network.com.au>.
I got this sorted out - turned out it was a missing dependency on a 
class required by the task.

I haven't seen it written anywhere, but is 
<properties><classloader>root</classloader></properties the best way to 
go here? What other classloaders are there? (I've seen root.maven).

Thanks,
Brett

Brett Porter wrote:
> Hi,
> 
> I'm having problems with using a taskdef in a plugin in beta-9.
> 
> The plugin compiles and installs ok, but when I run something that uses 
> it, I get:
> null:24:113: <ant:taskdef> taskdef class com.sun.tools.xjc.XJCTask 
> cannot be found
> 
> I have xjc as a dependency in the plugin (set with 
> <properties><classloader>root</classloader></properties>), and have 
> tried making it a dep inside the one I'm compiling too, but it doesn't 
> seem to help
> 
> maven -X shows that the xjc JAR is in the maven.dependency.classpath and 
>  I checked the class is present.
> 
> This is line 24:
>   <ant:taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask" 
> classpathref="maven.dependency.classpath" />
> (tried without cpref as well)
> 
> Any ideas why it isn't finding it in the class loader?
> 
> Thanks,
> Brett
> 

-- 
Web Developer
f2 network ~ everything essential
02 8596 4437


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org