b) is probably possible, but not recommended When we want to share some configuration between plugins, the usual solution is to define a convention on a property name: see for example maven.test.skip that is supported both by maven-compiler-plugin [1], Surefire [2], nar-maven-plugin in multiple goals [3] [4] [5]
Regards, Hervé [1] http://maven.apache.org/plugins/maven-compiler-plugin/testCompile-mojo.html#skip [2] http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#skip [3] http://maven-nar.github.io/nar-test-mojo.html#skipTests [4] http://maven-nar.github.io/nar-test-unpack-mojo.html#skipTests [5] http://maven-nar.github.io/nar-testCompile-mojo.html#skipTests Le lundi 30 janvier 2017, 19:18:50 CET Jochen Wiedmann a écrit : > Hi, > > I'd like to create a plugin, which is intended to generate resources > for a web application. > > In other words, the target directory would be the value, which is > typically configured as the webappDirectory property of the > maven-war-plugin. > > To get that value, I see two options: > > a) I create a property webappDirectory in my own plugin, and force the > user to configure that property. > > b) I find the projects maven-war-plugin, and read that objects value. > > Is b) possible? How? > > Thanks, > > Jochen --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org