By default Maven will only search certain groupIds for plugins. They are "org.apache.maven.plugins" and "org.codehaus.mojo". So for a quick fix to try your plugin you can set the plugin to your groupId to "org.apache.maven.plugins". You can set the groupIds where Maven searches for plugins but use one of the defaults to get you going.
Aaaaah! That did it :)
So at least I got i running now. I had to fix the classpath type but still I don't get the dependencies --OUTPUT-- dependencies: [] classpath: [/Users/tcurdt/dev/jakarta-commons-jci/target/classes] ----------
/** * @goal minijar * @description strips unused classes from the dependencies * @resolveTransitiveDependencies * */ public final class MiniJarMojo extends AbstractMojo { /** * @parameter expression="${project.artifacts}" * */ private Set dependencies; /** * @parameter expression="${project.runtimeClasspathElements}" * */ private List runtimeClazzpath;
public void execute() throws MojoExecutionException { System.out.println("dependencies: " + dependencies); System.out.println("classpath: " + runtimeClazzpath); } }
Something wrong with "resolveTransitiveDependencies"? What if I only want the direct deps instead of the transitive ones? cheers -- Torsten
PGP.sig
Description: This is a digitally signed message part
