You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Guo, Jiaqi" <cy...@gmail.com> on 2005/11/01 23:00:19 UTC

[102] How to get/create the ClassLoader for current project

One of my jelly tag classes(Class extending 
org.apache.commons.jelly.TagSupport, defined by <define:jellybean>) in 
maven plugin needs the ClassLoader object which can find any class in 
current project or the depending libraries.

If I do
<ant:path id="projectClasspath">
    <ant:pathelement location="${maven.build.dest}" />
    <ant:path refid="maven.dependency.classpath" />
</ant:path>
I can only use this path definition in ant tags through classpathref 
attribute. Is there anyway for other jelly tag class to access 
"projectClasspath"? If not, how can I get the project ClassLoader object 
that I want?


Thanks in advance




Regards
Jiaqi

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


Re: [102] How to get/create the ClassLoader for current project

Posted by Brett Porter <br...@gmail.com>.
Aside from how you'd actually do this (which could be a bit tricky),
the example below would actually be included in the default
classloader the plugin gets.

- Brett

On 11/2/05, Guo, Jiaqi <cy...@gmail.com> wrote:
> One of my jelly tag classes(Class extending
> org.apache.commons.jelly.TagSupport, defined by <define:jellybean>) in
> maven plugin needs the ClassLoader object which can find any class in
> current project or the depending libraries.
>
> If I do
> <ant:path id="projectClasspath">
>     <ant:pathelement location="${maven.build.dest}" />
>     <ant:path refid="maven.dependency.classpath" />
> </ant:path>
> I can only use this path definition in ant tags through classpathref
> attribute. Is there anyway for other jelly tag class to access
> "projectClasspath"? If not, how can I get the project ClassLoader object
> that I want?
>
>
> Thanks in advance
>
>
>
>
> Regards
> Jiaqi
>
> ---------------------------------------------------------------------
> 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