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

Helidon maven archetypes fail with maven-archetype-plugin version 3.3.0 #9305

Closed
barchetta opened this issue Sep 30, 2024 · 1 comment · Fixed by #9317
Closed

Helidon maven archetypes fail with maven-archetype-plugin version 3.3.0 #9305

barchetta opened this issue Sep 30, 2024 · 1 comment · Fixed by #9317
Assignees
Labels
2.x Issues for 2.x version branch 3.x Issues for 3.x version branch 4.x Version 4.x archetypes bug Something isn't working
Milestone

Comments

@barchetta
Copy link
Member

barchetta commented Sep 30, 2024

Environment Details

  • Helidon Version: 2.x, 3.x, 4.x
  • Helidon SE and Helidon MP

Problem Description

Running a legacy Helidon maven archetype to generate a project fails.

mvn -U archetype:generate -DinteractiveMode=false \
    -DarchetypeGroupId=io.helidon.archetypes \
    -DarchetypeArtifactId=helidon-quickstart-mp \
    -DarchetypeVersion=4.1.1 \
    -DgroupId=io.helidon.examples \
    -DartifactId=helidon-quickstart-mp \
    -Dpackage=io.helidon.examples.quickstart.mp

. . .

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.3.0:generate (default-cli) on project standalone-pom: 
  Execution default-cli of goal org.apache.maven.plugins:maven-archetype-plugin:3.3.0:generate failed: 
  An API incompatibility was encountered while executing org.apache.maven.plugins:maven-archetype-plugin:3.3.0:generate: 
  java.lang.NoSuchMethodError: 'org.apache.maven.project.ProjectBuildingRequest org.apache.maven.archetype.ArchetypeGenerationRequest.getProjectBuildingRequest()'

Why has this started failing now? Because on 22-Sep-2024 version 3.3.0 of maven-archetype-plugin was released that introduced an incompatibility. See PR 215

Workaround

The workaround is to use version 3.2.1 of maven-archetype-plugin:

mvn -U org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate  -DinteractiveMode=false \
    -DarchetypeGroupId=io.helidon.archetypes \
    -DarchetypeArtifactId=helidon-quickstart-mp \
    -DarchetypeVersion=4.1.1 \
    -DgroupId=io.helidon.examples \
    -DartifactId=helidon-quickstart-mp \
    -Dpackage=io.helidon.examples.quickstart.mp

Or even better us the Helidon CLI:

helidon init  --version 4.1.1 
@barchetta barchetta added 2.x Issues for 2.x version branch 3.x Issues for 3.x version branch archetypes 4.x Version 4.x labels Sep 30, 2024
@github-project-automation github-project-automation bot moved this to Triage in Backlog Sep 30, 2024
@barchetta barchetta added the bug Something isn't working label Sep 30, 2024
@barchetta barchetta added this to the 4.1.2 milestone Oct 1, 2024
romain-grecourt added a commit to romain-grecourt/helidon that referenced this issue Oct 3, 2024
@barchetta barchetta moved this from Triage to Sprint Scope in Backlog Oct 3, 2024
@barchetta barchetta moved this from Sprint Scope to In Progress in Backlog Oct 3, 2024
romain-grecourt added a commit to romain-grecourt/helidon that referenced this issue Oct 3, 2024
romain-grecourt added a commit that referenced this issue Oct 3, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Closed in Backlog Oct 3, 2024
barchetta pushed a commit to barchetta/helidon that referenced this issue Oct 3, 2024
barchetta added a commit that referenced this issue Oct 3, 2024
@barchetta
Copy link
Member Author

romain-grecourt added a commit to romain-grecourt/helidon that referenced this issue Oct 11, 2024
romain-grecourt added a commit to romain-grecourt/helidon that referenced this issue Oct 12, 2024
romain-grecourt added a commit that referenced this issue Oct 12, 2024
romain-grecourt added a commit that referenced this issue Oct 12, 2024
barchetta pushed a commit to barchetta/helidon that referenced this issue Oct 14, 2024
barchetta added a commit that referenced this issue Oct 14, 2024
Relates to #9305

Co-authored-by: Romain Grecourt <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Issues for 2.x version branch 3.x Issues for 3.x version branch 4.x Version 4.x archetypes bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants