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

CDT cannot be built on Java 21 due to security manager changes #657

Closed
Bananeweizen opened this issue Dec 21, 2023 · 0 comments · Fixed by #761
Closed

CDT cannot be built on Java 21 due to security manager changes #657

Bananeweizen opened this issue Dec 21, 2023 · 0 comments · Fixed by #761

Comments

@Bananeweizen
Copy link
Contributor

Bananeweizen commented Dec 21, 2023

Describe the bug
On Java 21 the Maven build of CDT fails in every Maven module that needs to run Ant. I'm not sure if this failure is currently even relevant for the CDT project, since building on Java 17 continues to work fine. I'm fine with closing as "not relevant yet".

To Reproduce
Steps to reproduce the behavior:

cd cdt-root
set JAVA_HOME=your-jdk-21-location
mvn verify

Screenshots

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:3.1.0:run (generate-configuration) on project org.eclipse.cdt.debug.application: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR] C:\dev\cdt-main\git\cdt\debug\org.eclipse.cdt.debug.application\configGenerator.xml:4: java.lang.UnsupportedOperationException: The Security Manager is deprecated and will be removed in a future release
[ERROR] around Ant part ...<ant antfile="configGenerator.xml" target="generate.configuration" />... @ 6:74 in C:\dev\cdt-main\git\cdt\debug\org.eclipse.cdt.debug.application\target\antrun\build-main.xml

Version Information (please complete the following information):
HEAD

Additional context
There was a discussion somewhere in platform about Ant being problematic on Java 21, because the exception handling of the Ant plugin in Eclipse relies on the security manager to capture the "exit" of the embedded Ant. That's probably exactly the same issue.

ruspl-afed added a commit to ruspl-afed/cdt that referenced this issue Apr 19, 2024
…ger changes

Remove config generation for debug application

Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
ruspl-afed added a commit to ruspl-afed/cdt that referenced this issue Apr 19, 2024
…ger changes

Remove config generation for debug application

Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
ruspl-afed added a commit to ruspl-afed/cdt that referenced this issue Apr 19, 2024
…ger changes

* Remove config generation for debug application
* change BREE to JavaSE-21

Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
ruspl-afed added a commit to ruspl-afed/cdt that referenced this issue Apr 19, 2024
…ger changes

* change BREE to JavaSE-21
* Remove config generation for debug application
* Remove `org.eclipse.osgi.services` from `proxy.server` product

Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
ruspl-afed added a commit to ruspl-afed/cdt that referenced this issue Apr 19, 2024
…ger changes

* Switch CI to Java 21
* Remove config generation for debug application
* Remove `org.eclipse.osgi.services` from `proxy.server` product
* Remove `org.eclipse.osgi.services` from
`org.eclipse.cdt.debug.application.product` product
* Move `org.eclipse.cdt.debug.application.product` from profile to
general part

Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
ruspl-afed added a commit that referenced this issue Apr 19, 2024
* Switch CI to Java 21
* Remove config generation for debug application
* Remove `org.eclipse.osgi.services` from `proxy.server` product
* Remove `org.eclipse.osgi.services` from
`org.eclipse.cdt.debug.application.product` product
* Move `org.eclipse.cdt.debug.application.product` from profile to
general part

Signed-off-by: Alexander Fedorov <alexander.fedorov@arsysop.ru>
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 a pull request may close this issue.

1 participant