Hi
if you have access to the source code of the plugin you can do something
like this:
/**
* The packaging of this project.
*
* @parameter expression="${project.packaging}"
* @required
* @readonly
*/
private String packaging;
public void execute() throws MojoExecutionException {
if (packaging.equals("war") {
...
}
}
Cheers, michael
Gisbert Amm wrote:
Michael Meyer schrieb:
Hi,
does this work?
<activation>
<property>
<name>project.packaging</name>
<value>war</value>
</property>
</activation>
Unfortunately not.
I'll describe my problem more generally instead of asking how to fix my
obviously wrong approach:
I need to execute a specific, home grown deployment preparation plugin
only for projects that produce a war (<packaging>war</packaging>). How
can I achieve that?
My first thought was to use a profile. However, that does not work
because a profile cannot be activated throught POM entries like
<packaging>war</packaging>. I don't want to set an extra property for
that either since all information I need is already covered in the
<packaging> element and doesn't need to be duplicated.
How do others implement conditional calls of certain plugins? How is the
Maven2 way to do that?
-Gisbert
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Michael Meyer | [EMAIL PROTECTED]
phone +41-44-247 79 12 | fax +41-44-247 70 75
Netcetera AG | 8040 Zürich | Switzerland | http://netcetera.ch
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]