I have a system that accepts plugins to let users add functionality to a management system. The plugin is basically just a zip file with in a certain format (ie file x in this dir, y in that dir). Currently I use the maven-assembly-plugin plugin to make the zip.
The problem is that it is awkward to keep all my plugins in sync and to let others make a plugin since they need the correct assembly.xml
Therefore I've been trying to make a custom packaging type so developers can make a plugin like this:
<groupId>com.example</groupId>
<artifactId>example</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>plugin</packaging> //not a standard type
This is mostly working but the ugly thing now is that each plugin always depends on certain APIs in the core system. Therefore they all basically have the same dependencies.
Is it possible for a mojo to inject dependencies into a user of the mojo? This seems to say it can't: http://maven.40175.n5.nabble.com/How-to-inject-dependencies-from-a-mojo-td83025.html