On Wed, 16 Mar 2005, dan tran wrote:

> Kenny,
>
> I have maven.dependency.classpath in my classpath.

Ok, that's fine. As Jason Vinson suggested, pom.getDependencyClasspath()
also works (has the same effect).

> In verbose mode, maven how the classpath of the project calling the plugin.
> No sign of the classpath belong to the plugin.

I think I know what the problem is - your plugin has some dependencies
that need to be in the classpath, so when you call the plugin-bean from
your project, the required library is not in the classpath.

As I understand it the situation is as follows:

your-plugin:
        your-bean.jar

your-project:
        project.xml:
                - dependency to XYZ.jar
                - dependency to your-plugin (optional)
                - produces project-artifact.jar

        maven.xml:
                calls Bean.doIt() in your-plugin/your-bean.jar,
                with classpath:
                        XYZ.jar

You want to add your-bean.jar to the classpath above.

Simply add your-bean.jar to the dependency list of project.xml.
If you incorporate plugins/jars into your project, only those
jars are added (explicitly in the dependency list). The jars
those plugins/jars depend on DON'T get added to your project's dependency
list.

This is an issue that will not be fixed until maven 2, as I understand it.


Hope this helps.

Greetings,

        Kenney


>
> -D
>
> On Wed, 16 Mar 2005 11:15:36 +0100 (CET), Kenney Westerhof
> <[EMAIL PROTECTED]> wrote:
> > On Wed, 16 Mar 2005, dan tran wrote:
> >
> > > oh, I have to fork it, and got CNF exception
> > >
> > > other wise using the same JVM it is loaed like you have said
> >
> > try
> >
> > <java classname="your.bean.Main" fork="true">
> >  <classpath refid="maven.dependency.classpath"/>
> > </java>
> >
> > Greetings,
> >
> >        Kenney
> > >
> > > -Dan
> > >
> > >
> > >
> > > On Wed, 16 Mar 2005 09:54:26 +0100, Jïrg Schaible
> > > <[EMAIL PROTECTED]> wrote:
> > > > Hi Dan,
> > > >
> > > > > -----Original Message-----
> > > > > From: dan tran [mailto:[EMAIL PROTECTED]
> > > > > Sent: Wednesday, March 16, 2005 9:46 AM
> > > > > To: Maven Users List
> > > > > Subject: Re: Where is the bean in my plugin?
> > > > >
> > > > >
> > > > > thanks,  but i do know where it is inthe cache,
> > > > >
> > > > > but when I use ant:java to call it , can it dynamically
> > > > > construct the classpath to reach my bean?
> > > >
> > > > Haven't you tried it? My guess would be as long as you don't fork it 
> > > > should use the same classloader.
> > > >
> > > > - Jïrg
> > > >
> > > > ---------------------------------------------------------------------
> > > > 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]
> > >
> > >
> >
> > --
> > Kenney Westerhof
> > http://www.neonics.com
> > GPG public key: http://www.gods.nl/~forge/kenneyw.key
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

--
Kenney Westerhof
http://www.neonics.com
GPG public key: http://www.gods.nl/~forge/kenneyw.key

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

Reply via email to