Hi all,

I currently have a small issue with upgrading to Maven 3 and a custom
mojo I wrote.

I need to find out if the dependency is a Maven plugin. With Maven 2.x
one could check the type by comparing Artifact.getType() to
"maven-plugin". With Maven 3 this returns now "jar" instead of
"maven-plugin".
Is there any other way to find out if a dependency is a Maven plugin?
Any pointers to the API would be greatly appreciated!

E.g. up to Maven 3 this code did work:

MavenProject prj = ...
for(Iterator i = prj.getDependencyArtifacts().iterator(); i.hasNext();)
{
   Artifact artifact = (Artifact) i.next();
   if( "maven-plugin".equals( artifact.getType() ) ) {
      //do some specific stuff
   }
}

Greetings
-Sascha-

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to