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

Extensions created with 999-SNAPSHOT cli depend on non-existing plugin #42649

Closed
fedinskiy opened this issue Aug 20, 2024 · 3 comments · Fixed by #42653
Closed

Extensions created with 999-SNAPSHOT cli depend on non-existing plugin #42649

fedinskiy opened this issue Aug 20, 2024 · 3 comments · Fixed by #42653
Assignees
Labels
area/cli Related to quarkus cli (not maven/gradle/etc.) kind/bug Something isn't working
Milestone

Comments

@fedinskiy
Copy link
Contributor

fedinskiy commented Aug 20, 2024

Describe the bug

I use Quarkus CLI to generate quarkus extension. When I use cli from 999-SNAPSHOT, the pom file contains dependency io/quarkus/quarkus-config-doc-maven-plugin of version 3.12.3, which doesn't exist.

Expected behavior

Generated apps and extensions should not contain non-existing dependencies

Actual behavior

2024-08-20T09:15:32.0278431Z [WARNING] The POM for io.quarkus:quarkus-config-doc-maven-plugin:jar:3.13.2 is missing, no dependency information available
2024-08-20T09:15:32.0279918Z [ERROR] [ERROR] Some problems were encountered while processing the POMs:
2024-08-20T09:15:32.0284197Z [ERROR] Unresolveable build extension: Plugin io.quarkus:quarkus-config-doc-maven-plugin:3.13.2 or one of its dependencies could not be resolved: io.quarkus:quarkus-config-doc-maven-plugin:jar:3.13.2 was not found in https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced @ 
2024-08-20T09:15:32.0287744Z  @ 

How to Reproduce?

  1. Use the latest cli:
          cat <<EOF > ./quarkus-dev-cli
          #!/bin/bash
          java -jar ~/.m2/repository/io/quarkus/quarkus-cli/999-SNAPSHOT/quarkus-cli-999-SNAPSHOT-runner.jar "\$@"
          EOF
          chmod +x ./quarkus-dev-cli
  1. Create an extension using cli:
./quarkus-dev-cli create extension edge && cd quarkus-edge
  1. Try to build the extension:
    mvn clean install -Dinsecure.repositories=WARN

If quarkus cli of version 3.13.2 (eg from sdkman) is used in p.2, the build works

Output of uname -a or ver

6.10.4-200.fc40.x86_64

Output of java -version

Java version: 21.0.1, vendor: Eclipse Adoptium

Quarkus version or git rev

b7d6639

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)

Additional information

This is a difference between generated poms (edge is 999-SNAPSHOT, stable is 3.12.3):

$ diff quarkus-edge/pom.xml quarkus-stable/pom.xml 
10,11c10,11
<     <groupId>io.quarkiverse.edge</groupId>
<     <artifactId>quarkus-edge-parent</artifactId>
---
>     <groupId>io.quarkiverse.stable</groupId>
>     <artifactId>quarkus-stable-parent</artifactId>
14c14
<     <name>Quarkus Edge - Parent</name>
---
>     <name>Quarkus Stable - Parent</name>
23,25c23,25
<         <connection>scm:git:git@github.com:quarkiverse/quarkus-edge.git</connection>
<         <developerConnection>scm:git:git@github.com:quarkiverse/quarkus-edge.git</developerConnection>
<         <url>https://github.com/quarkiverse/quarkus-edge</url>
---
>         <connection>scm:git:git@github.com:quarkiverse/quarkus-stable.git</connection>
>         <developerConnection>scm:git:git@github.com:quarkiverse/quarkus-stable.git</developerConnection>
>         <url>https://github.com/quarkiverse/quarkus-stable</url>
62,66d61
<                 </plugin>
<                 <plugin>
<                     <groupId>io.quarkus</groupId>
<                     <artifactId>quarkus-config-doc-maven-plugin</artifactId>
<                     <version>${quarkus.version}</version>

@fedinskiy fedinskiy added the kind/bug Something isn't working label Aug 20, 2024
@quarkus-bot quarkus-bot bot added the area/cli Related to quarkus cli (not maven/gradle/etc.) label Aug 20, 2024
Copy link

quarkus-bot bot commented Aug 20, 2024

/cc @ebullient (cli), @maxandersen (cli)

@fedinskiy fedinskiy changed the title Extensions created with 999-SNAPSHOT cli depend on non-existing module Extensions created with 999-SNAPSHOT cli depend on non-existing plugin Aug 20, 2024
@gsmet
Copy link
Member

gsmet commented Aug 20, 2024

This is due to this patch: #42469 .

Apparently, we still need to condition things on the version... I thought this had been changed.
Will take care of it.

@gsmet gsmet self-assigned this Aug 20, 2024
gsmet added a commit to gsmet/quarkus that referenced this issue Aug 20, 2024
When creating projects or extensions, the codestarts from the tooling
version are always used even for older versions so we need to be
careful about it.

Fixes quarkusio#42649
@gsmet
Copy link
Member

gsmet commented Aug 20, 2024

#42653 should address it.

Thanks again for the very detailed report!

@gsmet gsmet closed this as completed in d6123f2 Aug 20, 2024
@quarkus-bot quarkus-bot bot added this to the 3.16 - main milestone Aug 20, 2024
@gsmet gsmet modified the milestones: 3.16 - main, 3.14.0 Aug 20, 2024
gsmet added a commit to gsmet/quarkus that referenced this issue Aug 20, 2024
When creating projects or extensions, the codestarts from the tooling
version are always used even for older versions so we need to be
careful about it.

Fixes quarkusio#42649

(cherry picked from commit d6123f2)
danielsoro pushed a commit to danielsoro/quarkus that referenced this issue Sep 20, 2024
When creating projects or extensions, the codestarts from the tooling
version are always used even for older versions so we need to be
careful about it.

Fixes quarkusio#42649
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli Related to quarkus cli (not maven/gradle/etc.) kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants