This will wett your appetite:
/**
* @parameter expression="${project.packaging}"
* @readonly
*/
private String packaging;
/**
* @see org.apache.maven.plugin.Mojo#execute()
*/
public void execute() throws MojoExecutionException,
MojoFailureException {
getLog().info(packaging);
if (packaging == null || !packaging.equals("ejb")) {
Regards,
Jeroen
On 19/04/07, Peter Nilsson <[EMAIL PROTECTED]> wrote:
Hi,
I have a build tree with 30+ projects of different packaging (jar, pom,
dll,
so, plugin, etc) built with Maven and I would like to specify in the top
pom.xml that certain plugins are used for all projects of a given
packaging.
For example, I would like to have the CheckStyle plugin run on all
projects
with packaging "jar".
Of course I can set the configuration of the plugins in the top pom (with
a
pluginmanagement tag) and then just invoke the plugin explicitly in the
projects but I would like to enforce that the plugin is used for all
projects of the given packaging. It is very easy for example to forget to
add CheckStyle to a new jar project.
Adding the possibility of using a packaging filter to an execution element
would solve it, but there are perhaps other ways? Any ideas?
Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]