26 views
Skip to first unread message

Kul Bhushan Srivastava

unread,
Jan 9, 2023, 8:10:43 AM1/9/23
to jenkin...@googlegroups.com
Hi Team,

Need your help!

I have been using the jenkins-ci plugins for my custom plugin development.

Until now I was able to compile the maven dependencies against java8.

All of sudden the dependencies which are getting downloaded are compatible with java11 and not with java8.

So facing the below compilation issues.

[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  8.767 s
[INFO] Finished at: 2023-01-09T06:40:13-06:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project STE: Compilation failure
[ERROR] /D:/workspace/Build/src/main/java/com/oracle/siebel/jenkins/BuildStepCreator.java:[6,27] cannot access org.kohsuke.stapler.DataBoundSetter
[ERROR]   bad class file: C:\Users\kulsriva\.m2\repository\org\kohsuke\stapler\stapler\1756.vec9071748061\stapler-1756.vec9071748061.jar(org/kohsuke/stapler/DataBoundSetter.class)
[ERROR]     class file has wrong version 55.0, should be 52.0
[ERROR]     Please remove or make sure it appears in the correct subdirectory of the classpath.
[ERROR]

Please help on how to use java8 compatible dependencies.

--
Thanks & Regards
Kul Bhushan Srivastava

Daniel Beck

unread,
Jan 9, 2023, 8:20:36 AM1/9/23
to jenkin...@googlegroups.com
On Mon, Jan 9, 2023 at 2:10 PM Kul Bhushan Srivastava <cool...@gmail.com> wrote:
Until now I was able to compile the maven dependencies against java8.

All of sudden the dependencies which are getting downloaded are compatible with java11 and not with java8.

You're probably using Jenkins 2.357 or newer as your core dependency: https://www.jenkins.io/changelog/#v2.357
Alternatively, you've updated the parent pom to 4.52 or newer: https://github.com/jenkinsci/plugin-pom/releases/tag/plugin-4.52

The version of Stapler specified in the log is used in Jenkins 2.381 and newer.

Basically, this is intentional. Time to update Java, or revert updates to your dependencies (which can only be a temporary solution).
Reply all
Reply to author
Forward
0 new messages