чт, 7 окт. 2021 г. в 22:59, Konstantin Kolinko <[email protected]>:
> чт, 7 окт. 2021 г. в 18:46, Mark Thomas <[email protected]>:
> >
> Approach e)
> Combine ecj-4.6.3.jar and ecj-4.20.jar (or later) into a single
> multi-release jar, "ecj-4.3.6_and_4.20.jar".
> See
> https://openjdk.java.net/jeps/238
>
> I mean that
> - The META-INF/MANIFEST.MF file is replaced with one that has the
> attribute "Multi-Release: true", and all other attributes except
> Main-Class are removed. (I think that "Export-Package", "Bundle-Name",
> "Bundle-Version", "Bundle-ClassPath" are to be removed. The
> ecj-4.20.jar is signed. Those signatures are to be removed as well).
> - The ecj-4.6.3.jar classes stay where they are.
> - The ecj-4.20.jar classes go into META-INF/versions/9/
>

A simple build file to create that jar with Apache Ant:

[[[
<?xml version="1.0" encoding="UTF-8"?>
<!--
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<project default="build">
  <target name="build">
    <jar destfile="ecj-4.3.6_and_4.20.jar">
      <manifest>
        <attribute name="Multi-Release" value="true"/>
        <attribute name="Main-Class"
value="org.eclipse.jdt.internal.compiler.batch.Main"/>
      </manifest>
      <zipfileset src="ecj-4.6.3.jar"/>
      <zipfileset src="ecj-4.20.jar" prefix="META-INF/versions/9/"
excludes="META-INF/**" />
    </jar>
  </target>
</project>
]]]

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to