You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by nicolas de loof <ni...@apache.org> on 2008/06/24 14:16:55 UTC
Howto access plugin dependencies as Artifacts ?
Hello,
from a plugin (the mojo sandbox gwt-maven-plugin) I need to access one of
the plugin dependencies as a File.
How can I retrieve the plugin MavenProject, or any equivalent, to retrieve
the dependency as an Artifact or File ?
I have the ugly option to cast the classloader to URLClassLoader and search
the URLs :
URLClassLoader cl = (URLClassLoader) getClass().getClassLoader();
URL[] urls = cl.getURLs();
for ( int i = 0; i < urls.length; i++ )
{
...
Re: Howto access plugin dependencies as Artifacts ?
Posted by Brett Porter <br...@apache.org>.
I think ${plugin.artifacts} works.
- Brett
On 24/06/2008, at 8:16 PM, nicolas de loof wrote:
> Hello,
>
> from a plugin (the mojo sandbox gwt-maven-plugin) I need to access
> one of
> the plugin dependencies as a File.
> How can I retrieve the plugin MavenProject, or any equivalent, to
> retrieve
> the dependency as an Artifact or File ?
>
> I have the ugly option to cast the classloader to URLClassLoader and
> search
> the URLs :
>
> URLClassLoader cl = (URLClassLoader)
> getClass().getClassLoader();
> URL[] urls = cl.getURLs();
> for ( int i = 0; i < urls.length; i++ )
> {
> ...
--
Brett Porter
brett@apache.org
http://blogs.exist.com/bporter/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org