Hi Jeff,

Thanks a ton for your response!

I tried putting all the dependencies into the root class loader like this;

<dependency>
  ...
  <properties>
    <classloader>root</classloader>
  </properties>
</dependency>

did you put all your dependencies into the root loader or just a couple?

I also spent some 'quality' time with the cactus plugin and I think I'm doing exactly what is being done there.

Although the cactus plugin only defines tasks. Did your plugin define both tasks and types?

Thanks again,

-bd-

On Sep 8, 2004, at 8:30 AM, Jefferson K. French wrote:

I don't know if this will help you, but besides doing what the post
suggests, I also had to put this:

  <classloader>root</classloader>

in one of my project.xml's <dependency> definitions to get the JAR to
load in the same classpath as another JAR that used it. This behavior
is supposed to be deprecated, but I couldn't figure out another way to
get it to work.

On Tue, 07 Sep 2004, at 14:07:18 [GMT -0600] Bill Dudney wrote:

Another bit of info that I noticed that I left out. The
ClassCastException happens in ant because the type and the tasks are
loaded by different classloaders. I'm assuming that is what is
happening here but being a maven nubie I'm not sure.

I read this post

http://maven.apache.org/faq.html#classloader-property

but I could not make sense of why my stuff is not working. Both try 1
and try 2 below should be basically the same thing as what is described
in this post (AFAIK). Just for grins I rearranged everything to look
exactly like what's in that post and got the same exception.

Thanks again for any help.

-bd-

On Sep 7, 2004, at 1:19 PM, Bill Dudney wrote:

Hello,

I am trying to define both a custom task and a custom type in a maven
plugin.jelly file.

I have tried many different combinations of {type/task}def but have
not been able to get around the ClassCastException problem.

first try;

    <ant:typedef resource="types.properties"
classpathref="custom.classpath"/>
    <ant:taskdef resource="tasks.properties"
classpathref="custom.classpath"/>

second try

    <ant:typedef resource="types.properties"
classpathref="custom.classpath"
                           loaderRef="foo"/>
    <ant:taskdef resource="tasks.properties"
classpathref="custom.classpath"
                           loaderRef="foo"/>

I also tried defining each task and type separately but same result.

Any pointers would be greatly appreciated.

TTFN,

-bd-

-- mailto:[EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to