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

quarkus-bootstrap-maven-plugin:build-tree requires installed project in local maven repository #12257

Closed
rsvoboda opened this issue Sep 22, 2020 · 5 comments · Fixed by #12279
Labels
area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/maven kind/bug Something isn't working
Milestone

Comments

@rsvoboda
Copy link
Member

quarkus-bootstrap-maven-plugin:build-tree requires installed project in local maven repository, otherwise it fails with message similar to this: Failed to resolve application model org.acme:getting-started::jar:1.0-SNAPSHOT dependencies: Failed to resolve artifact org.acme:getting-started:jar:1.0-SNAPSHOT: Could not find artifact org.acme:getting-started:jar:1.0-SNAPSHOT

Quarkus 1.3.4 based quarkus-bootstrap-maven-plugin:build-tree command doesn't require to install local project into local maven repository first.

Workaround is to call mvn clean install before calling quarkus-bootstrap-maven-plugin:build-tree.
It's a regression against Quarkus 1.3

Reproducer:

 mvn io.quarkus:quarkus-maven-plugin:1.8.1.Final:create \
 -DprojectGroupId=org.acme \
 -DprojectArtifactId=getting-started \
 -DclassName="org.acme.getting.started.GreetingResource" \
 -Dpath="/hello"
 cd getting-started
OK - mvn io.quarkus:quarkus-bootstrap-maven-plugin:1.3.4.Final:build-tree -Dmaven.repo.local=/Users/rsvoboda/Downloads/maven-repository-1.3/ -Dquarkus.platform.version=1.3.4.Final -Dquarkus-plugin.version=1.3.4.Final
FAIL - mvn io.quarkus:quarkus-bootstrap-maven-plugin:1.7.3.Final:build-tree -Dmaven.repo.local=/Users/rsvoboda/Downloads/maven-repository-1.7/ -Dquarkus.platform.version=1.7.3.Final -Dquarkus-plugin.version=1.7.3.Final

...

[ERROR] Failed to execute goal io.quarkus:quarkus-bootstrap-maven-plugin:1.7.3.Final:build-tree (default-cli) on project
  getting-started: Failed to resolve application model org.acme:getting-started::jar:1.0-SNAPSHOT dependencies:
  Failed to resolve artifact org.acme:getting-started:jar:1.0-SNAPSHOT: 
  Could not find artifact org.acme:getting-started:jar:1.0-SNAPSHOT -> [Help 1]
@rsvoboda rsvoboda added kind/bug Something isn't working area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins labels Sep 22, 2020
@quarkusbot
Copy link

/cc @quarkusio/devtools

@aloubyansky
Copy link
Member

Have you tried 1.8.1.Final? It should work.

@rsvoboda
Copy link
Member Author

Yes I did, it didn't work too.

Here is the output:

mvn io.quarkus:quarkus-bootstrap-maven-plugin:1.8.1.Final:build-tree -Dmaven.repo.local=/Users/rsvoboda/Downloads/maven-repository-1.8/
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------< org.acme:getting-started >----------------------
[INFO] Building getting-started 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- quarkus-bootstrap-maven-plugin:1.8.1.Final:build-tree (default-cli) @ getting-started ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.892 s
[INFO] Finished at: 2020-09-23T08:49:45+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus:quarkus-bootstrap-maven-plugin:1.8.1.Final:build-tree (default-cli) on project getting-started: Failed to resolve application model org.acme:getting-started::jar:1.0-SNAPSHOT dependencies: Failed to resolve artifact org.acme:getting-started:jar:1.0-SNAPSHOT: Could not find artifact org.acme:getting-started:jar:1.0-SNAPSHOT -> [Help 1]
[ERROR]

@rsvoboda
Copy link
Member Author

The same when 999-SNAPSHOT gets used

@aloubyansky
Copy link
Member

Ah, it's because the project hasn't even been compiled, so there is no target/classes dir. The project's JAR artifact simply can't be resolved, literally no content anywhere. Changing the root artifact to POM in build-tree fixes the issue. Thanks!

@geoand geoand added this to the 1.9.0 - master milestone Sep 25, 2020
@gsmet gsmet modified the milestones: 1.9.0 - master, 1.7.4.Final Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/maven kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants