eclipse-platform / eclipse.platform

https://eclipse.dev/eclipse/
Eclipse Public License 2.0
72 stars 104 forks source link

Ant buildfiles export ignores the --release javac option #1437

Open jourquin opened 2 months ago

jourquin commented 2 months ago

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, 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:

<target depends="init" name="build-project">
        <echo message="${ant.project.name}: ${ant.file}"/>
        <javac debug="true" debuglevel="${debuglevel}" destdir="classes" includeantruntime="false" source="${source}" target="${target}">
            <src path="src"/>
            <classpath refid="Nodus.classpath"/>
        </javac>
    </target>

Expected behavior:

Tested under this environment:

Community

akurtakov commented 2 months ago

Would you please give exact instructions and maybe sample plugin to reproduce the issue?

jourquin commented 2 months ago

I’ve updated the issue with more explanation.

Le 20 juin 2024 à 16:37, Александър Куртаков @.***> a écrit :

Would you please give exact instructions and maybe sample plugin to reproduce the issue?

— Reply to this email directly, view it on GitHubhttps://github.com/eclipse-platform/eclipse.platform/issues/1437#issuecomment-2180872648, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACRDPB52JS645PUCQ6X3BHDZILSKNAVCNFSM6AAAAABJUCWCQ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBQHA3TENRUHA. You are receiving this because you authored the thread.Message ID: @.***>