Skip to content

Require Jenkins 2.479.3 and Jakarta EE 9#231

Open
strangelookingnerd wants to merge 12 commits into
jenkinsci:masterfrom
strangelookingnerd:migrate
Open

Require Jenkins 2.479.3 and Jakarta EE 9#231
strangelookingnerd wants to merge 12 commits into
jenkinsci:masterfrom
strangelookingnerd:migrate

Conversation

@strangelookingnerd

@strangelookingnerd strangelookingnerd commented Feb 28, 2025

Copy link
Copy Markdown
Contributor

Require Jenkins 2.479.3 and Jakarta EE 9

Jenkins 2.479.3 provides Jakarta EE 9, Eclipse Jetty 12, Spring Security 6, and Java 17.

  • Update plugin pom and baseline
  • Remove deprecations
  • Use Java 17 language features
  • Minor cleanup

Testing done

mvn clean verify

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@strangelookingnerd strangelookingnerd changed the title Migrate Require Jenkins 2.479.1 and Jakarta EE 9 Feb 28, 2025
@strangelookingnerd strangelookingnerd changed the title Require Jenkins 2.479.1 and Jakarta EE 9 Require Jenkins 2.479.3 and Jakarta EE 9 Apr 23, 2025
@strangelookingnerd

Copy link
Copy Markdown
Contributor Author

@stuartrowe Kindly requesting a review.

@stuartrowe

Copy link
Copy Markdown
Contributor

@strangelookingnerd I'm not a maintainer of this plugin so I don't think I'm qualified to review it.

@skumar7322 would be the best to review it.

@skumar7322

Copy link
Copy Markdown
Contributor

Hi @strangelookingnerd thanks for creating this PR.
There are too many files in this PR. If possible could you please break this in multiple PRs(max 30 files per commit).
The decision to update Jenkins version is taken by us, after analysing the number of impacted users. Remove Jenkins version and java version changes.
Really appreciate you efforts for these changes.

@strangelookingnerd

Copy link
Copy Markdown
Contributor Author

9a7e8e8 contains the most important changes that are more or less required.

b60493d contains changes that are optional to a certain extent, however I'd highly recommend considering them to improve code quality and maintainability. I don't see the point of breaking that up into smaller commits.

@skumar7322

Copy link
Copy Markdown
Contributor

I will run our test suite for this PR.

rantoniuk referenced this pull request Aug 9, 2025
Resolve the folder properties used in P4Plugin for FreeStyle, Pipeline and MultiBranch project configuration.
@rantoniuk

Copy link
Copy Markdown
Member

I will run our test suite for this PR.

Any results?

@skumar7322

Copy link
Copy Markdown
Contributor

Hi @rantoniuk,

Apologies for the delayed follow-up.

The commit 9a7e8e8 is currently causing test failures.

Some of the changes from this PR were already merged into master after the PR was closed, which has resulted in conflicts.

Could you please resolve the conflicts in this PR? Once that's done, I'll prioritize reviewing and working on it.

Thanks!

# Conflicts:
#	pom.xml
#	src/main/java/org/jenkinsci/plugins/p4/browsers/FishEyeBrowser.java
#	src/main/java/org/jenkinsci/plugins/p4/browsers/OpenGrokBrowser.java
#	src/main/java/org/jenkinsci/plugins/p4/browsers/P4WebBrowser.java
#	src/main/java/org/jenkinsci/plugins/p4/browsers/SwarmBrowser.java
#	src/main/java/org/jenkinsci/plugins/p4/client/TempClientHelper.java
#	src/main/java/org/jenkinsci/plugins/p4/credentials/P4PasswordImpl.java
#	src/main/java/org/jenkinsci/plugins/p4/credentials/P4TicketImpl.java
#	src/main/java/org/jenkinsci/plugins/p4/email/P4UserProperty.java
#	src/main/java/org/jenkinsci/plugins/p4/review/ReviewAction.java
#	src/main/java/org/jenkinsci/plugins/p4/swarmAPI/SwarmQueryAction.java
#	src/main/java/org/jenkinsci/plugins/p4/tagging/TagAction.java
#	src/main/java/org/jenkinsci/plugins/p4/tasks/PollTask.java
#	src/main/java/org/jenkinsci/plugins/p4/trigger/P4Hook.java
@strangelookingnerd

Copy link
Copy Markdown
Contributor Author

Conflicts resolved. Tests ran fine locally, waiting what CI has to say.

@skumar7322

Copy link
Copy Markdown
Contributor

The commit 9a7e8e8 is currently causing test failures. The fix is to exclude commons-lang3 from the p4java dependency, as it is being pulled in transitively.

With that fix in place, I'm happy to merge this change into master. Could you please move commit b60493d into a separate PR and keep this PR focused on the dependency update only?

I can review the other change independently in the new PR as there are lots of file.

Thanks!

@strangelookingnerd

Copy link
Copy Markdown
Contributor Author

The commit 9a7e8e8 is currently causing test failures. The fix is to exclude commons-lang3 from the p4java dependency, as it is being pulled in transitively.

Mind sharing these test results? I was not able to reproduce any failures locally. I tried excluding the dependency, but have not seen any change in behavior. That's why I am asking.

With that fix in place, I'm happy to merge this change into master. Could you please move commit b60493d into a separate PR and keep this PR focused on the dependency update only?

#231 (comment)

@skumar7322

Copy link
Copy Markdown
Contributor

my bad. This is enforcer failure not a test failure.
ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.5.0:enforce (display-info) on project p4:
[ERROR] Rule 5: org.apache.maven.enforcer.rules.dependency.RequireUpperBoundDeps failed with message:
[ERROR] Failed while enforcing RequireUpperBoundDeps. The error(s) are [
[ERROR] Require upper bound dependencies error for org.apache.commons:commons-lang3:3.12.0 paths to dependency are:
[ERROR] +-org.jenkins-ci.plugins:p4:1.17.2-SNAPSHOT
[ERROR] +-com.perforce:p4java:2024.2.2695691
[ERROR] +-org.apache.commons:commons-lang3:3.12.0
[ERROR] and
[ERROR] +-org.jenkins-ci.plugins:p4:1.17.2-SNAPSHOT
[ERROR] +-io.jenkins.plugins:commons-lang3-api:3.17.0-87.v5cf526e63b_8b_
[ERROR] +-org.apache.commons:commons-lang3:3.17.0
[ERROR] ]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

@strangelookingnerd

Copy link
Copy Markdown
Contributor Author

my bad. This is enforcer failure not a test failure. ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.5.0:enforce (display-info) on project p4: [ERROR] Rule 5: org.apache.maven.enforcer.rules.dependency.RequireUpperBoundDeps failed with message: [ERROR] Failed while enforcing RequireUpperBoundDeps. The error(s) are [ [ERROR] Require upper bound dependencies error for org.apache.commons:commons-lang3:3.12.0 paths to dependency are: [ERROR] +-org.jenkins-ci.plugins:p4:1.17.2-SNAPSHOT [ERROR] +-com.perforce:p4java:2024.2.2695691 [ERROR] +-org.apache.commons:commons-lang3:3.12.0 [ERROR] and [ERROR] +-org.jenkins-ci.plugins:p4:1.17.2-SNAPSHOT [ERROR] +-io.jenkins.plugins:commons-lang3-api:3.17.0-87.v5cf526e63b_8b_ [ERROR] +-org.apache.commons:commons-lang3:3.17.0 [ERROR] ] [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

I can also not reproduce this. The maven failure does also make me think, that this is not my PR being build either. In my changes you can see I do use version 2025.2.2917314 of p4java (https://github.com/strangelookingnerd/p4-plugin/blob/5f0879f180a9aaa5863482846b151efc9633e8e1/pom.xml#L135) - the stacktrace suggests 2024.2.2695691 though.

@skumar7322

Copy link
Copy Markdown
Contributor

I can also not reproduce this. The maven failure does also make me think, that this is not my PR being build either. In my changes you can see I do use version 2025.2.2917314 of p4java (https://github.com/strangelookingnerd/p4-plugin/blob/5f0879f180a9aaa5863482846b151efc9633e8e1/pom.xml#L135) - the stacktrace suggests 2024.2.2695691 though.

This is because the build run only on the commit 9a7e8e8

I have updated the Jenkinsfile to run the tests using JDK 17. These changes were taken from your PR, so the Jenkins CI checks should now run successfully for this PR as well.

Could you please resolve the merge conflicts so we can proceed with the review and merge?

Thank you!

# Conflicts:
#	Jenkinsfile
#	Jenkinsfile-integ
@strangelookingnerd

Copy link
Copy Markdown
Contributor Author

While the tests run fine locally, they seem to be flaky on ci. I can see similar test failures on the master branch as well. I can only hope that fb55a0b fixes it by not running tests in parallel which I assume is the root cause.

@rantoniuk

Copy link
Copy Markdown
Member

@strangelookingnerd I see the CI is still failing... any thoughts?

@strangelookingnerd

Copy link
Copy Markdown
Contributor Author

I merged main again to get the changes to the Jenkinsfile regarding concurrency. Unfortunately ci.jenkins.io or GitHub for that matter seem to have issues. Would you be able to restart the check?

@rantoniuk

rantoniuk commented Jul 6, 2026

Copy link
Copy Markdown
Member

I see a compilation error:

12:58:34 [ERROR] /home/jenkins/agent/workspace/Plugins_p4-plugin_PR-231/src/main/java/org/jenkinsci/plugins/p4/credentials/P4CredentialsImpl.java:[24,10] cannot find symbol

# Conflicts:
#	Jenkinsfile
#	pom.xml
#	src/test/java/org/jenkinsci/plugins/p4/SimpleTestServer.java
@strangelookingnerd

Copy link
Copy Markdown
Contributor Author

Build succeeded. Finally 🎉

@rantoniuk

Copy link
Copy Markdown
Member

"This branch has conflicts that must be resolved" 🐙

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants