package init
This commit is contained in:
parent
70d47cb01f
commit
f3242170b6
58
openjpa-2.3.0-remove-WASRegistryManagedRuntime.patch
Normal file
58
openjpa-2.3.0-remove-WASRegistryManagedRuntime.patch
Normal file
@ -0,0 +1,58 @@
|
||||
--- openjpa-kernel/src/main/java/org/apache/openjpa/ee/AutomaticManagedRuntime.java 2013-11-11 21:09:40.000000000 +0100
|
||||
+++ openjpa-kernel/src/main/java/org/apache/openjpa/ee/AutomaticManagedRuntime.java-gil 2014-06-20 12:01:33.445611356 +0200
|
||||
@@ -78,7 +78,6 @@
|
||||
private final WLSManagedRuntime WLS;
|
||||
private final SunOneManagedRuntime SUNONE;
|
||||
private final WASManagedRuntime WAS;
|
||||
- private final WASRegistryManagedRuntime WAS_REG;
|
||||
|
||||
private static Localizer _loc = Localizer.forPackage
|
||||
(AutomaticManagedRuntime.class);
|
||||
@@ -117,26 +116,6 @@
|
||||
} catch (Throwable t) {
|
||||
}
|
||||
WAS = (WASManagedRuntime) mr;
|
||||
-
|
||||
- mr = null;
|
||||
- try {
|
||||
- // In a WebSphere environment the thread's current classloader might
|
||||
- // not have access to the WebSphere APIs. However the "runtime"
|
||||
- // classloader will have access to them.
|
||||
-
|
||||
- // Should not need a doPriv getting this class' classloader
|
||||
- ClassLoader cl = AutomaticManagedRuntime.class.getClassLoader();
|
||||
-
|
||||
- Class<WASRegistryManagedRuntime> mrClass =
|
||||
- (Class<WASRegistryManagedRuntime>) J2DoPrivHelper
|
||||
- .getForNameAction(
|
||||
- WASRegistryManagedRuntime.class.getName(),
|
||||
- true, cl).run();
|
||||
- mr = J2DoPrivHelper.newInstanceAction(mrClass).run();
|
||||
- } catch (Throwable t) {
|
||||
- // safe to ignore
|
||||
- }
|
||||
- WAS_REG = (WASRegistryManagedRuntime) mr;
|
||||
}
|
||||
|
||||
private Configuration _conf = null;
|
||||
@@ -150,20 +129,6 @@
|
||||
List<Throwable> errors = new LinkedList<Throwable>();
|
||||
TransactionManager tm = null;
|
||||
|
||||
- // Try the registry extensions first so that any applicable vendor
|
||||
- // specific extensions are used.
|
||||
- if (WAS_REG != null) {
|
||||
- try {
|
||||
- tm = WAS_REG.getTransactionManager();
|
||||
- } catch (Throwable t) {
|
||||
- errors.add(t);
|
||||
- }
|
||||
- if (tm != null) {
|
||||
- _runtime = WAS_REG;
|
||||
- return tm;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
// Then try the registry, which is the official way to obtain
|
||||
// transaction synchronication in JTA 1.1
|
||||
if (REGISTRY != null) {
|
||||
13
openjpa-2.4.1-javacc6.patch
Normal file
13
openjpa-2.4.1-javacc6.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff -Nru openjpa-parent-2.4.1/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/SimpleNode.java openjpa-parent-2.4.1.javacc/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/SimpleNode.java
|
||||
--- openjpa-parent-2.4.1/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/SimpleNode.java 2016-02-14 23:24:18.000000000 +0100
|
||||
+++ openjpa-parent-2.4.1.javacc/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/SimpleNode.java 2016-08-28 13:14:20.872696306 +0200
|
||||
@@ -30,4 +30,9 @@
|
||||
SimpleNode(JPQL parser, int id) {
|
||||
super(parser, id);
|
||||
}
|
||||
+
|
||||
+ @Override
|
||||
+ public final int getId() {
|
||||
+ throw new UnsupportedOperationException("Not implemented yet");
|
||||
+ }
|
||||
}
|
||||
BIN
openjpa-parent-2.4.1-source-release.zip
Normal file
BIN
openjpa-parent-2.4.1-source-release.zip
Normal file
Binary file not shown.
152
openjpa.spec
Normal file
152
openjpa.spec
Normal file
@ -0,0 +1,152 @@
|
||||
%global with_tests 0
|
||||
Name: openjpa
|
||||
Version: 2.4.1
|
||||
Release: 1
|
||||
Summary: Java Persistence 2.0 API
|
||||
License: ASL 2.0 and CDDL
|
||||
Url: http://openjpa.apache.org/
|
||||
Source0: http://archive.apache.org/dist/openjpa/%{version}/%{name}-parent-%{version}-source-release.zip
|
||||
Patch0: %{name}-2.3.0-remove-WASRegistryManagedRuntime.patch
|
||||
Patch1: openjpa-2.4.1-javacc6.patch
|
||||
BuildRequires: maven-local mvn(ant-contrib:ant-contrib) mvn(com.sun.xml.bind:jaxb-impl)
|
||||
BuildRequires: mvn(commons-collections:commons-collections) mvn(commons-dbcp:commons-dbcp)
|
||||
BuildRequires: mvn(commons-lang:commons-lang) mvn(commons-logging:commons-logging)
|
||||
BuildRequires: mvn(commons-pool:commons-pool) mvn(hsqldb:hsqldb:1) mvn(httpunit:httpunit)
|
||||
BuildRequires: mvn(jakarta-regexp:jakarta-regexp) mvn(javax.servlet:javax.servlet-api)
|
||||
BuildRequires: mvn(javax.xml.bind:jaxb-api) mvn(junit:junit) mvn(log4j:log4j:1.2.17)
|
||||
BuildRequires: mvn(mysql:mysql-connector-java) mvn(net.sourceforge.serp:serp)
|
||||
BuildRequires: mvn(org.apache:apache:pom:) mvn(org.apache.ant:ant)
|
||||
BuildRequires: mvn(org.apache.ant:ant-jsch) mvn(org.apache.bval:bval-core)
|
||||
BuildRequires: mvn(org.apache.bval:bval-jsr303) mvn(org.apache.commons:commons-jci-rhino)
|
||||
BuildRequires: mvn(org.apache.derby:derby) mvn(org.apache.derby:derbyclient)
|
||||
BuildRequires: mvn(org.apache.geronimo.specs:geronimo-jms_1.1_spec)
|
||||
BuildRequires: mvn(org.apache.geronimo.specs:geronimo-jta_1.1_spec)
|
||||
BuildRequires: mvn(org.apache.geronimo.specs:geronimo-validation_1.0_spec)
|
||||
BuildRequires: mvn(org.apache.geronimo.specs:specs:pom:)
|
||||
BuildRequires: mvn(org.apache.maven:maven-plugin-api) mvn(org.apache.maven:maven-project)
|
||||
BuildRequires: mvn(org.apache.maven.plugin-testing:maven-plugin-testing-harness)
|
||||
BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin)
|
||||
BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin)
|
||||
BuildRequires: mvn(org.apache.maven.plugins:maven-enforcer-plugin)
|
||||
BuildRequires: mvn(org.apache.maven.plugins:maven-plugin-plugin)
|
||||
BuildRequires: mvn(org.apache.maven.plugins:maven-remote-resources-plugin)
|
||||
BuildRequires: mvn(org.apache.maven.plugins:maven-shade-plugin)
|
||||
BuildRequires: mvn(org.apache.maven.plugins:maven-site-plugin)
|
||||
BuildRequires: mvn(org.apache.xbean:xbean-finder)
|
||||
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
|
||||
BuildRequires: mvn(org.codehaus.mojo:buildnumber-maven-plugin)
|
||||
BuildRequires: mvn(org.codehaus.mojo:javacc-maven-plugin)
|
||||
BuildRequires: mvn(org.codehaus.plexus:plexus-utils)
|
||||
BuildRequires: mvn(org.hibernate.javax.persistence:hibernate-jpa-2.0-api) mvn(org.jmock:jmock)
|
||||
BuildRequires: mvn(org.jmock:jmock-junit4) mvn(org.osgi:org.osgi.core) mvn(org.ow2.asm:asm)
|
||||
BuildRequires: mvn(org.slf4j:slf4j-api) mvn(postgresql:postgresql)
|
||||
BuildRequires: mvn(simple-jndi:simple-jndi)
|
||||
%if 0
|
||||
BuildRequires: mvn(mariadb:mariadb-connector-java)
|
||||
%endif
|
||||
BuildArch: noarch
|
||||
%description
|
||||
OpenJPA is Apache's implementation of Sun's Java Persistence 2.0 API
|
||||
(JSR-317 JPA 2.0) specification for the transparent persistence of
|
||||
Java objects.
|
||||
It is an object-relational mapping (ORM) solution for the Java language,
|
||||
which simplifies storing objects in databases.
|
||||
|
||||
%package tools
|
||||
Summary: OpenJPA tools - Maven Plugin
|
||||
%description tools
|
||||
OpenJPA tasks for enhancing, SQL creation and
|
||||
schema mapping creation using Apache maven.
|
||||
|
||||
%package javadoc
|
||||
Summary: Javadoc for %{name}
|
||||
%description javadoc
|
||||
This package contains javadoc for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-parent-%{version}
|
||||
find . -name "*.class" -delete
|
||||
find . -name "*.jar" -delete
|
||||
%patch0 -p0
|
||||
%patch1 -p1
|
||||
%pom_disable_module %{name}
|
||||
%pom_disable_module %{name}-all
|
||||
%pom_disable_module %{name}-examples
|
||||
%pom_disable_module %{name}-integration
|
||||
%pom_disable_module %{name}-project
|
||||
%pom_disable_module openbooks %{name}-examples
|
||||
%pom_remove_plugin :docbkx-maven-plugin
|
||||
%pom_remove_plugin :maven-checkstyle-plugin
|
||||
%pom_remove_plugin :findbugs-maven-plugin
|
||||
%pom_remove_plugin :ianal-maven-plugin
|
||||
%pom_remove_plugin :taglist-maven-plugin
|
||||
%pom_remove_plugin :apache-rat-plugin
|
||||
%pom_remove_dep net.sourceforge.findbugs:annotations
|
||||
%pom_xpath_remove "pom:profile[pom:id='ydoc-profile']"
|
||||
%pom_xpath_remove "pom:profile[pom:id='test-sybase-jconnect']" %{name}-persistence-jdbc
|
||||
%pom_xpath_remove "pom:profile[pom:id='test-soliddb']" %{name}-persistence-jdbc
|
||||
for p in persistence-jdbc persistence-locking; do
|
||||
%pom_xpath_remove "pom:profile[pom:id='test-custom']" %{name}-${p}
|
||||
%pom_xpath_remove "pom:profile[pom:id='test-custom2']" %{name}-${p}
|
||||
%pom_xpath_remove "pom:profile[pom:id='test-db2-jcc']" %{name}-${p}
|
||||
%pom_xpath_remove "pom:profile[pom:id='test-derbyjcc']" %{name}-${p}
|
||||
%pom_xpath_remove "pom:profile[pom:id='test-ids-jcc']" %{name}-${p}
|
||||
%pom_xpath_remove "pom:profile[pom:id='test-ids-informix']" %{name}-${p}
|
||||
%pom_xpath_remove "pom:profile[pom:id='test-ingres']" %{name}-${p}
|
||||
%pom_xpath_remove "pom:profile[pom:id='test-mssql']" %{name}-${p}
|
||||
%pom_xpath_remove "pom:profile[pom:id='test-oracle']" %{name}-${p}
|
||||
%pom_xpath_remove "pom:profile[pom:id='test-sqlserver']" %{name}-${p}
|
||||
%pom_xpath_remove "pom:profile[pom:id='test-sybase']" %{name}-${p}
|
||||
done
|
||||
%pom_change_dep -r :geronimo-jpa_2.0_spec org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.1.Final
|
||||
%pom_remove_dep com.ibm.websphere:websphere_uow_api %{name}-kernel
|
||||
rm %{name}-kernel/src/main/java/org/apache/openjpa/ee/WASRegistryManagedRuntime.java
|
||||
%pom_xpath_set "pom:dependency[pom:groupId = 'org.apache.xbean']/pom:artifactId" xbean-finder %{name}-kernel
|
||||
sed -i "s|org.apache.xbean.asm5|org.objectweb.asm|" \
|
||||
%{name}-kernel/src/main/java/org/apache/openjpa/enhance/AsmAdaptor.java
|
||||
%pom_add_dep org.ow2.asm:asm:5.0.3 %{name}-kernel
|
||||
%pom_change_dep -r :hsqldb ::1 %{name}-jdbc
|
||||
%pom_xpath_set "pom:properties/pom:hsqldb.version" 1
|
||||
%pom_change_dep -r log4j: ::1.2.17
|
||||
%pom_remove_plugin :maven-invoker-plugin %{name}-tools/%{name}-maven-plugin
|
||||
%pom_change_dep org.apache.bval: :bval-core:1.1.1
|
||||
%pom_change_dep org.apache.bval: :bval-core:1.1.1 %{name}-tools/%{name}-maven-plugin
|
||||
%pom_add_dep org.apache.bval:bval-jsr:1.1.1 %{name}-tools/%{name}-maven-plugin
|
||||
%pom_change_dep javax.servlet:servlet-api :javax.servlet-api:3.1.0 %{name}-jest
|
||||
%mvn_package ":%{name}-tools" tools
|
||||
%mvn_package ":%{name}-maven-plugin" tools
|
||||
%mvn_package ":%{name}-fetch-statistics" tools
|
||||
%mvn_package ":%{name}-fetch-statistics-was" tools
|
||||
|
||||
%build
|
||||
export MAVEN_OPTS="-Xms1024m -Xmx2048m -Xss5m"
|
||||
%mvn_build -- \
|
||||
%if %{with_tests}
|
||||
-Ptest-derby \
|
||||
%else
|
||||
-Dtest=false \
|
||||
%endif
|
||||
-DfailIfNoTests=false \
|
||||
-Dmaven.test.failure.ignore=true \
|
||||
process-resources
|
||||
|
||||
%install
|
||||
%mvn_install
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/ant.d
|
||||
echo "ant %{name}/%{name}-jdbc %{name}/%{name}-kernel %{name}/%{name}-lib" > %{name}-ant
|
||||
install -p -m 644 %{name}-ant %{buildroot}%{_sysconfdir}/ant.d/%{name}
|
||||
|
||||
%files -f .mfiles
|
||||
%config(noreplace) %{_sysconfdir}/ant.d/%{name}
|
||||
%doc README.txt
|
||||
%license LICENSE NOTICE
|
||||
|
||||
%files tools -f .mfiles-tools
|
||||
%license LICENSE NOTICE
|
||||
|
||||
%files javadoc -f .mfiles-javadoc
|
||||
%license LICENSE NOTICE
|
||||
|
||||
%changelog
|
||||
* Wed Aug 19 2020 zhanghua <zhanghua40@huawei.com> - 2.4.1-1
|
||||
- Package init
|
||||
4
openjpa.yaml
Normal file
4
openjpa.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
version_control: github
|
||||
src_repo: apache/openjpa
|
||||
tag_prefix: "^"
|
||||
seperator: "."
|
||||
Loading…
x
Reference in New Issue
Block a user