Some more maven questions

View: New views
2 Messages — Rating Filter:   Alert me  

Some more maven questions

by Sony Antony :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

1. Is it possible to have multiple profiles to be active at the same time ?
If true, what if two profiles - both active - define conflicting
informations ( say the same plugin is configured differently )

2. When is teh decision to activate a profiletaken . Before teh very first
phase is begun ? ( validation )
( IOW, does maven make teh decision to activate a profile, even before the
validation phase starts ? )

3. We have a module that contains a bunch of xsd schemas. We would like to
compile these only if something has changed.
I understand that I can put a <module> inside a profile, which is activated
only when something changes.

But I couldnt find any way to communicate to maven that the profile needs to
be activated <activation> only had a limited things to check. ( like file
exists, OS etc. )

Can somebody suggest a solution


4. Is it possible to execute a goal more than once during teh same phase ? (
without resorting to antrun )

--sony

Re: Some more maven questions

by BRIAN FOX-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Oct 30, 2009 at 6:40 PM, Sony Antony <sony.antony@...> wrote:
> 1. Is it possible to have multiple profiles to be active at the same time ?
> If true, what if two profiles - both active - define conflicting
> informations ( say the same plugin is configured differently )
>

Yes. The child would override the parents, and then it's either the
first wins or last wins, but I would have to test to be sure.

> 2. When is teh decision to activate a profiletaken . Before teh very first
> phase is begun ? ( validation )
> ( IOW, does maven make teh decision to activate a profile, even before the
> validation phase starts ? )
>
> 3. We have a module that contains a bunch of xsd schemas. We would like to
> compile these only if something has changed.
> I understand that I can put a <module> inside a profile, which is activated
> only when something changes.
>

Before, when the model is being resolved.

> But I couldnt find any way to communicate to maven that the profile needs to
> be activated <activation> only had a limited things to check. ( like file
> exists, OS etc. )
>
> Can somebody suggest a solution
>

Profiles aren't meant to work this way, they are more intended for
alternate configurations or different os builds etc.

>
> 4. Is it possible to execute a goal more than once during teh same phase ? (
> without resorting to antrun )
>
Yes, just bind the plugin in two executions to the same phase. They
should run in the order defined.

> --sony
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...