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

HPI Plugin 3.58 fails core build on Maven ≤ 3.9.5 #667

Closed
daniel-beck opened this issue Sep 24, 2024 · 2 comments · Fixed by #668
Closed

HPI Plugin 3.58 fails core build on Maven ≤ 3.9.5 #667

daniel-beck opened this issue Sep 24, 2024 · 2 comments · Fixed by #668
Labels

Comments

@daniel-beck
Copy link
Member

Jenkins and plugins versions report

n/a

What Operating System are you using (both controller, and any agents involved in the problem)?

n/a

Reproduction steps

  1. Put Maven 3.9.5 on the PATH
  2. Check out jenkinsci/jenkins
  3. mvn clean install -Pquick-build

Expected Results

It works

Actual Results

[ERROR] Failed to execute goal org.jenkins-ci.tools:maven-hpi-plugin:3.58-SNAPSHOT:record-core-location (default) on project jenkins-core: Execution default of goal org.jenkins-ci.tools:maven-hpi-plugin:3.58-SNAPSHOT:record-core-location failed: Unable to load the mojo 'record-core-location' (or one of its required components) from the plugin 'org.jenkins-ci.tools:maven-hpi-plugin:3.58-SNAPSHOT': com.google.inject.ProvisionException: Unable to provision, see the following errors:
[ERROR] 
[ERROR] 1) No implementation for PluginWorkspaceMap was bound.
[ERROR]   while locating RecordCoreLocationMojo
[ERROR]   at ClassRealm[plugin>org.jenkins-ci.tools:maven-hpi-plugin:3.58-SNAPSHOT, parent: ClassLoaders$AppClassLoader@42110406]
[ERROR]       \_ installed by: WireModule -> PlexusBindingModule
[ERROR]   while locating Mojo annotated with @Named("org.jenkins-ci.tools:maven-hpi-plugin:3.58-SNAPSHOT:record-core-location")
[ERROR] 
[ERROR] 1 error
[ERROR] 
[ERROR] ======================
[ERROR] Full classname legend:
[ERROR] ======================
[ERROR] ClassLoaders$AppClassLoader: "jdk.internal.loader.ClassLoaders$AppClassLoader"
[ERROR] Mojo:                        "org.apache.maven.plugin.Mojo"
[ERROR] Named:                       "com.google.inject.name.Named"
[ERROR] PlexusBindingModule:         "org.eclipse.sisu.plexus.PlexusBindingModule"
[ERROR] PluginWorkspaceMap:          "org.jenkinsci.maven.plugins.hpi.PluginWorkspaceMap"
[ERROR] RecordCoreLocationMojo:      "org.jenkinsci.maven.plugins.hpi.RecordCoreLocationMojo"
[ERROR] WireModule:                  "org.eclipse.sisu.wire.WireModule"
[ERROR] ========================
[ERROR] End of classname legend:
[ERROR] ========================
[ERROR] 
[ERROR]       role: org.apache.maven.plugin.Mojo
[ERROR]   roleHint: org.jenkins-ci.tools:maven-hpi-plugin:3.58-SNAPSHOT:record-core-location
[ERROR] -> [Help 1]

Anything else?

Bisected to #652

Are you interested in contributing a fix?

No response

@daniel-beck
Copy link
Member Author

Probably easiest to raise the minimum Maven version in the poms?

@Vlatombe
Copy link
Member

Since #628, maven-hpi-plugin build produces JDK17 bytecode.

In Maven 3.9.6, apache/maven#1286 was merged. It means that effectively all older Maven versions are unable to grok components produced with byte code level 17.

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

Successfully merging a pull request may close this issue.

2 participants