Take a look at the ResolvePluginsMojo.java in dependency-maven-plugin:
https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-dependency-pl
ugin/src/main/java/org/apache/maven/plugin/dependency/resolvers/ResolveP
luginsMojo.java

It was working before the refactor but could be broken now. It will at
least give you a reference point. 

-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Yann Albou
Sent: Thursday, September 21, 2006 3:57 PM
To: users@maven.apache.org
Subject: How to get plugin dependencies?

  Hello,

I tried to create a plugin in which I would like to acces dependencies
(not the dependencies from the project that use this plugin but only the
dependencies from this plugin).

I tried the following:

/**
  * My Goal.
  * @goal mygoal
  */
public class MyMojo extends AbstractMojo {

     /**
      * The descriptor instance for the current plugin, including its
dependency artifacts.
      * @parameter expression="${plugin}"
     */
     private PluginDescriptor plugin;


     public void execute() throws MojoExecutionException {
         List pluginDeps = plugin.getDependencies();
         // pluginDeps is NULL
     }

But the plugin value is empty.

How can I acheive this ?
I also tried with addind @requiresDependencyResolution compile


Thanks
Yann.


---------------------------------------------------------------------
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