diff --git a/0001-fix-toplink-essentials-pom.patch b/0001-fix-toplink-essentials-pom.patch index 09baf25bf02857c1a578cc4b6bd57757ddc90302..3488b6f9a94a4c6dd3c150d20030094f66f60806 100644 --- a/0001-fix-toplink-essentials-pom.patch +++ b/0001-fix-toplink-essentials-pom.patch @@ -1,51 +1,120 @@ -From 7d716ec5e533d82aaa561afd0b3602f29320b95a Mon Sep 17 00:00:00 2001 -From: wangge -Date: Mon, 31 Aug 2020 14:30:25 +0800 +Date: Tue, 20 Oct 2020 10:04:10 +0800 Subject: [PATCH] fix toplink essentials pom --- - toplink-essentials-2.0-46.pom | 31 +++++++++++++++++++++++++++++++ - 1 file changed, 31 insertions(+) + toplink-essentials-2.0-46.pom | 66 ++++++++++++++++++++++++++++- + toplink-essentials-agent-2.0-46.pom | 21 +++++++++ + 2 files changed, 85 insertions(+), 2 deletions(-) diff --git a/toplink-essentials-2.0-46.pom b/toplink-essentials-2.0-46.pom -index ce25ecb..f7999c2 100644 +index ce25ecb..e4279d0 100644 --- a/toplink-essentials-2.0-46.pom +++ b/toplink-essentials-2.0-46.pom -@@ -9,5 +9,36 @@ +@@ -2,12 +2,74 @@ + 4.0.0 + toplink.essentials + toplink-essentials +- 2.0-46 ++ 2.0.46 ++ jar ++ ++ ++ UTF-8 ++ ++ + + + javax.persistence persistence-api - 1.0b - +- 1.0b ++ 1.0.2 ++ ++ ++ ++ org.jboss.spec.javax.resource ++ jboss-connector-api_1.6_spec ++ 1.0.1.Final ++ ++ ++ ++ org.jboss.spec.javax.jms ++ jboss-jms-api_1.1_spec ++ 1.0.1.Final ++ ++ ++ ++ javax.jdo ++ jdo2-api ++ 2.2 ++ ++ ++ ++ org.jboss.spec.javax.ejb ++ jboss-ejb-api_3.1_spec ++ 1.0.2.Final ++ ++ ++ ++ org.jboss.spec.javax.transaction ++ jboss-transaction-api_1.1_spec ++ 1.0.1.Final ++ ++ ++ ++ org.apache.ant ++ ant ++ 1.9.4 ++ ++ + + antlr + antlr -+ 2.7.6 -+ ++ 2.7.7 + -+ ++ + -+ -+ -+ ${project.basedir} -+ false -+ -+ **/* -+ -+ -+ ++ ++ ++ org.apache.maven.plugins ++ maven-compiler-plugin ++ 2.0.2 ++ ++ 1.6 ++ 1.6 ++ ++ ++ ++ + +diff --git a/toplink-essentials-agent-2.0-46.pom b/toplink-essentials-agent-2.0-46.pom +index 082640c..7c0de9a 100644 +--- a/toplink-essentials-agent-2.0-46.pom ++++ b/toplink-essentials-agent-2.0-46.pom +@@ -3,4 +3,25 @@ + toplink.essentials + toplink-essentials-agent + 2.0-46 ++ jar ++ ++ ++ UTF-8 ++ + ++ + + + org.apache.maven.plugins -+ maven-javadoc-plugin -+ 3.0.1 ++ maven-compiler-plugin ++ 2.0.2 + -+ -+ -Xdoclint:none -+ -+ false ++ 1.6 ++ 1.6 + -+ ++ + ++ ++ src/main/java/oracle/toplink/essentials/internal/ejb/cmp3/ + -- diff --git a/glassfish-persistence-2.0.41-jdk7.patch b/glassfish-persistence-2.0.41-jdk7.patch new file mode 100644 index 0000000000000000000000000000000000000000..3d472879ec573d7e62c5792e4aaf83a2d095e08a --- /dev/null +++ b/glassfish-persistence-2.0.41-jdk7.patch @@ -0,0 +1,33 @@ +Date: Mon, 19 Oct 2020 14:31:46 +0800 +Subject: [PATCH] jdk7 + +--- + .../internal/ejb/cmp3/jdbc/base/DataSourceImpl.java | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/main/java/oracle/toplink/essentials/internal/ejb/cmp3/jdbc/base/DataSourceImpl.java b/src/main/java/oracle/toplink/essentials/internal/ejb/cmp3/jdbc/base/DataSourceImpl.java +index 8c7bf31..52c2bc0 100644 +--- a/src/main/java/oracle/toplink/essentials/internal/ejb/cmp3/jdbc/base/DataSourceImpl.java ++++ b/src/main/java/oracle/toplink/essentials/internal/ejb/cmp3/jdbc/base/DataSourceImpl.java +@@ -42,6 +42,8 @@ import java.sql.Connection; + import java.sql.SQLException; + import java.sql.DriverManager; + import javax.sql.DataSource; ++import java.sql.SQLFeatureNotSupportedException; ++import java.util.logging.Logger; + import oracle.toplink.essentials.internal.ejb.cmp3.transaction.base.TransactionManagerImpl; + + /** +@@ -178,4 +180,9 @@ public class DataSourceImpl implements DataSource { + public boolean isWrapperFor(Class iface) throws SQLException { + return false; + } ++ ++ public Logger getParentLogger() throws SQLFeatureNotSupportedException { ++ throw new SQLFeatureNotSupportedException("Not implemented method getParentLogger()"); ++ } ++ + } +-- +2.23.0 + diff --git a/glassfish-persistence-2.0.41-use_system_antlr.patch b/glassfish-persistence-2.0.41-use_system_antlr.patch index b2d3f6fe451456fea696873f9d9ae90b7e16c772..860769b7e7a2990f7720c1cf664ba9f64d263554 100644 --- a/glassfish-persistence-2.0.41-use_system_antlr.patch +++ b/glassfish-persistence-2.0.41-use_system_antlr.patch @@ -1,17 +1,17 @@ -From 3215adf86c255c93316e8aacb84b1fc9a465e138 Mon Sep 17 00:00:00 2001 -From: wangge Date: Mon, 31 Aug 2020 14:14:53 +0800 Subject: [PATCH] fix use system antlr --- .../internal/parsing/ejbql/EJBQLParser.java | 26 +++++++++---------- .../ejbql/antlr273/EJBQLParserBuilder.java | 2 +- - 2 files changed, 14 insertions(+), 14 deletions(-) + .../parsing/ejbql/antlr273/EJBQLLexer.java | 42 +++++++++---------- + .../parsing/ejbql/antlr273/EJBQLParser.java | 26 ++++++------ + 4 files changed, 48 insertions(+), 48 deletions(-) -diff --git a/oracle/toplink/essentials/internal/parsing/ejbql/EJBQLParser.java b/oracle/toplink/essentials/internal/parsing/ejbql/EJBQLParser.java +diff --git a/src/main/java/oracle/toplink/essentials/internal/parsing/ejbql/EJBQLParser.java b/src/main/java/oracle/toplink/essentials/internal/parsing/ejbql/EJBQLParser.java index 5faab5c..9c9cf20 100644 ---- a/oracle/toplink/essentials/internal/parsing/ejbql/EJBQLParser.java -+++ b/oracle/toplink/essentials/internal/parsing/ejbql/EJBQLParser.java +--- a/src/main/java/oracle/toplink/essentials/internal/parsing/ejbql/EJBQLParser.java ++++ b/src/main/java/oracle/toplink/essentials/internal/parsing/ejbql/EJBQLParser.java @@ -42,19 +42,19 @@ import java.util.List; import java.util.ArrayList; @@ -45,10 +45,10 @@ index 5faab5c..9c9cf20 100644 //toplink imports import oracle.toplink.essentials.exceptions.EJBQLException; -diff --git a/oracle/toplink/essentials/internal/parsing/ejbql/antlr273/EJBQLParserBuilder.java b/oracle/toplink/essentials/internal/parsing/ejbql/antlr273/EJBQLParserBuilder.java +diff --git a/src/main/java/oracle/toplink/essentials/internal/parsing/ejbql/antlr273/EJBQLParserBuilder.java b/src/main/java/oracle/toplink/essentials/internal/parsing/ejbql/antlr273/EJBQLParserBuilder.java index 9bf432a..26a3d3f 100644 ---- a/oracle/toplink/essentials/internal/parsing/ejbql/antlr273/EJBQLParserBuilder.java -+++ b/oracle/toplink/essentials/internal/parsing/ejbql/antlr273/EJBQLParserBuilder.java +--- a/src/main/java/oracle/toplink/essentials/internal/parsing/ejbql/antlr273/EJBQLParserBuilder.java ++++ b/src/main/java/oracle/toplink/essentials/internal/parsing/ejbql/antlr273/EJBQLParserBuilder.java @@ -38,7 +38,7 @@ // Copyright (c) 1998, 2007, Oracle. All rights reserved. package oracle.toplink.essentials.internal.parsing.ejbql.antlr273; @@ -58,6 +58,100 @@ index 9bf432a..26a3d3f 100644 //java imports import java.io.StringReader; +diff --git a/src/main/java/oracle/toplink/essentials/internal/parsing/ejbql/antlr273/EJBQLLexer.java b/src/main/java/oracle/toplink/essentials/internal/parsing/ejbql/antlr273/EJBQLLexer.java +index 571c3e2..a6b594a 100644 +--- a/src/main/java/oracle/toplink/essentials/internal/parsing/ejbql/antlr273/EJBQLLexer.java ++++ b/src/main/java/oracle/toplink/essentials/internal/parsing/ejbql/antlr273/EJBQLLexer.java +@@ -9,31 +9,31 @@ + import oracle.toplink.essentials.exceptions.EJBQLException; + + import java.io.InputStream; +-import persistence.antlr.TokenStreamException; +-import persistence.antlr.TokenStreamIOException; +-import persistence.antlr.TokenStreamRecognitionException; +-import persistence.antlr.CharStreamException; +-import persistence.antlr.CharStreamIOException; +-import persistence.antlr.ANTLRException; ++import antlr.TokenStreamException; ++import antlr.TokenStreamIOException; ++import antlr.TokenStreamRecognitionException; ++import antlr.CharStreamException; ++import antlr.CharStreamIOException; ++import antlr.ANTLRException; + import java.io.Reader; + import java.util.Hashtable; +-import persistence.antlr.CharScanner; +-import persistence.antlr.InputBuffer; +-import persistence.antlr.ByteBuffer; +-import persistence.antlr.CharBuffer; +-import persistence.antlr.Token; +-import persistence.antlr.CommonToken; +-import persistence.antlr.RecognitionException; +-import persistence.antlr.NoViableAltForCharException; +-import persistence.antlr.MismatchedCharException; +-import persistence.antlr.TokenStream; +-import persistence.antlr.ANTLRHashString; +-import persistence.antlr.LexerSharedInputState; +-import persistence.antlr.collections.impl.BitSet; +-import persistence.antlr.SemanticException; ++import antlr.CharScanner; ++import antlr.InputBuffer; ++import antlr.ByteBuffer; ++import antlr.CharBuffer; ++import antlr.Token; ++import antlr.CommonToken; ++import antlr.RecognitionException; ++import antlr.NoViableAltForCharException; ++import antlr.MismatchedCharException; ++import antlr.TokenStream; ++import antlr.ANTLRHashString; ++import antlr.LexerSharedInputState; ++import antlr.collections.impl.BitSet; ++import antlr.SemanticException; + + /** */ +-public class EJBQLLexer extends persistence.antlr.CharScanner implements EJBQLTokenTypes, TokenStream ++public class EJBQLLexer extends antlr.CharScanner implements EJBQLTokenTypes, TokenStream + { + public EJBQLLexer(InputStream in) { + this(new ByteBuffer(in)); +diff --git a/src/main/java/oracle/toplink/essentials/internal/parsing/ejbql/antlr273/EJBQLParser.java b/src/main/java/oracle/toplink/essentials/internal/parsing/ejbql/antlr273/EJBQLParser.java +index 9039269..0be902a 100644 +--- a/src/main/java/oracle/toplink/essentials/internal/parsing/ejbql/antlr273/EJBQLParser.java ++++ b/src/main/java/oracle/toplink/essentials/internal/parsing/ejbql/antlr273/EJBQLParser.java +@@ -8,19 +8,19 @@ + import static oracle.toplink.essentials.internal.parsing.NodeFactory.*; + import oracle.toplink.essentials.exceptions.EJBQLException; + +-import persistence.antlr.TokenBuffer; +-import persistence.antlr.TokenStreamException; +-import persistence.antlr.TokenStreamIOException; +-import persistence.antlr.ANTLRException; +-import persistence.antlr.LLkParser; +-import persistence.antlr.Token; +-import persistence.antlr.TokenStream; +-import persistence.antlr.RecognitionException; +-import persistence.antlr.NoViableAltException; +-import persistence.antlr.MismatchedTokenException; +-import persistence.antlr.SemanticException; +-import persistence.antlr.ParserSharedInputState; +-import persistence.antlr.collections.impl.BitSet; ++import antlr.TokenBuffer; ++import antlr.TokenStreamException; ++import antlr.TokenStreamIOException; ++import antlr.ANTLRException; ++import antlr.LLkParser; ++import antlr.Token; ++import antlr.TokenStream; ++import antlr.RecognitionException; ++import antlr.NoViableAltException; ++import antlr.MismatchedTokenException; ++import antlr.SemanticException; ++import antlr.ParserSharedInputState; ++import antlr.collections.impl.BitSet; + + /** */ + public class EJBQLParser extends oracle.toplink.essentials.internal.parsing.ejbql.EJBQLParser implements EJBQLTokenTypes -- 2.23.0 diff --git a/glassfish-toplink-essentials.spec b/glassfish-toplink-essentials.spec index 9026dad4247daec68e26d09f1b9ba6658f526ab0..7fc91f7a9d520002ff10e6b2ad4eb200a99b97a0 100644 --- a/glassfish-toplink-essentials.spec +++ b/glassfish-toplink-essentials.spec @@ -1,18 +1,23 @@ Name: glassfish-toplink-essentials Version: 2.0.46 -Release: 1 +Release: 2 Summary: Glassfish JPA Toplink Essentials License: CDDL or GPLv2 with exceptions URL: http://glassfish.java.net/javaee5/persistence/ Source0: https://repo1.maven.org/maven2/toplink/essentials/toplink-essentials/2.0-46/toplink-essentials-2.0-46-sources.jar -Source1: https://repo1.maven.org/maven2/toplink/essentials/toplink-essentials/2.0-46/toplink-essentials-agent-2.0-46-sources.jar -Source2: https://repo1.maven.org/maven2/toplink/essentials/toplink-essentials/2.0-46/toplink-essentials-agent-2.0-46.pom -Source3: https://repo1.maven.org/maven2/toplink/essentials/toplink-essentials/2.0-46/toplink-essentials-2.0-46.pom -Source4: https://javaee.github.io/glassfish/LICENSE +Source1: https://repo1.maven.org/maven2/toplink/essentials/toplink-essentials/2.0-46/toplink-essentials-2.0-46.pom +Source2: https://repo1.maven.org/maven2/toplink/essentials/toplink-essentials-agent/2.0-46/toplink-essentials-agent-2.0-46.pom +Source3: https://javaee.github.io/glassfish/LICENSE Patch0: 0001-fix-toplink-essentials-pom.patch -Patch1: glassfish-persistence-2.0.41-use_system_antlr.patch +Patch1: glassfish-persistence-2.0.41-jdk7.patch +Patch2: glassfish-persistence-2.0.41-use_system_antlr.patch BuildRequires: java-devel jpackage-utils javapackages-local maven-local ant antlr-tool geronimo-jta geronimo-jpa BuildRequires: mvn(org.apache.maven.plugins:maven-javadoc-plugin) +BuildRequires: mvn(org.jboss.spec.javax.resource:jboss-connector-api_1.6_spec) +BuildRequires: mvn(org.jboss.spec.javax.jms:jboss-jms-api_1.1_spec) +BuildRequires: mvn(org.jboss.spec.javax.ejb:jboss-ejb-api_3.1_spec) +BuildRequires: mvn(org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec) +BuildRequires: mvn(javax.jdo:jdo2-api) Requires: antlr-tool geronimo-jpa geronimo-jta jpackage-utils BuildArch: noarch @@ -27,32 +32,31 @@ This package contains javadoc for %{name}. %prep %setup -q -c +mkdir -p src/main/java +mv javax src/main/java +mv oracle src/main/java +mv persistence src/main/java cp %{SOURCE1} . cp %{SOURCE2} . -cp %{SOURCE3} . -cp %{SOURCE4} ./LICENSE.html -rm -rf ./persistence +cp %{SOURCE3} ./LICENSE.html %patch0 -p1 %patch1 -p1 +%patch2 -p1 cp ./toplink-essentials-2.0-46.pom ./pom.xml - +rm -rf src/main/java/persistence/antlr/ %build -mkdir -p ./src/main/javadoc -cp -r ./oracle/ ./src/main/javadoc %mvn_build -- -Dproject.build.sourceEncoding=UTF-8 -rm -rf ./javax -rm -rf ./oracle -rm -rf ./src -unzip ./toplink-essentials-agent-2.0-46-sources.jar -rm -f ./pom.xml +rm -f pom.xml +pushd src/main/java/oracle/toplink/essentials/internal/ejb/cmp3/ +ls | grep -v "JavaSECMPInitializerAgent.java" | xargs rm -rf +popd cp ./toplink-essentials-agent-2.0-46.pom ./pom.xml %mvn_build -- -Dproject.build.sourceEncoding=UTF-8 %install - mkdir -p %{buildroot}%{_javadir}/glassfish -install -m 644 target/toplink-essentials-2.0-46.jar %{buildroot}%{_javadir}/%{name}.jar +install -m 644 target/toplink-essentials-2.0.46.jar %{buildroot}%{_javadir}/%{name}.jar install -m 644 target/toplink-essentials-agent-2.0-46.jar %{buildroot}%{_javadir}/%{name}-agent.jar mkdir -p %{buildroot}%{_mavenpomdir} @@ -72,6 +76,9 @@ cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name} %license ./LICENSE.html %changelog +* Tue Oct 20 2020 Ge Wang - 2.0.46-2 +- modify compile script to solve defect of jar package + * Thu Aug 27 2020 Ge Wang - 2.0.46-1 - package init diff --git a/toplink-essentials-agent-2.0-46-sources.jar b/toplink-essentials-agent-2.0-46-sources.jar deleted file mode 100644 index 91348a61f08ca650eb89e2a046df9baa94252726..0000000000000000000000000000000000000000 Binary files a/toplink-essentials-agent-2.0-46-sources.jar and /dev/null differ