I have a multi-module maven project (in a monorepo) that has several libraries and executable microservices as sub-modules. The layout looks like this:
pom.xml (my-project)
--> commons
--> pom.xml (my-commons)
--> my-service-a
--> pom.xml (service-a, depends on my-commons)
--> my-service-b
--> pom.xml (service-b, depends on my-commons)
When I attempt to run tests for only a single submodule, which also depends on the commons module, tests are run for both modules every time. This is the test command I am running:
mvn verify -pl service-a
My test suite has grown such that I now need to split tests for each module instead of run the entire suite at once. Thus, I need to run jobs for each module. Is this possible without re-running tests for the commons library every time?
Aucun commentaire:
Enregistrer un commentaire