Skip to content

Commit

Permalink
ASM (org.eclipse.persistence.asm implementation) removal
Browse files Browse the repository at this point in the history
Signed-off-by: Radek Felcman <[email protected]>
  • Loading branch information
rfelcman committed Dec 8, 2023
1 parent 149e9ce commit f5a6a3f
Show file tree
Hide file tree
Showing 58 changed files with 299 additions and 1,754 deletions.
7 changes: 0 additions & 7 deletions bundles/eclipselink/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,6 @@
<classifier>common-license</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.asm</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.core</artifactId>
Expand Down Expand Up @@ -399,7 +394,6 @@
<includeScope>provided</includeScope>
<classifier>sources</classifier>
<includeArtifactIds>
org.eclipse.persistence.asm,
org.eclipse.persistence.core,
org.eclipse.persistence.corba,
org.eclipse.persistence.dbws,
Expand Down Expand Up @@ -440,7 +434,6 @@
<includeGroupIds>${project.groupId}</includeGroupIds>
<includeScope>provided</includeScope>
<includeArtifactIds>
org.eclipse.persistence.asm,
org.eclipse.persistence.core,
org.eclipse.persistence.corba,
org.eclipse.persistence.dbws,
Expand Down
3 changes: 1 addition & 2 deletions bundles/eclipselink/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, 2022 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 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 @@ -221,7 +221,6 @@
exports org.eclipse.persistence.internal.jpa.metadata.xml;
exports org.eclipse.persistence.internal.jpa.rs.metadata.model;
exports org.eclipse.persistence.internal.jpa.rs.metadata.model.v2;
exports org.eclipse.persistence.internal.libraries.asm;
exports org.eclipse.persistence.internal.localization;
exports org.eclipse.persistence.internal.oxm;
exports org.eclipse.persistence.internal.oxm.mappings;
Expand Down
9 changes: 0 additions & 9 deletions bundles/others/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.asm</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.core</artifactId>
Expand Down Expand Up @@ -284,11 +280,6 @@
</dependency>
<!--Source dependencies-->
<!--Sources main dependencies-->
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.asm</artifactId>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.jpa.jpql</artifactId>
Expand Down
17 changes: 0 additions & 17 deletions bundles/p2site/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@
<dependencies>
<!--Binary dependencies-->
<!--Other modules-->
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.asm</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.core</artifactId>
Expand Down Expand Up @@ -273,11 +269,6 @@
</dependency>
<!--Source dependencies-->
<!--Sources main dependencies-->
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.asm</artifactId>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.jpa.jpql</artifactId>
Expand Down Expand Up @@ -388,10 +379,6 @@
<artifacts>
<!-- specify your depencies here -->
<!-- groupId:artifactId:version -->
<artifact>
<id>org.eclipse.persistence:org.eclipse.persistence.asm:${project.version}</id>
<source>true</source>
</artifact>
<artifact>
<id>org.eclipse.persistence:org.eclipse.persistence.core:${project.version}</id>
<source>true</source>
Expand Down Expand Up @@ -449,10 +436,6 @@
<transitive>false</transitive>
<source>true</source>
</artifact>
<artifact>
<id>org.eclipse.persistence:org.eclipse.persistence.asm:${project.version}</id>
<source>true</source>
</artifact>
<artifact>
<id>org.eclipse.persistence:org.eclipse.persistence.core:${project.version}</id>
<source>true</source>
Expand Down
26 changes: 21 additions & 5 deletions bundles/tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.asm</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.core</artifactId>
Expand Down Expand Up @@ -90,6 +85,27 @@
<artifactId>parsson</artifactId>
<scope>test</scope>
</dependency>
<!--ASM Implementation-->
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-commons</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-tree</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-util</artifactId>
<scope>test</scope>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.glassfish.corba</groupId>-->
<!-- <artifactId>glassfish-corba-omgapi</artifactId>-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public class OSGITestHelper {
private static final String JAXB_API_JAR = System.getProperty("jaxb-api.jar", "jakarta.xml.bind-api.jar");
private static final String JAXB_OSGI = System.getProperty("jaxb-osgi.jar", "jaxb-xjc.jar");
private static final String JAXRS_JAR = System.getProperty("jaxrs.jar", "jakarta.ws.rs-api.jar");
private static final String ASM_JAR = System.getProperty("asm.jar", "org.eclipse.persistence.asm.jar");

public static Option[] getDefaultOptions() {

Expand All @@ -60,7 +59,6 @@ public static Option[] getDefaultOptions() {
// EclipseLink bundles
bundle(pathToUrl(PLUGINS_DIR + "org.eclipse.persistence.moxy.jar")),
bundle(pathToUrl(PLUGINS_DIR + "org.eclipse.persistence.core.jar")),
bundle(pathToUrl(PLUGINS_DIR + ASM_JAR)),

cleanCaches(),
junitBundles());
Expand All @@ -78,7 +76,6 @@ public static Option[] getOptionsWithBeanValidation() {
// EclipseLink bundles
bundle(pathToUrl(PLUGINS_DIR + "org.eclipse.persistence.moxy.jar")),
bundle(pathToUrl(PLUGINS_DIR + "org.eclipse.persistence.core.jar")),
bundle(pathToUrl(PLUGINS_DIR + ASM_JAR)),

bundle(pathToUrl(PLUGINS_DIR + "jakarta.validation-api.jar")),
bundle(pathToUrl(PLUGINS_DIR + "hibernate-validator.jar")),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,6 @@ public static Option[] config() {
return OSGITestHelper.getDefaultOptions();
}

@Test
public void testAsmELVersion() {
Class<?> c = loadClass(CORE_BUNDLE_NAME, "org.eclipse.persistence.internal.libraries.asm.AnnotationVisitor");
assertClassLoadedByBundle(c, ASM_BUNDLE_NAME);
}

@Test
public void testAsmCoreVersion() {
Class<?> c = loadClass(CORE_BUNDLE_NAME, "org.eclipse.persistence.asm.AnnotationVisitor");
Expand Down
25 changes: 18 additions & 7 deletions dbws/org.eclipse.persistence.dbws/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,25 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<!--EclipseLink ASM Implementation-->
<!--ASM Implementations-->
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.asm</artifactId>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-commons</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-tree</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-util</artifactId>
<scope>test</scope>
</dependency>
<!--JDBC driver (test dependency)-->
Expand Down Expand Up @@ -121,10 +136,6 @@
org.eclipse.persistence.internal.xr.sxf,
*
</Export-Package>
<Import-Package>
org.eclipse.persistence.internal.libraries.asm*;version="${version;==;${@}}",
*
</Import-Package>
</instructions>
</configuration>
</execution>
Expand Down
3 changes: 1 addition & 2 deletions docs/docs.solutions/src/main/asciidoc/tlandgs002.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
///////////////////////////////////////////////////////////////////////////////

Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2022, 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 @@ -93,7 +93,6 @@ directory.
.
.
o org.eclipse.persistence.antlr.jar
o org.eclipse.persistence.asm.jar
o org.eclipse.persistence.core.jar
o org.eclipse.persistence.jpa.jar
o org.eclipse.persistence.jpa.modelgen.jar
Expand Down
32 changes: 0 additions & 32 deletions foundation/eclipselink.core.test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,33 +90,24 @@
<scope>test</scope>
</dependency>
<!--ASM Implementations-->
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.asm</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>${asm.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-commons</artifactId>
<version>${asm.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-tree</artifactId>
<version>${asm.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-util</artifactId>
<version>${asm.version}</version>
<scope>test</scope>
</dependency>
<!--For Oracle DB driver see Oracle proprietary dependencies part. It's not limited to tests only-->
Expand Down Expand Up @@ -176,26 +167,6 @@
</includes>
</configuration>
</execution>
<execution>
<id>asm-eclipselink-test</id>
<goals>
<goal>test</goal>
</goals>
<configuration>
<classpathDependencyExcludes>
<classpathDependencyExclude>org.ow2.asm:asm</classpathDependencyExclude>
<classpathDependencyExclude>org.ow2.asm:asm-commons</classpathDependencyExclude>
<classpathDependencyExclude>org.ow2.asm:asm-tree</classpathDependencyExclude>
<classpathDependencyExclude>org.ow2.asm:asm-util</classpathDependencyExclude>
</classpathDependencyExcludes>
<systemPropertyVariables>
<eclipselink.asm.service>eclipselink</eclipselink.asm.service>
</systemPropertyVariables>
<includes>
<include>org/eclipse/persistence/testing/tests/junit/asm/**/*Test</include>
</includes>
</configuration>
</execution>
<execution>
<id>asm-ow2-test</id>
<goals>
Expand All @@ -205,9 +176,6 @@
<systemPropertyVariables>
<eclipselink.asm.service>ow2</eclipselink.asm.service>
</systemPropertyVariables>
<classpathDependencyExcludes>
<classpathDependencyExclude>org.eclipse.persistence.asm</classpathDependencyExclude>
</classpathDependencyExcludes>
<includes>
<include>org/eclipse/persistence/testing/tests/junit/asm/**/*Test</include>
</includes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,13 @@ public class ASMFactoryTest {
public void getAsmServiceTest() {
String asmServiceSysProperty = System.getProperty(SystemProperties.ASM_SERVICE, "");
String asmService = ASMFactory.getAsmService();
switch (asmServiceSysProperty) {
case ASMFactory.ASM_SERVICE_OW2:
assertEquals(ASMFactory.ASM_SERVICE_OW2, asmService);
break;
case ASMFactory.ASM_SERVICE_ECLIPSELINK:
default:
assertEquals(ASMFactory.ASM_SERVICE_ECLIPSELINK, asmService);
}
assertEquals(ASMFactory.ASM_SERVICE_OW2, asmService);
}

@Test
public void createClassVisitorTest() {
String asmServiceSysProperty = System.getProperty(SystemProperties.ASM_SERVICE, "");
ClassVisitor classVisitor = ASMFactory.createClassVisitor(ASMFactory.ASM_API_SELECTED);
switch (asmServiceSysProperty) {
case ASMFactory.ASM_SERVICE_OW2:
assertEquals(org.eclipse.persistence.asm.internal.platform.ow2.ClassVisitorImpl.class, classVisitor.getClass());
break;
case ASMFactory.ASM_SERVICE_ECLIPSELINK:
default:
assertEquals(org.eclipse.persistence.asm.internal.platform.eclipselink.ClassVisitorImpl.class, classVisitor.getClass());
}
assertEquals(org.eclipse.persistence.asm.internal.platform.ow2.ClassVisitorImpl.class, classVisitor.getClass());
}
}
8 changes: 0 additions & 8 deletions foundation/org.eclipse.persistence.core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@

<dependencies>
<!--Other modules-->
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.asm</artifactId>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.jpa.jpql</artifactId>
Expand Down Expand Up @@ -300,14 +294,12 @@
*
</Export-Package>
<Import-Package>
org.eclipse.persistence.internal.libraries.asm*;version=!;resolution:=optional,
org.objectweb.asm*;version=!;resolution:=optional,
javax.rmi;version=!;resolution:=optional,
javax.rmi.CORBA;version=!;resolution:=optional,
org.omg.CORBA;version=!;resolution:=optional,
org.omg.CORBA.portable;version=!;resolution:=optional,
org.omg.CORBA_2_3.portable;version=!;resolution:=optional,
org.eclipse.persistence.internal.libraries.asm*;version="${version;==;${@}}",
org.eclipse.persistence.eis.adapters.xmlfile;resolution:=optional,
org.eclipse.persistence.sessions.coordination.rmi.iiop;resolution:=optional,
org.eclipse.persistence.sessions.coordination.corba.sun;resolution:=optional,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
requires static jakarta.persistence;
requires static jakarta.xml.bind;

requires org.eclipse.persistence.asm;
requires static org.eclipse.persistence.jpa.jpql;

requires static jakarta.cdi;
Expand Down
Loading

0 comments on commit f5a6a3f

Please sign in to comment.