This project is a sample multi-module Maven project which is used to showcase the improvements that have been done in the reactor of Maven.
Maarten Mulders and I will show this project during the talk "Making Maven Marvellous" which we have shown at several conferences and meetups.
The use-case in this example is that you are a developer working on the "app" submodule and do not want to waste time building other parts of the system.
When using Maven 3.6.3 the following invocations will fail because dependencies on modules in the same multi module project cannot be resolved:
- Let's first build all dependencies to prove it builds.
Notice the slow tests in the "scraper" module, which is not required to be built for building "app"
mvn test
- Prevent running the scraper module by trying:
mvn test --resume-from :app
mvn test --projects :app
mvn test --file app/pom.xml
cd app && mvn test
Starting from Maven 4 this is resolved.
There are several options for trying it out Maven 4:
- Using Maarten's brew formula:
brew install mthmulders/maven-snapshot/maven-snapshot
- Using Martin's Chocolatey package:
choco install maven-snapshot -y
- At the time of writing, it has not been released yet, but it can be built from sources from https://github.com/apache/maven.