Skip to content

Commit

Permalink
OW2 ASM dependency cleanup in the test scope due transient dependency…
Browse files Browse the repository at this point in the history
… from core and eclipselink.jar

SDO compiler script modification to include OW2 ASM
  • Loading branch information
rfelcman committed Dec 11, 2023
1 parent e25454a commit f790344
Show file tree
Hide file tree
Showing 20 changed files with 21 additions and 351 deletions.
5 changes: 0 additions & 5 deletions bundles/eclipselink/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,6 @@
<artifactId>jakarta.json-api</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>commonj.sdo</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions bundles/eclipselink/src/main/assembly/eclipselink.zip.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2019, 2021 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2019, 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 @@ -105,7 +105,7 @@
</dependencySet>
<dependencySet>
<useProjectArtifact>false</useProjectArtifact>
<outputFileNameMapping>${artifact.artifactId}.${artifact.extension}</outputFileNameMapping>
<scope>provided</scope>
<outputDirectory>eclipselink/jlib/sdo/</outputDirectory>
<includes>
<include>${project.groupId}:commonj.sdo</include>
Expand Down
5 changes: 5 additions & 0 deletions bundles/eclipselink/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@

requires static com.sun.xml.bind.core;

requires static org.objectweb.asm;
requires static org.objectweb.asm.commons;
requires static org.objectweb.asm.tree;
requires static org.objectweb.asm.util;

exports org.eclipse.persistence.jpa.jpql;
exports org.eclipse.persistence.jpa.jpql.parser;
exports org.eclipse.persistence.jpa.jpql.utility.iterable;
Expand Down
9 changes: 7 additions & 2 deletions bundles/eclipselink/src/main/scripts/bin/sdo-compiler.cmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@REM
@REM Copyright (c) 2018, 2021 Oracle and/or its affiliates. All rights reserved.
@REM Copyright (c) 2018, 2023 Oracle and/or its affiliates. All rights reserved.
@REM
@REM This program and the accompanying materials are made available under the
@REM terms of the Eclipse Public License v. 2.0 which is available at
Expand Down Expand Up @@ -28,10 +28,15 @@ set THIS=%_FIXPATH:~1%
set MODULEPATH=%THIS%..\jlib\moxy
set MODULEPATH=%MODULEPATH%;%THIS%..\jlib\eclipselink.jar
set MODULEPATH=%MODULEPATH%;%THIS%..\jlib\jpa\jakarta.persistence-api.jar
set MODULEPATH=%MODULEPATH%;%THIS%..\jlib\asm\asm.jar
set MODULEPATH=%MODULEPATH%;%THIS%..\jlib\asm\asm-commons.jar
set MODULEPATH=%MODULEPATH%;%THIS%..\jlib\asm\asm-tree.jar
set MODULEPATH=%MODULEPATH%;%THIS%..\jlib\asm\asm-util.jar

set MAIN_CLASS=org.eclipse.persistence.sdo.helper.SDOClassGenerator
set JAVA_ARGS=%*

%JAVA_HOME%\bin\java.exe %JVM_ARGS% -p %MODULEPATH% -m eclipselink/%MAIN_CLASS% %JAVA_ARGS%
%JAVA_HOME%\bin\java.exe %JVM_ARGS% --add-modules eclipselink,org.objectweb.asm -p %MODULEPATH% -m eclipselink/%MAIN_CLASS% %JAVA_ARGS%

@endlocal
goto :EOF
Expand Down
10 changes: 7 additions & 3 deletions bundles/eclipselink/src/main/scripts/bin/sdo-compiler.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
#
# Copyright (c) 2018, 2021 Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2018, 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 All @@ -22,8 +22,12 @@ JVM_ARGS=-Xmx256m
# Please do not change any of the following lines:
MODULEPATH=`dirname $0`/../jlib/moxy:\
`dirname $0`/../jlib/eclipselink.jar:\
`dirname $0`/../jlib/jpa/jakarta.persistence-api.jar
`dirname $0`/../jlib/jpa/jakarta.persistence-api.jar:\
`dirname $0`/../jlib/asm/asm.jar:\
`dirname $0`/../jlib/asm/asm-commons.jar:\
`dirname $0`/../jlib/asm/asm-tree.jar:\
`dirname $0`/../jlib/asm/asm-util.jar
MAIN_CLASS=org.eclipse.persistence.sdo.helper.SDOClassGenerator
JAVA_ARGS="$@"

${JAVA_HOME}/bin/java ${JVM_ARGS} -p "${MODULEPATH}" -m eclipselink/${MAIN_CLASS} ${JAVA_ARGS}
${JAVA_HOME}/bin/java ${JVM_ARGS} --add-modules eclipselink,org.objectweb.asm -p "${MODULEPATH}" -m eclipselink/${MAIN_CLASS} ${JAVA_ARGS}
21 changes: 0 additions & 21 deletions bundles/tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,27 +85,6 @@
<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
21 changes: 0 additions & 21 deletions dbws/org.eclipse.persistence.dbws/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,27 +87,6 @@
<artifactId>junit</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>
<!--JDBC driver (test dependency)-->
<dependency>
<groupId>${db.driver.groupId}</groupId>
Expand Down
21 changes: 0 additions & 21 deletions foundation/eclipselink.core.test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,27 +89,6 @@
<artifactId>org.eclipse.persistence.core.test.framework</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>
<!--For Oracle DB driver see Oracle proprietary dependencies part. It's not limited to tests only-->
<!--JDBC driver (test dependency)-->
<dependency>
Expand Down
21 changes: 0 additions & 21 deletions foundation/org.eclipse.persistence.nosql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,27 +85,6 @@
<type>test-jar</type>
<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>
</dependencies>

<build>
Expand Down
21 changes: 0 additions & 21 deletions jpa/eclipselink.jpa.spring.test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,27 +68,6 @@
<artifactId>org.eclipse.persistence.jpa.test.framework</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>
<!--API dependencies-->
<dependency>
<groupId>jakarta.transaction</groupId>
Expand Down
32 changes: 0 additions & 32 deletions jpa/eclipselink.jpa.test.jse/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,6 @@
<artifactId>weld-se-core</artifactId>
<scope>test</scope>
</dependency>
<!--ASM Implementation-->
<!--Origin OW2-->
<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.eclipse.parsson</groupId>
<artifactId>parsson</artifactId>
Expand Down Expand Up @@ -157,21 +140,6 @@
<artifactId>junit</artifactId>
<version>${junit.version}</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>${asm.version}</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-commons</artifactId>
<version>${asm.version}</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-tree</artifactId>
<version>${asm.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
Expand Down
21 changes: 0 additions & 21 deletions jpa/eclipselink.jpa.test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,27 +137,6 @@
<artifactId>jaxb-xjc</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>
<!--JDBC driver (test dependency)-->
<dependency>
<groupId>${db.driver.groupId}</groupId>
Expand Down
37 changes: 0 additions & 37 deletions jpa/eclipselink.jpa.testapps/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -242,23 +242,6 @@
</dependency>

<!--Test dependencies-->
<!--ASM Implementation-->
<!--Origin OW2-->
<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>junit</groupId>
<artifactId>junit</artifactId>
Expand Down Expand Up @@ -405,26 +388,6 @@
<artifactId>org.eclipse.persistence.jpa.modelgen.processor</artifactId>
<version>${project.version}</version>
</path>
<path>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>${asm.version}</version>
</path>
<path>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-commons</artifactId>
<version>${asm.version}</version>
</path>
<path>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-tree</artifactId>
<version>${asm.version}</version>
</path>
<path>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-util</artifactId>
<version>${asm.version}</version>
</path>
</annotationProcessorPaths>
<compilerArgs combine.children="append">
<arg>${comp.xlint}</arg>
Expand Down
21 changes: 0 additions & 21 deletions jpa/eclipselink.jpa.wdf.test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,27 +78,6 @@
<artifactId>jakarta.ejb-api</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>
<!--JDBC driver (test dependency)-->
<dependency>
<groupId>${db.driver.groupId}</groupId>
Expand Down
Loading

0 comments on commit f790344

Please sign in to comment.