0

I do need to build the modules it depends on first, but I don't want to run their tests. I've tried various invocations with -am -pl, this is the most recent, and based on maven :: run only single test in multi-module project

mvn test -DfailIfNoTests=false -Dtest="**" -am -pl service-api test

All of these tests should be in the com.myapp.service package, and packages below it. Ideally though, an answer won't rely on that.

Nothing I have tried works though? What's the magic invocation to compile process-resources for dependents, and run tests for just this module?

xenoterracide
  • 16,274
  • 24
  • 118
  • 243
  • Are the tests you want to run in a separate or identifiable package? – aksappy Mar 19 '21 at 16:45
  • @aksappy yes they are – xenoterracide Mar 19 '21 at 16:47
  • In that case, wouldn't this work? `mvn test -Dtest=com.myapp.service.*Test` – aksappy Mar 19 '21 at 16:48
  • @aksappy that fails with "failIfNoTests". I tried adding that and doing this `mvn -Dtest="com.myapp.service.**.*Test" -DfailIfNoTests=false clean test ` the `**` added because it has a *root* package, but not all the tests are in just one package, and that didn't run any tests at all. I ran with `com.myapp.service.*Test` and that also didn't run any tests, probably because there aren't any for the root package. – xenoterracide Mar 19 '21 at 17:03

0 Answers0