Maven multi module project with Quarkus in dev mode not working as expected
See original GitHub issueHi,
I am new to Quarkus and try to use it in a Maven multi module project. My project is structured as followed:
- quarkustest (pom)
- quarkustest-application (jar)
- quarkustest-backend (pom)
- quarkustest-backend-rest-api (jar)
- quarkustest-dependencies (pom)
- quarkustest-parent (pom)
The application module executes the quarkus-maven-plugin with build-goal. The quarkustest-backend-rest-api contains a simple REST controller and thus also a beans.xml in /src/main/resources/META-INF. The rest-api-module is references by the application module.
If I package the whole project with mvn package, the resulting runner-jar works as expected. However, if I try to start the project in dev mode with mvn compile quarkus:dev, I get following exception:
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:1.0.0.Final:dev (default-cli) on project quarkustest-application: Failed to run: Failed to resolve Quarkus application model: Failed to resolve dependencies for de.rhocas.quarkustest:quarkustest-application:jar:1.0.0-SNAPSHOT: Could not find artifact de.rhocas.quarkustest:quarkustest-backend-rest-api:jar:1.0.0-SNAPSHOT -> [Help 1]
If I install the dependencies via mvn install, it works, but changes in the backend API are still not reflected in the running application.
I uploaded my example project here: https://github.com/nils-christian/quarkus-multi-module-issue
Expected behavior
The expected behaviour would be that changes in other modules are reflected in the application while in dev mode.
Actual behavior
Changes in other modules are not visible in the application while in dev mode.
Environment (please complete the following information):
- Output of
uname -a
orver
: Linux debian 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u2 (2019-11-11) x86_64 GNU/Linux - Output of
java -version
: openjdk version “11.0.5” 2019-10-15 - GraalVM version (if different from Java): 19.2.1
- Quarkus version or git rev: 1.0.0.Final
Issue Analytics
- State:
- Created 4 years ago
- Reactions:11
- Comments:5 (1 by maintainers)
FYI, this works better (I don’t know for hot reload) when running the app. At least at startup the code is in sync:
-pl is to select the modules to be run –also-make is to ensure depedencies get built
This works now, except for the linked issue related to how the project was structured. If you remove the parent from the top level project everthing should work fine on 1.5.1.