eclipse-platform / eclipse-platform/eclipse.platform

Ant buildfiles export ignores the --release javac option

Open
#1,437 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
165
Forks
174
Avg merge
2d 8h
Merged PRs (30d)
22

Description

This issue is related to the File|Export|Ant Buildfiles tool of a Java project.

The generated build.xml file is supposed to reflect the compiler settings set either at the workspace or the project level.

In the Java|Compiler settings, the Compiler compliance level can be set. Another checkbox allows for using the `--release` option (instead of the `-source` and `-target` options pair).

As explained [here](https://stackoverflow.com/questions/54843571/java-11-what-is-the-difference-between-javac-release-and-source-and-target), using `--release` is different from using the `-source` and `-target` pair.

However, the generated build.xml file always contains the following code, even if the "Use --release" option is checked in the Java Compiler properties:
```







```

Expected behavior:

- When "Use --release" is checked (at the project or workspace level) a "release" property should be set, instead of the "target" and "source" properties in build.xml. Example:
```

```
- The following code should replace the previous one in build.xml:
```







```

## Tested under this environment:
* Eclipse IDE/Platform version (as shown in *Help > About*): 2024-06 (4.32.0)

## Community

- [x] I understand reporting an issue to this OSS project does not mandate anyone to fix it. Other contributors may consider the issue, or not, at their own convenience. The most efficient way to get it fixed is that I fix it myself and contribute it back as a good quality patch to the project.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.