Skip to content

Support Maven multi-module dev mode with only 1 "server module" even with >1 module with no downstream modules #1606

Open
@scottkurz

Description

@scottkurz

Recreate

  1. git clone [email protected]:OpenLiberty/guide-maven-multimodules; cd guide-maven-multimodules/finish
  2. Run mvn liberty:dev # Good, works
  3. Add a new module in a subdir of 'finish', e.g. mvn archetype:generate -Dfilter=org.apache.maven.archetypes: (run interactively, picked number 11)
  4. Add the subdir to the finish/pom.xml in
  5. 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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions