You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "wujek.srujek" <wu...@gmail.com> on 2009/11/27 23:37:15 UTC
Maven plugin configuration
Hi. I have a question on plugin config. Suppose there is a plugin, like
maven-ear-plugin, that has more than 1 goal. When I add a configuration
section, can I specify elements that configure both of these goals?
I know that I can also add executions and further execution elements, where
I can configure specific goals and even phases they execute in. There I can
specify only elements that configure this specific goal, otherwise there
will be an error, right?
Can you more experienced maven users confirm this? I read some information
on it but there seems not to be any clear structured info on this topic.
Regards.
--
View this message in context: http://old.nabble.com/Maven-plugin-configuration-tp26545395p26545395.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Maven plugin configuration
Posted by Wayne Fay <wa...@gmail.com>.
> I don't have any specific question, I just wanted to "learn" maven2 and get
> familiar with the concepts. For the maven-ear-plugin I put all the
> configuration elements in the single "global" element, and both goals (ear
Take a look at the code in the maven-ear-plugin (or another plugin)
and you'll quickly see how it all works.
Wayne
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Maven plugin configuration
Posted by "wujek.srujek" <wu...@gmail.com>.
Hi. Thanks for the answer.
I don't have any specific question, I just wanted to "learn" maven2 and get
familiar with the concepts. For the maven-ear-plugin I put all the
configuration elements in the single "global" element, and both goals (ear
and generate-application-xml) seem to have picked this up. This is very
convenient not to be forced to configure the goals separately as for the
time being I don't really need that. Just wanted to make sure that I know
what I'm doing, and that it is not some specific plugin's mojo (pun
intended).
Regards.
--
View this message in context: http://old.nabble.com/Maven-plugin-configuration-tp26545395p26554586.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Maven plugin configuration
Posted by Wayne Fay <wa...@gmail.com>.
> My question was more about specific goals. When I configure the plugin in
> the "global" configuration, can I put all properties there, from all mojos?
> And when I configure a single execution, I need to specify a goal, and then
> I can only use this goal's properties, right?
In general, yes. But it is far simpler to speak in concrete terms.
Pick a plugin, write a configuration, and post it to this list with
specific questions.
Wayne
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Maven plugin configuration
Posted by "wujek.srujek" <wu...@gmail.com>.
Thank you all for your answers.
Cheers.
--
View this message in context: http://old.nabble.com/Maven-plugin-configuration-tp26545395p26556280.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Maven plugin configuration
Posted by Brian Fox <br...@infinity.nu>.
The configuration can't be separated by goal, the container will
inject the variables that are supported by the goal and ignore those
that aren't used by the goal..so in practice it doesn't normally cause
a problem to have configuration from multiple goals all munged
together...however I would recommend putting that config into the
execution to make it clear.
On Sat, Nov 28, 2009 at 9:23 AM, wujek.srujek <wu...@gmail.com> wrote:
>
> Hi. Thanks for the answer.
> My question was more about specific goals. When I configure the plugin in
> the "global" configuration, can I put all properties there, from all mojos?
> And when I configure a single execution, I need to specify a goal, and then
> I can only use this goal's properties, right?
> --
> View this message in context: http://old.nabble.com/Maven-plugin-configuration-tp26545395p26553529.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Maven plugin configuration
Posted by "wujek.srujek" <wu...@gmail.com>.
Hi. Thanks for the answer.
My question was more about specific goals. When I configure the plugin in
the "global" configuration, can I put all properties there, from all mojos?
And when I configure a single execution, I need to specify a goal, and then
I can only use this goal's properties, right?
--
View this message in context: http://old.nabble.com/Maven-plugin-configuration-tp26545395p26553529.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Maven plugin configuration
Posted by Brian Fox <br...@infinity.nu>.
Here's an example:
<plugin>
...
<configuration>
<!--this applies to every execution of the plugin, whether it's from
the command line, default lifecycle or executions bound in the pom -->
</configuration>
<execution>
<configuration>
<!--applies to this execution only -->
</configuration>
</execution>
<execution>
<configuration>
<!--applies to this execution only -->
</configuration>
</execution>
<execution>
<configuration>
<!--applies to this execution only -->
</configuration>
</execution>
</plugin>
On Fri, Nov 27, 2009 at 5:37 PM, wujek.srujek <wu...@gmail.com> wrote:
>
> Hi. I have a question on plugin config. Suppose there is a plugin, like
> maven-ear-plugin, that has more than 1 goal. When I add a configuration
> section, can I specify elements that configure both of these goals?
> I know that I can also add executions and further execution elements, where
> I can configure specific goals and even phases they execute in. There I can
> specify only elements that configure this specific goal, otherwise there
> will be an error, right?
> Can you more experienced maven users confirm this? I read some information
> on it but there seems not to be any clear structured info on this topic.
>
> Regards.
> --
> View this message in context: http://old.nabble.com/Maven-plugin-configuration-tp26545395p26545395.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org