Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wildfly-jar:dev & wildfly-jar:dev-watch don't use reactor results in multimodule maven project #281

Open
dashorst opened this issue Oct 28, 2021 · 0 comments

Comments

@dashorst
Copy link

Our project is split in several modules and:

pom.xml
modulea/
    pom.xml
moduleb/
    pom.xml
war/
    pom.xml

Module B depends on Module A, and war depends on module B.

When I want to run mvn wildfly-jar:dev-watch -pl :war -am the build fails with the error that modulea can't be found in the local repository. But that should not be happening, as the code exists in the Maven reactor and resolve locally (not in ~/.m2/repository).

mvn package does work as advertised, but mvn wildfly-jar:dev fails:

[INFO] Example Parent ............................ SUCCESS [  0.362 s]
[INFO] Modula A ......................... SUCCESS [  0.080 s]
[INFO] Module B .............................. FAILURE [  0.204 s]
[INFO] WAR .................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.209 s
[INFO] Finished at: 2021-10-28T15:15:06+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project moduleb: Could not resolve dependencies for project com.example:moduleb:jar:0-SNAPSHOT: com.example:modulea:jar:0-SNAPSHOT was not found in https://repo.example.com/artifactory/maven/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of example-repo has elapsed or updates are forced -> [Help 1]

An old article with relevant information regarding reactor local resolving of build-time dependencies can be found here: https://vzurczak.wordpress.com/2016/01/08/finding-dependencies-artifacts-in-your-maven-plug-in/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant