project with multiple root pom
Answered
Hello,
I have a multi-module project with 2 root POM (pom.xml and test_pom.xml), it works fine with command line maven but IntelliJ fails to execute any unit test.
First I use mvn to package all the dependencies and a dir assembly (executed as last module of pom.xml).
Then I execute the global tests (I know it's historical) from test_pom.xml, it's the same dependencies except the last module which is not the assembly but the tests.
The symptom is that no test get executed (I have more than 3000 tests), one thing to notice is that the tests module has no main source but that shouldn't be the problem.
Any help appreciated.
Thanks,
Arnault
Please sign in to leave a comment.
Hello, Arnault!
Can you please clarify: you have two
pom.xmlfiles linked to the same Maven Project/Module?I'm assuming you are running them using
-fCommand Prompt flag? How do you run them from IDEA?From the best practices point of view using Maven Profiles might be a better option here.
Hello Roman,
Yes I had two pom.xml, but now I managed to merge them and the tests got executed successfully using command line maven.
I figured out that after changing maven version to 3.9.3 inside intellij (same version as command line) and the issue went away.
For reference I use intellij from ideaIC-2023.1.2.win.zip.
Thanks for your support.
Glad to hear the good news!
Do not hesitate to contact us again if you will have any questions or issues with our products!