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

Unable to generate a project using Maven and Quarkus 2.6 with -DquarkusRegistryClient=false #22498

Closed
rsvoboda opened this issue Dec 23, 2021 · 1 comment · Fixed by #22503
Closed
Labels
area/maven kind/bug Something isn't working
Milestone

Comments

@rsvoboda
Copy link
Member

rsvoboda commented Dec 23, 2021

Describe the bug

Unable to generate a project using Maven and Quarkus 2.6 with -DquarkusRegistryClient=false
This is regression, as the same approach works with 2.5.4.Final and previous versions.

Following command fails

mvn io.quarkus.platform:quarkus-maven-plugin:2.6.0.Final:create \
    -DprojectGroupId=org.acme -DquarkusRegistryClient=false \
    -DprojectArtifactId=getting-started-no-registry \
    -DclassName="org.acme.getting.started.GreetingResource" \
    -Dpath="/hello"

If -DquarkusRegistryClient=false is removed command works, I do not have ~/.quarkus/config.yaml, tried with empty -Dmaven.repo.local= but the command fails to execute properly.

Some details when the mvn command is executed with -e:

    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:199)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: java.lang.ClassCastException: class io.quarkus.registry.catalog.ExtensionCatalogImpl cannot be cast to class io.quarkus.registry.catalog.ExtensionCatalog$Mutable (io.quarkus.registry.catalog.ExtensionCatalogImpl and io.quarkus.registry.catalog.ExtensionCatalog$Mutable are in unnamed module of loader org.codehaus.plexus.classworlds.realm.ClassRealm @17dd671f)
    at io.quarkus.platform.tools.ToolsUtils.resolvePlatformDescriptorDirectly (ToolsUtils.java:158)
    at io.quarkus.maven.CreateProjectMojo.resolveExtensionCatalogDirectly (CreateProjectMojo.java:380)
    at io.quarkus.maven.CreateProjectMojo.resolveExtensionsCatalog (CreateProjectMojo.java:349)
    at io.quarkus.maven.CreateProjectMojo.execute (CreateProjectMojo.java:222)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

Expected behavior

Mvn command execution without error

Actual behavior

Mvn command execution error

How to Reproduce?

mvn io.quarkus.platform:quarkus-maven-plugin:2.6.0.Final:create \
    -DprojectGroupId=org.acme -DquarkusRegistryClient=false \
    -DprojectArtifactId=getting-started-no-registry \
    -DclassName="org.acme.getting.started.GreetingResource" \
    -Dpath="/hello"

Quarkus 2.5.4.Final works:

mvn io.quarkus.platform:quarkus-maven-plugin:2.5.4.Final:create -DplatformVersion=2.5.4.Final \
    -DprojectGroupId=org.acme -DquarkusRegistryClient=false \
    -DprojectArtifactId=getting-started-no-registry \
    -DclassName="org.acme.getting.started.GreetingResource" \
    -Dpath="/hello"

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.6.0.Final

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

No response

Additional information

No response

@rsvoboda rsvoboda added the kind/bug Something isn't working label Dec 23, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Dec 23, 2021

/cc @quarkusio/devtools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/maven kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants