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

[2.7] Eclipselink.jar - add JPMS descriptor (module-info.java) #1943

Merged
merged 5 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

strategy:
matrix:
java_version: [ 17, 21-ea ]
java_version: [ 17, 21 ]

steps:
- name: Start MySQL Database
Expand Down
4 changes: 3 additions & 1 deletion antbuild.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2008, 2021 Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2008, 2023 Oracle and/or its affiliates. All rights reserved.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -193,6 +193,7 @@ persistence22.javadoc.jar=jakarta.persistence.javadoc_2.2.3.jar
persistence21.jar=javax.persistence_2.1.1.v201509150925.jar
persistence20.jar=javax.persistence_2.0.6.v201308211412.jar
persistence10.jar=javax.persistence_1.0.0.v200905011740.jar
persistence20_21_diff.jar=javax.persistence20_21_diff.jar
unsigned.persistence10.jar=javax.persistence_unsigned_for_testing_1.0.0.jar
jaxb-api.src.jar=jakarta.xml.bind-api-source.jar
jaxb-api.jar=jakarta.xml.bind-api.jar
Expand Down Expand Up @@ -284,6 +285,7 @@ kvclient.jar=kvclient.jar
about-file=about.html
readme-file=readme.html
license-files=license.*
module-info-file=module-info.class
setenv-scripts=setenv.*
package-rename-scripts=packageRename.*
jaxb-compiler-scripts=jaxb-compiler.*
Expand Down
176 changes: 116 additions & 60 deletions antbuild.xml
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@
<target name="build-src" depends="build-eclipselink-jar, package-src-jar" description="build EclipseLink jar and source zip"/>

<!-- Default ant target, compiles all components and tests, builds eclipselink.jar. -->
<target name="build" depends="build-eclipselink-jar, build-core-test, build-oracle-if-dependencies" description="build all EclipseLink distribution files except docs"/>
<target name="build" depends="build-eclipselink-jar, package-persistence20_21_diff-jar, build-core-test, build-oracle-if-dependencies" description="build all EclipseLink distribution files except docs"/>

<!-- Default ant target, compiles all components and tests, builds eclipselink.jar. -->
<target name="build-no-test" depends="build-eclipselink-jar, build-util, package-all" description="build all EclipseLink distribution files except docs"/>
Expand Down Expand Up @@ -983,63 +983,11 @@
<echo message="&lt;/body&gt;&lt;/html&gt;" file="${trunk.build.location}/TestConfig.html" append="true"/>
</target>

<!-- Packages the eclipselink.jar. -->
<target name="package-eclipselink-jar" description="build EclipseLink jar">
<delete file="${eclipselink.jar}"/>
<echo message="Implementation-Version: ${version.string}"/>
<delete dir="${build.dir}/javax.persistence/${classes.dir}" failonerror="false"/>
<mkdir dir="${build.dir}/javax.persistence/${classes.dir}"/>
<unzip src="${eclipselink.jpa.plugins}/${persistence22.jar}" dest="${build.dir}/javax.persistence/${classes.dir}"/>
<mkdir dir="${build.dir}/hermes/${classes.dir}"/>
<unzip src="${eclipselink.plugins}/org.eclipse.persistence.jpa.jpql_${version.string}.jar" dest="${build.dir}/hermes/${classes.dir}"/>
<jar jarfile="${eclipselink.jar}" duplicate="preserve">
<manifest>
<attribute name="Specification-Title" value="${eclipselink.specification.title}"/>
<attribute name="Specification-Vendor" value="${specification.vendor}"/>
<attribute name="Specification-Version" value="${release.version}"/>
<attribute name="Implementation-Title" value="${eclipselink.implementation.title}"/>
<attribute name="Implementation-Vendor" value="${implementation.vendor}"/>
<attribute name="Implementation-Version" value="${version.string}"/>
<attribute name="Release-Designation" value="${release.designation}"/>
<attribute name="Premain-Class" value="${eclipselink.premain.class}"/>
<attribute name="Main-Class" value="${eclipselink.main.class}"/>
</manifest>
<!-- Include license files first to ensure the right ones are included -->
<fileset dir=".">
<include name="${about-file}"/>
<include name="${readme-file}"/>
<include name="${license-files}"/>
</fileset>
<!-- Include all non-duplicate content from bOSGi bundles -->
<zipgroupfileset dir="${eclipselink.plugins}">
<include name="org.eclipse.persistence*${version.string}.jar"/>
<include name="${asm.jar}"/>
<include name="org.eclipse.persistence.antlr*.jar"/>
<include name="org.eclipse.persistence.oracle_*.jar"/>
<exclude name="*.jpa.jpql*.jar"/>
<exclude name="*source*.jar"/>
<exclude name="*modelgen*.jar"/>
<exclude name="*equinox*.jar"/>
<exclude name="*builder*.jar"/>
<exclude name="*jpars*.jar"/>
<exclude name="*nosql*.jar"/>
<exclude name="*extension*.jar"/>
</zipgroupfileset>
<!-- Include hermes runtime Only -->
<fileset dir="${build.dir}/hermes/${classes.dir}">
<include name="**/*"/>
<exclude name="**/tools*/**"/>
</fileset>
<!-- Include Moxy Dynamicxjc classes -->
<fileset
dir="${eclipselink.moxy.dynamicxjc}/${classes.dir}"
includes="**/*.class,"/>
<!-- Include necessary JAXB classes -->
<fileset
dir="${eclipselink.util.jaxb}/${classes.dir}"
includes="**/*.class,"/>
<!-- JPA 2.0/2.2 concurrent dev solution: New classes from javax.persistence 2.0 & 2.2 -->
<fileset
<!-- Packages the persistence20_21_diff.jar. -->
<target name="package-persistence20_21_diff-jar" description="build javax.presistence 2.1 vs 2.0 diff jar">
<jar jarfile="${build.dir}/${persistence20_21_diff.jar}" duplicate="preserve">
<!-- JPA 2.0/2.2 concurrent dev solution: New classes from javax.persistence 2.0 & 2.2 -->
<fileset
dir="${build.dir}/javax.persistence/${classes.dir}"
includes="
javax/persistence/Access.class,
Expand Down Expand Up @@ -1162,8 +1110,116 @@
javax/persistence/criteria/CommonAbstractQuery.class,
javax/persistence/criteria/CriteriaDelete.class,
javax/persistence/criteria/CriteriaUpdate.class,
javax/persistence/criteria/CommonAbstractCriteria.class
"/>
javax/persistence/criteria/CommonAbstractCriteria.class"/>
</jar>
</target>

<!-- Packages the eclipselink.jar. -->
<target name="package-eclipselink-jar" description="build EclipseLink jar">
<delete file="${eclipselink.jar}"/>
<echo message="Implementation-Version: ${version.string}"/>
<delete dir="${build.dir}/javax.persistence/${classes.dir}" failonerror="false"/>
<mkdir dir="${build.dir}/javax.persistence/${classes.dir}"/>
<unzip src="${eclipselink.jpa.plugins}/${persistence22.jar}" dest="${build.dir}/javax.persistence/${classes.dir}"/>
<mkdir dir="${build.dir}/hermes/${classes.dir}"/>
<unzip src="${eclipselink.plugins}/org.eclipse.persistence.jpa.jpql_${version.string}.jar" dest="${build.dir}/hermes/${classes.dir}"/>
<jar jarfile="${eclipselink.jar}" duplicate="preserve">
<manifest>
<attribute name="Specification-Title" value="${eclipselink.specification.title}"/>
<attribute name="Specification-Vendor" value="${specification.vendor}"/>
<attribute name="Specification-Version" value="${release.version}"/>
<attribute name="Implementation-Title" value="${eclipselink.implementation.title}"/>
<attribute name="Implementation-Vendor" value="${implementation.vendor}"/>
<attribute name="Implementation-Version" value="${version.string}"/>
<attribute name="Release-Designation" value="${release.designation}"/>
<attribute name="Premain-Class" value="${eclipselink.premain.class}"/>
<attribute name="Main-Class" value="${eclipselink.main.class}"/>
</manifest>
<!-- Include license files first to ensure the right ones are included -->
<fileset dir=".">
<include name="${about-file}"/>
<include name="${readme-file}"/>
<include name="${license-files}"/>
</fileset>
<!-- Include all non-duplicate content from bOSGi bundles -->
<zipgroupfileset dir="${eclipselink.plugins}">
<include name="org.eclipse.persistence*${version.string}.jar"/>
<include name="${asm.jar}"/>
<include name="org.eclipse.persistence.antlr*.jar"/>
<include name="org.eclipse.persistence.oracle_*.jar"/>
<exclude name="*.jpa.jpql*.jar"/>
<exclude name="*source*.jar"/>
<exclude name="*modelgen*.jar"/>
<exclude name="*equinox*.jar"/>
<exclude name="*builder*.jar"/>
<exclude name="*jpars*.jar"/>
<exclude name="*nosql*.jar"/>
<exclude name="*extension*.jar"/>
</zipgroupfileset>
<!-- Include hermes runtime Only -->
<fileset dir="${build.dir}/hermes/${classes.dir}">
<include name="**/*"/>
<exclude name="**/tools*/**"/>
</fileset>
<!-- Include Moxy Dynamicxjc classes -->
<fileset
dir="${eclipselink.moxy.dynamicxjc}/${classes.dir}"
includes="**/*.class,"/>
<!-- Include necessary JAXB classes -->
<fileset
dir="${eclipselink.util.jaxb}/${classes.dir}"
includes="**/*.class,"/>
</jar>

<delete dir="${build.dir}/eclipselink/${classes.dir}" failonerror="false"/>
<mkdir dir="${build.dir}/eclipselink/${classes.dir}"/>
<path id="eclipselink-jar.compile.module.path" cache="true">
<pathelement path="${eclipselink.plugins}/${annotation-api.jar}"/>
<pathelement path="${eclipselink.plugins}/${activation.jar}"/>
<pathelement path="${eclipselink.plugins}/${antlr}"/>
<pathelement path="${eclipselink.plugins}/${asm.jar}"/>
<pathelement path="${eclipselink.plugins}/${glassfish-corba-omgapi.jar}"/>
<pathelement path="${eclipselink.plugins}/${jaxb-api.jar}"/>
<pathelement path="${eclipselink.plugins}/${jaxb-impl.jar}"/>
<pathelement path="${eclipselink.plugins}/${jaxb-xjc.jar}"/>
<pathelement path="${eclipselink.jpa.plugins}/${persistence22.jar}"/>
<pathelement path="${eclipselink.plugins}/${resource-api.jar}"/>
<pathelement path="${eclipselink.plugins}/${json.jar}"/>
<pathelement path="${eclipselink.plugins}/${validation-api.jar}"/>
<pathelement path="${eclipselink.plugins}/${ejb-api.jar}"/>
<pathelement path="${eclipselink.plugins}/${jms-api.jar}"/>
<pathelement path="${eclipselink.plugins}/${transaction-api.jar}"/>
<pathelement path="${eclipselink.plugins}/${servlet-api.jar}"/>
<pathelement path="${eclipselink.plugins}/${soap-api.jar}"/>
<pathelement path="${eclipselink.plugins}/${cdi-api.jar}"/>
<pathelement path="${eclipselink.plugins}/${mail.jar}"/>
<pathelement path="${eclipselink.plugins}/${ws-api.jar}"/>
<pathelement path="${eclipselink.plugins}/${wsdl.jar}"/>
<pathelement path="${eclipselink.plugins}/${wsrs-api.jar}"/>
<pathelement path="${eclipselink.plugins}/${slf4j-api.jar}"/>
</path>
<path id="eclipselink-jar.compile.class.path" cache="true">
<pathelement path="${eclipselink.jar}"/>
</path>
<unzip src="${eclipselink.jar}" dest="${build.dir}/eclipselink/${classes.dir}"/>
<echo message="module-path ='${toString:eclipselink-jar.compile.module.path}'"/>
<javac srcdir="${eclipselink.features.base}/bundles/eclipselink/${src.dir}"
destdir="${build.dir}/eclipselink/${classes.dir}"
debug="${javac.debug}"
debuglevel="${javac.debuglevel}"
encoding="UTF-8"
optimize="${javac.optimize}"
release="11"
deprecation="${javac.deprecation}"
failonerror="true"
includes="module-info.java"
modulepathref="eclipselink-jar.compile.module.path">
</javac>
<jar jarfile="${eclipselink.jar}" update="true">
<!-- Include module-info.class -->
<fileset dir="${build.dir}/eclipselink/${classes.dir}">
<include name="${module-info-file}"/>
</fileset>
</jar>
</target>

Expand Down
4 changes: 2 additions & 2 deletions buildsystem/compdeps/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<eclipselink.asm.version>9.5.0</eclipselink.asm.version>
<!-- CQ #21139, 21140 -->
<ch.qos.logback.version>1.2.3</ch.qos.logback.version>
<com.sun.xml.bind.version>2.3.3</com.sun.xml.bind.version>
<com.sun.xml.bind.version>2.3.8</com.sun.xml.bind.version>
<com.sun.xml.messaging.version>1.5.1</com.sun.xml.messaging.version>
<com.sun.xml.streambuffer.version>1.5.7</com.sun.xml.streambuffer.version>
<com.sun.xml.ws.policy.version>2.7.6</com.sun.xml.ws.policy.version>
Expand All @@ -82,7 +82,7 @@
<jakarta.jws.version>1.1.1</jakarta.jws.version>
<jakarta.mail.version>1.6.4</jakarta.mail.version>
<jakarta.persistence.version>2.2.3</jakarta.persistence.version>
<jakarta.resource.version>1.7.3</jakarta.resource.version>
<jakarta.resource.version>1.7.4</jakarta.resource.version>
<jakarta.servlet.version>4.0.3</jakarta.servlet.version>
<jakarta.transaction.version>1.3.3</jakarta.transaction.version>
<jakarta.validation.version>2.0.2</jakarta.validation.version>
Expand Down
Loading
Loading