[ERROR] Failed to execute goal org.codehaus.mojo:antlr-maven-plugin:2.2:generate (cron) on project jenkins-core: Execution cron of goal org.codehaus.mojo:antlr-maven-plugin:2.2:generate failed:

Hey all

I’ve downloaded the Jenkins source from jenkinsci/jenkins: Jenkins automation server (github.com) and trying to build the source code following this IntelliJ Setup for Jenkins Core Development

the command I’ve run is the same as the doc and I’m getting the following error.

[INFO]
[INFO] --- build-helper-maven-plugin:3.3.0:add-source (add-source) @ jenkins-core ---
[INFO] Source directory: /Users/gearoidmaguire/git/truata/devops/jenkins/core/target/generated-sources/antlr added.
[INFO] Source directory: /Users/gearoidmaguire/git/truata/devops/jenkins/core/target/generated-sources/localizer added.
[INFO] Source directory: /Users/gearoidmaguire/git/truata/devops/jenkins/core/target/generated-sources/taglib-interface added.
[INFO]
[INFO] --- localizer-maven-plugin:1.31:generate (default) @ jenkins-core ---
[INFO]
[INFO] --- antlr-maven-plugin:2.2:generate (cron) @ jenkins-core ---
[INFO] performing grammar generation [crontab.g]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Jenkins main module 2.364-SNAPSHOT:
[INFO]
[INFO] Jenkins main module ................................ SUCCESS [  1.288 s]
[INFO] Jenkins BOM ........................................ SUCCESS [  0.052 s]
[INFO] Internal SPI for WebSocket ......................... SUCCESS [  0.900 s]
[INFO] Jetty 9 implementation for WebSocket ............... SUCCESS [  0.791 s]
[INFO] Jetty 10 implementation for WebSocket .............. SUCCESS [  0.757 s]
[INFO] Jenkins cli ........................................ SUCCESS [  3.741 s]
[INFO] Jenkins core ....................................... FAILURE [  0.963 s]
[INFO] Jenkins war ........................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  9.600 s
[INFO] Finished at: 2022-08-14T21:02:13+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:antlr-maven-plugin:2.2:generate (cron) on project jenkins-core: Execution cron of goal org.codehaus.mojo:antlr-maven-plugin:2.2:generate failed: The Security Manager is deprecated and will be removed in a future release -> [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/PluginExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :jenkins-core

would anyone know what it is I’m doing wrong?

Not enough information in the output to identify the root cause. The message that says:

The Security Manager is deprecated and will be removed in a future release

is usually reported by Java 17, though I believe that it can be reported by other Java versions as well. When I compile with Java 17 and Apache Maven 3.8.6 using the contributing instructions, it is successful. The command that I use is:

$ mvn -version
Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
Maven home: /home/mwaite/tools/apache-maven-3.8.6
Java version: 17.0.4, vendor: Eclipse Adoptium, runtime: /home/mwaite/tools/jdk-17.0.4+8
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.18.0-372.16.1.el8_6.x86_64", arch: "amd64", family: "unix"
$ mvn -am -pl war,bom -Pquick-build clean install

It also compiles successfully with Java 17 on ci.jenkins.io.

Are you using Apache Maven 3.8.6 or some other version?

Are you using Java 11, Java 17, or some other (unsupported) version?

1 Like

Hello!
Have same error

Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
Maven home: /opt/apache-maven-3.8.6
Java version: 18.0.1.1, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/jdk-18.0.1.1.jdk/Contents/Home
Default locale: ru_RU, platform encoding: UTF-8
OS name: "mac os x", version: "12.5", arch: "x86_64", family: "mac"
1 Like

Jenkins core officially only supports 11, though 17 seems to work, I don’t think 18 support has started yet.

2 Likes

Thx, try to build at 17 jdk
Result will add to topic

1 Like