Makes sense - thanks.

When I tried to implement this approach,
project.getCompileClasspathElements() unexpectedly returned just the
project build output directory, and project.getArtifacts() returned
the empty set.  However, project.getDependencies() is populated as
expected.

The plugin executes during generate-sources phase, and is triggered
implicitly by
  m2 generate-sources

Any ideas on how to get a fully resolved compile classpath?

Kind Regards,
John Fallows.

On 9/15/05, Kenney Westerhof <[EMAIL PROTECTED]> wrote:
> On Thu, 15 Sep 2005, John Fallows wrote:
> 
> Hi,
> 
> For now, you have to create an URLClassLoader and add the results
> of project.getXXXClasspath() to it. Then use that classloader to call
> getResource().
> 
> Ofcourse, the build-project should be refferred to from the current
> project in a dependency, but I think that's already the case..?
> 
> -- Kenney
> 
> > Is it possible to add project dependencies to a plugin classpath?
> >
> > Here's the usecase project layout.
> >
> > project/
> >   api-module/
> >   impl-module/
> >   build-module/
> >
> > The same plugin is used in both api-module and impl-module and needs
> > access to the same config files.
> >
> > The build-module contains the common config files and delivers a
> > self-contained JAR.
> >
> > The api-module and impl-module each depend on build-module.
> >
> > Is there some way to get build-module onto the classpath for the
> > plugin, so that ClassLoader.getResource("...") will see into the
> > contents of the build-module JAR during plugin execution?
> >
> > Perhaps <plugin><dependency/> ?
> >
> > Kind Regards,
> > John Fallows.
> >
> > ---------------------------------------------------------------------
> > 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]
> 
>

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

Reply via email to