jenkinsci / build-name-setter-plugin

Build Name Setter Plugin for Jenkins CI
https://plugins.jenkins.io/build-name-setter/
MIT License
34 stars 51 forks source link

Modernize to Jenkins 2.375.4 #77

Closed sghill-rewrite closed 1 year ago

sghill-rewrite commented 1 year ago

Hi!

This PR aims to modernize tooling, build on Java 11/17, and move this plugin to the recommended Jenkins baseline version. It also migrates from javax.annotations to SpotBugs as mentioned in the Improve a Plugin docs.

It was tested by running mvn clean verify.

Use this link to re-run the recipe: https://app.moderne.io/recipes/builder/w2GnS

sghill commented 1 year ago

I think this is failing because it's running with the target branch's (Java 8-only) Jenkinsfile. The newer tooling requires Java 11. I have seen this succeed locally.

damianszczepanik commented 1 year ago

Still failing with JDK 11

jonesbusy commented 1 year ago

I think this is failing because it's running with the target branch's (Java 8-only) Jenkinsfile. The newer tooling requires Java 11. I have seen this succeed locally.

Same as https://github.com/jenkinsci/build-name-setter-plugin/pull/73

Would be appreciated that a maintainer perform those changes and keep plugin dependencies up-to-date. In my opinion it's the minimal duty of a plugin maintainer

sghill commented 1 year ago

@damianszczepanik Now that Java 11/17 was merged separately (#78), we have everything green except appveyor 🎉

sghill commented 1 year ago

I merged in the changes from #79, but it's failing with an error that comes from running Java 8

[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Unknown packaging: hpi @ line 13, column 16
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project org.jenkins-ci.plugins:build-name-setter:2.2.2-SNAPSHOT (C:\projects\build-name-setter-plugin\pom.xml) has 1 error
[ERROR]     Unknown packaging: hpi @ line 13, column 16
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

If appveyor can be upgraded to Java 11, this error will go away.

damianszczepanik commented 1 year ago

Rebase the code, should be fine now with appveyor

sghill commented 1 year ago

It's been rebased, but fails because the default is JDK 8. Opened #79 to bump the AppVeyor build to JDK 17. Once that's merged, I'll merge it here and we should see this build pass.

sghill commented 1 year ago

@damianszczepanik all green now, thanks for the merge of #81!

sghill commented 1 year ago

@damianszczepanik This should now be ready as 1 commit that only makes the necessary changes in pom.xml. The JSR-305 changes have moved to #82 and no longer include reordered imports.

damianszczepanik commented 1 year ago

Thank you for your cooperation!