Maven profile ordering puzzle

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Maven profile ordering puzzle

Ondrej Zizka
Hi,

I can't get maven modules run in desired order.

I have ported test-reporting for the testsuite.
Now I am trying to put it to right place in POM.
Ideally, `mvn install site` should have reporting by default, `-DnoReport` should skip reporting.

I've tried:

1) Having in testsuite/pom.xml, bound to the site phase.

This needs to run `mvn site` in a separate command, like `mvn install; mvn site`, since with `mvn install site` reporting would run before the submodules (with tests) were run.

2) Having it in testsuite/reporting/pom.xml

Because of how testsuite/pom.xml is written (multiple profiles activating modules used to separate certain test groups),
reporting must be defined in a profile, in order to run it after other submodules.
That blocks having it auto-activated since it's not possible to move auto-activated profiles after property-activated.
So it's only possible to having it not running by default, and running on-demand. (And that's what I am going to use as fallback solution.)

Any idea how should I get this working "ideally", as defined above?

Thanks,
Ondra



_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

New module - testsuite-reporting? // Maven profile ordering puzzle

Ondrej Zizka
Update: Even property activation does not make reporting module run last, regardless ordering of profiles in pom.xml.
So it will be two commands in the end. (?)

Only other way to handle this would be a new module in root, next to testsuite. Like Hibernate 3.6 had it. Is that acceptable?



On Tue, 2011-11-01 at 06:40 +0100, Ondrej Zizka wrote:
Hi,

I can't get maven modules run in desired order.

I have ported test-reporting for the testsuite.
Now I am trying to put it to right place in POM.
Ideally, `mvn install site` should have reporting by default, `-DnoReport` should skip reporting.

I've tried:

1) Having in testsuite/pom.xml, bound to the site phase.

This needs to run `mvn site` in a separate command, like `mvn install; mvn site`, since with `mvn install site` reporting would run before the submodules (with tests) were run.

2) Having it in testsuite/reporting/pom.xml

Because of how testsuite/pom.xml is written (multiple profiles activating modules used to separate certain test groups),
reporting must be defined in a profile, in order to run it after other submodules.
That blocks having it auto-activated since it's not possible to move auto-activated profiles after property-activated.
So it's only possible to having it not running by default, and running on-demand. (And that's what I am going to use as fallback solution.)

Any idea how should I get this working "ideally", as defined above?

Thanks,
Ondra


_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev


_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev