Description
Recreate
- git clone [email protected]:OpenLiberty/guide-maven-multimodules; cd guide-maven-multimodules/finish
- Run
mvn liberty:dev
# Good, works - Add a new module in a subdir of 'finish', e.g. mvn archetype:generate -Dfilter=org.apache.maven.archetypes: (run interactively, picked number 11)
- Add the subdir to the finish/pom.xml in
- Run
mvn liberty:dev
Get error like:
[ERROR] Failed to execute goal io.openliberty.tools:liberty-maven-plugin:3.5.1:dev (default-cli) on project guide-maven-multimodules: Found multiple independent modules in the Reactor build order: [ear, mysite-artifact]. Specify the module containing the Liberty configuration that you want to use for the server by including the following parameters in the Maven command: -pl -am -> [Help 1]
We should be able to detect that there is only one "server module" to run dev mode from and filter out the 'mysite-artifact' in my example.
The "real world" use case could involve any number of things: test, Docker, doc, site, whatever. Perhaps it doesn't truly need to be part of the same reactor build as the ear/jar/war modules even though it shares a parent with them for properties, and dependency management, but someone went down the path of including it anyway and is tied into that decision.