I'm trying to set up a Maven build for CI/CD, and one of the requirements for
testing is to create, populate and tweak a database schema.
This involves interleaving various executions of maven-dependency-plugin,
sql-maven-plugin and exec-maven-plugin, and there aren't enough lifecycle
phases *-test-[re]sources to accommodate all the steps.
I'd like to bind six executions as follows:
1 maven-dependency-plugin:unpack -> generate-test-resources
2 sql-maven-plugin:execute -> generate-test-resources
3 sql-maven-plugin:execute -> generate-test-resources
4 exec-maven-plugin:exec -> process-test-resources
5 exec-maven-plugin:exec -> process-test-resources
6 sql-maven-plugin:execute -> process-test-resources
But this doesn't work as Maven wants to execute sql-maven-plugin (steps 2 & 3)
before step 1 and I can't find a way to make it do things in the desired
sequence.
There's a bug in Jira for this http://jira.codehaus.org/browse/MNG-3522 but it
was closed as part of the "great Jira cleanup of 2014".
This has been an issue for several years but seems to get no attention. I
don't think I should be required to write my own plugin to do what should be a
common requirement.
Can someone explain if there's an approved way to accomplish this?
I know Maven is supposed to be declarative in nature, but sequencing steps
seems like a basic requirement. From the lack of attention, and from reading
other posts in places like StackOverflow, it appears there may be a
philosophical objection to explicitly ordering executions. Can someone explain
the reasoning for this?
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]