[openjpa] 02/02: Prepare 2.2.2-1 release
Miguel Landaeta
nomadium-guest at alioth.debian.org
Sun Sep 1 22:21:19 UTC 2013
This is an automated email from the git hooks/post-receive script.
nomadium-guest pushed a commit to branch maven-build
in repository openjpa.
commit 26ea17979866356ca4eaf77a50069bc2595fc6eb
Author: Miguel Landaeta <miguel at miguel.cc>
Date: Sun Sep 1 18:53:09 2013 -0300
Prepare 2.2.2-1 release
This is a working in process:
[ Miguel Landaeta ]
* New upstream release. (Closes: #716937).
This release includes a fix for security issue CVE-2013-1768
that allowed remote attackers to execute arbitrary code.
* Switch build system from Ant to Maven since that was upstream use.
Several Maven plugins and libraries were added to dependency lists.
* Bump Standards-Version to 3.9.4. No changes were required.
* Added Stephen Nelson to Uploaders list.
* Drop java7-compat.diff patch, it's not needed anymore.
[ Stephen Nelson ]
* Fix FTBFS cause by libhsqldb-java API changes. (Closes: #706176).
---
debian/build.properties | 9 -
debian/build.xml | 128 -----------
debian/changelog | 17 ++
debian/classpath-debian | 13 --
debian/clean | 11 -
debian/control | 11 +-
debian/excludesfiles/build | 3 -
debian/excludesfiles/javadoc | 3 -
debian/libopenjpa-java.classpath | 1 -
debian/libopenjpa-java.jlibs | 1 -
debian/libopenjpa-java.poms | 55 +++++
debian/maven.cleanIgnoreRules | 1 +
debian/maven.ignoreRules | 11 +
debian/maven.properties | 3 +
debian/maven.publishedRules | 1 +
debian/maven.rules | 28 +++
.../706176_hsql-upstream-fix-2390-2391.diff | 85 +++++++
debian/patches/exclude-was-uow.diff | 54 +++++
debian/patches/fix_poms.diff | 242 ++++++++++++++++++++
debian/patches/java7-compat.diff | 15 --
debian/patches/series | 4 +-
debian/rules | 24 +-
22 files changed, 513 insertions(+), 207 deletions(-)
diff --git a/debian/build.properties b/debian/build.properties
deleted file mode 100644
index ee91d4c..0000000
--- a/debian/build.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-debug=on
-target=1.6
-source=1.5
-
-dir.javacchome=/usr/share/java
-dir.debian=${basedir}
-dir.src=${basedir}/..
-dir.src.manual=${dir.src}/openjpa-project/src/doc/manual
-dir.build=${basedir}/../target
diff --git a/debian/build.xml b/debian/build.xml
deleted file mode 100644
index d9d981a..0000000
--- a/debian/build.xml
+++ /dev/null
@@ -1,128 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="build-openjpa" default="package">
- <property file="build.properties"/>
-
- <path id="classpath">
- <fileset dir="/" includesfile="classpath-debian"/>
- <pathelement location="${dir.build}/classes/"/>
- </path>
-
- <target name="init">
- <mkdir dir="${dir.build}/classes"/>
- </target>
-
- <target name="clean">
- <delete dir="${dir.build}"/>
- </target>
-
- <target name="compile" depends="init">
- <jjtree target="${dir.src}/openjpa-kernel/src/main/jjtree/org/apache/openjpa/kernel/jpql/JPQL.jjt"
- outputdirectory="${dir.src}/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql"
- javacchome="${dir.javacchome}"
- />
- <javacc
- target="${dir.src}/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/JPQL.jj"
- outputdirectory="${dir.src}/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql"
- javacchome="${dir.javacchome}"
- />
- <javac
- srcdir="${dir.src}"
- destdir="${dir.build}/classes"
- classpathref="classpath"
- debug="${debug}"
- source="${source}"
- target="${target}"
- excludesfile="${dir.debian}/excludesfiles/build">
- <include name="openjpa-kernel/src/main/**"/>
- <include name="openjpa-lib/src/main/java/**"/>
- <include name="openjpa-persistence/src/main/java/**"/>
- <include name="openjpa-jdbc/src/main/java/**"/>
- <include name="openjpa-persistence-jdbc/src/main/java/**"/>
- <include name="openjpa-slice/src/main/java/**"/>
- <include name="openjpa-xmlstore/src/main/java/**"/>
- </javac>
- <java
- classname="org.apache.openjpa.util.ProxyManagerImpl"
- classpathref="classpath">
- <arg line="-utils 5"/>
- </java>
- </target>
-
- <target name="jar" depends="compile">
- <jar
- destfile="${dir.build}/openjpa.jar"
- basedir="${dir.build}/classes"
- includes="org/apache/**">
- <fileset dir="${dir.src}/openjpa-kernel/src/main/resources">
- <include name="**/*.properties"/>
- <include name="**/antlib.xml"/>
- </fileset>
- <fileset dir="${dir.src}/openjpa-persistence/src/main/resources">
- <include name="**/*.properties"/>
- <include name="**/*.rsrc"/>
- </fileset>
- <fileset dir="${dir.src}/openjpa-jdbc/src/main/resources">
- <include name="**/*.properties"/>
- <include name="**/*.rsrc"/>
- <include name="**/antlib.xml"/>
- <include name="**/sql-error-state-codes.xml"/>
- </fileset>
- <fileset dir="${dir.src}/openjpa-lib/src/main/resources" includes="**/*.properties"/>
- <fileset dir="${dir.src}/openjpa-persistence-jdbc/src/main/resources" includes="**/*.properties"/>
- <fileset dir="${dir.src}/openjpa-slice/src/main/resources" includes="**/*.properties"/>
- <service type="org.apache.openjpa.kernel.exps.ExpressionParser">
- <provider classname="org.apache.openjpa.kernel.jpql.JPQLParser"/>
- <provider classname="org.apache.openjpa.persistence.criteria.CriteriaBuilderImpl"/>
- </service>
- <service type="javax.annotation.processing.Processor"
- provider="org.apache.openjpa.persistence.meta.AnnotationProcessor6"/>
- <service type="javax.persistence.spi.PersistenceProvider"
- provider="org.apache.openjpa.persistence.PersistenceProviderImpl"/>
- <service type="org.apache.openjpa.lib.conf.ProductDerivation">
- <provider classname="org.apache.openjpa.jdbc.conf.JDBCProductDerivation"/>
- <provider classname="org.apache.openjpa.lib.conf.test.ConfigurationTestProductDerivation"/>
- <provider classname="org.apache.openjpa.persistence.jdbc.JDBCPersistenceProductDerivation"/>
- <provider classname="org.apache.openjpa.persistence.PersistenceProductDerivation"/>
- <provider classname="org.apache.openjpa.slice.ProductDerivation"/>
- </service>
- </jar>
- </target>
-
- <target name="javadoc" depends="init">
- <mkdir dir="${dir.build}/api"/>
- <javadoc destdir="${dir.build}/api" classpathref="classpath">
- <packageset dir="${dir.src}/openjpa-kernel/src/main/java"
- excludesfile="${dir.debian}/excludesfiles/javadoc"/>
- <packageset dir="${dir.src}/openjpa-lib/src/main/java"/>
- <packageset dir="${dir.src}/openjpa-persistence/src/main/java"/>
- <packageset dir="${dir.src}/openjpa-jdbc/src/main/java"/>
- <packageset dir="${dir.src}/openjpa-persistence-jdbc/src/main/java"/>
- <packageset dir="${dir.src}/openjpa-slice/src/main/java"/>
- <packageset dir="${dir.src}/openjpa-xmlstore/src/main/java"/>
- </javadoc>
- </target>
-
- <target name="manual">
- <exec executable="xmlto">
- <arg line="-o ${dir.build}/doc/html --skip-validation xhtml ${dir.src.manual}/manual.xml"/>
- </exec>
- <copy todir="${dir.build}/doc/html">
- <fileset dir="${dir.src.manual}">
- <include name="img/*.png"/>
- <include name="css/*"/>
- </fileset>
- </copy>
- <exec executable="xmlto">
- <arg line="-o ${dir.build}/doc/html-single --skip-validation xhtml-nochunks ${dir.src.manual}/manual.xml"/>
- </exec>
- <copy todir="../target/doc/html-single">
- <fileset dir="${dir.src.manual}">
- <include name="img/*.png"/>
- <include name="css/*"/>
- </fileset>
- </copy>
- </target>
-
- <target name="package" depends="jar,javadoc,manual"/>
-
-</project>
diff --git a/debian/changelog b/debian/changelog
index a590e0c..707ec8f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,20 @@
+openjpa (2.2.2-1) UNRELEASED; urgency=low
+
+ [ Miguel Landaeta ]
+ * New upstream release. (Closes: #716937).
+ This release includes a fix for security issue CVE-2013-1768
+ that allowed remote attackers to execute arbitrary code.
+ * Switch build system from Ant to Maven since that was upstream use.
+ Several Maven plugins and libraries were added to dependency lists.
+ * Bump Standards-Version to 3.9.4. No changes were required.
+ * Added Stephen Nelson to Uploaders list.
+ * Drop java7-compat.diff patch, it's not needed anymore.
+
+ [ Stephen Nelson ]
+ * Fix FTBFS cause by libhsqldb-java API changes. (Closes: #706176).
+
+ -- Miguel Landaeta <miguel at miguel.cc> Sun, 01 Sep 2013 18:16:39 -0300
+
openjpa (2.0.1-1) unstable; urgency=low
[ Miguel Landaeta ]
diff --git a/debian/classpath-debian b/debian/classpath-debian
deleted file mode 100644
index f9fe6c7..0000000
--- a/debian/classpath-debian
+++ /dev/null
@@ -1,13 +0,0 @@
-usr/share/java/commons-lang.jar
-usr/share/java/commons-collections3.jar
-usr/share/java/glassfish-javaee.jar
-usr/share/java/postgresql.jar
-usr/share/java/hsqldb.jar
-usr/share/java/commons-pool.jar
-usr/share/java/log4j-1.2.jar
-usr/share/java/commons-logging.jar
-usr/share/java/aspectjtools.jar
-usr/share/java/serp.jar
-usr/share/java/geronimo-validation.jar
-usr/share/java/geronimo-jpa-2.0-spec.jar
-usr/share/java/ant.jar
diff --git a/debian/clean b/debian/clean
deleted file mode 100644
index 60cd59e..0000000
--- a/debian/clean
+++ /dev/null
@@ -1,11 +0,0 @@
-openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/JJTJPQLState.java
-openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/JPQL.java
-openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/JPQL.jj
-openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/JPQLConstants.java
-openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/JPQLTokenManager.java
-openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/JPQLTreeConstants.java
-openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/JavaCharStream.java
-openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/Node.java
-openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/ParseException.java
-openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/Token.java
-openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/TokenMgrError.java
diff --git a/debian/control b/debian/control
index a090363..01c5626 100644
--- a/debian/control
+++ b/debian/control
@@ -1,6 +1,7 @@
Source: openjpa
Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
-Uploaders: Miguel Landaeta <miguel at miguel.cc>
+Uploaders: Miguel Landaeta <miguel at miguel.cc>,
+ Stephen Nelson <stephen at eccostudio.com>
DM-Upload-Allowed: yes
Section: java
Priority: optional
@@ -9,8 +10,12 @@ Build-Depends: debhelper (>= 7.0.50), default-jdk, javahelper, ant, javacc,
glassfish-javaee, libpostgresql-jdbc-java, libhsqldb-java,
libcommons-pool-java, liblog4j1.2-java, libcommons-logging-java, aspectj,
libserp-java, libgeronimo-validation-1.0-spec-java,
- libgeronimo-jpa-2.0-spec-java, xmlto
-Standards-Version: 3.9.3
+ libgeronimo-jpa-2.0-spec-java, xmlto, libmaven-antrun-plugin-java,
+ libjavacc-maven-plugin-java, libmaven-dependency-plugin-java,
+ libgeronimo-jms-1.1-spec-java, libmaven-enforcer-plugin-java,
+ libderby-java, libmaven-javadoc-plugin-java, libhttpunit-java,
+ libcommons-jci-rhino-java
+Standards-Version: 3.9.4
Homepage: http://openjpa.apache.org/
Vcs-Git: git://git.debian.org/git/pkg-java/openjpa.git
Vcs-Browser: http://git.debian.org/?p=pkg-java/openjpa.git
diff --git a/debian/excludesfiles/build b/debian/excludesfiles/build
deleted file mode 100644
index d45d4e5..0000000
--- a/debian/excludesfiles/build
+++ /dev/null
@@ -1,3 +0,0 @@
-openjpa-kernel/src/main/java/org/apache/openjpa/kernel/jpql/ParseException.java
-openjpa-kernel/src/main/java/org/apache/openjpa/ee/WASRegistryManagedRuntime.java
-openjpa-kernel/src/main/java/org/apache/openjpa/ee/AutomaticManagedRuntime.java
diff --git a/debian/excludesfiles/javadoc b/debian/excludesfiles/javadoc
deleted file mode 100644
index 8743573..0000000
--- a/debian/excludesfiles/javadoc
+++ /dev/null
@@ -1,3 +0,0 @@
-org/apache/openjpa/kernel/jpql/ParseException.java
-org/apache/openjpa/ee/WASRegistryManagedRuntime.java
-org/apache/openjpa/ee/AutomaticManagedRuntime.java
diff --git a/debian/libopenjpa-java.classpath b/debian/libopenjpa-java.classpath
deleted file mode 100644
index 788eaf0..0000000
--- a/debian/libopenjpa-java.classpath
+++ /dev/null
@@ -1 +0,0 @@
-target/openjpa.jar /usr/share/java/commons-lang.jar /usr/share/java/commons-collections3.jar /usr/share/java/glassfish-javaee.jar /usr/share/java/postgresql.jar /usr/share/java/hsqldb.jar /usr/share/java/commons-pool.jar /usr/share/java/log4j-1.2.jar /usr/share/java/commons-logging.jar /usr/share/java/aspectjtools.jar /usr/share/java/serp.jar /usr/share/java/geronimo-validation.jar /usr/share/java/geronimo-jpa-2.0-spec.jar
diff --git a/debian/libopenjpa-java.jlibs b/debian/libopenjpa-java.jlibs
deleted file mode 100644
index 028249e..0000000
--- a/debian/libopenjpa-java.jlibs
+++ /dev/null
@@ -1 +0,0 @@
-target/openjpa.jar
diff --git a/debian/libopenjpa-java.poms b/debian/libopenjpa-java.poms
new file mode 100644
index 0000000..bc8e4c1
--- /dev/null
+++ b/debian/libopenjpa-java.poms
@@ -0,0 +1,55 @@
+# List of POM files for the package
+# Format of this file is:
+# <path to pom file> [option]*
+# where option can be:
+# --ignore: ignore this POM and its artifact if any
+# --ignore-pom: don't install the POM. To use on POM files that are created
+# temporarily for certain artifacts such as Javadoc jars. [mh_install, mh_installpoms]
+# --no-parent: remove the <parent> tag from the POM
+# --package=<package>: an alternative package to use when installing this POM
+# and its artifact
+# --has-package-version: to indicate that the original version of the POM is the same as the upstream part
+# of the version for the package.
+# --keep-elements=<elem1,elem2>: a list of XML elements to keep in the POM
+# during a clean operation with mh_cleanpom or mh_installpom
+# --artifact=<path>: path to the build artifact associated with this POM,
+# it will be installed when using the command mh_install. [mh_install]
+# --java-lib: install the jar into /usr/share/java to comply with Debian
+# packaging guidelines
+# --usj-name=<name>: name to use when installing the library in /usr/share/java
+# --usj-version=<version>: version to use when installing the library in /usr/share/java
+# --no-usj-versionless: don't install the versionless link in /usr/share/java
+# --dest-jar=<path>: the destination for the real jar.
+# It will be installed with mh_install. [mh_install]
+# --classifier=<classifier>: Optional, the classifier for the jar. Empty by default.
+# --site-xml=<location>: Optional, the location for site.xml if it needs to be installed.
+# Empty by default. [mh_install]
+#
+pom.xml --no-parent
+openjpa-lib/pom.xml --has-package-version --java-lib --no-parent
+openjpa-kernel/pom.xml --has-package-version --java-lib --no-parent
+openjpa-jdbc/pom.xml --has-package-version --java-lib --no-parent
+openjpa-persistence/pom.xml --has-package-version --java-lib --no-parent
+openjpa-persistence-jdbc/pom.xml --has-package-version --java-lib --no-parent
+openjpa-persistence-locking/pom.xml --ignore
+openjpa-xmlstore/pom.xml --has-package-version --java-lib --no-parent
+openjpa-slice/pom.xml --has-package-version --java-lib --no-parent
+openjpa-jest/pom.xml --has-package-version --java-lib --no-parent
+# TO-DO: fix issue with openjpa-jest build and enable openjpa bundle
+# because it is needed by libspring-java
+openjpa/pom.xml --has-package-version --java-lib --no-parent --ignore
+openjpa-project/pom.xml --ignore
+openjpa-examples/pom.xml --ignore
+openjpa-examples/simple/pom.xml --ignore
+openjpa-examples/image-gallery/pom.xml --ignore
+openjpa-examples/openbooks/pom.xml --ignore
+openjpa-integration/pom.xml --ignore
+openjpa-integration/daytrader/pom.xml --ignore
+openjpa-integration/examples/pom.xml --ignore
+openjpa-integration/slf4j/pom.xml --ignore
+openjpa-integration/tck/pom.xml --ignore
+openjpa-integration/validation/pom.xml --ignore
+openjpa-integration/jmx/pom.xml --ignore
+openjpa-all/pom.xml --ignore
+openjpa-tools/pom.xml --ignore
+openjpa-tools/openjpa-maven-plugin/pom.xml --ignore
diff --git a/debian/maven.cleanIgnoreRules b/debian/maven.cleanIgnoreRules
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/debian/maven.cleanIgnoreRules
@@ -0,0 +1 @@
+
diff --git a/debian/maven.ignoreRules b/debian/maven.ignoreRules
new file mode 100644
index 0000000..8c6543f
--- /dev/null
+++ b/debian/maven.ignoreRules
@@ -0,0 +1,11 @@
+com.ibm.websphere websphere_uow_api * * * *
+javax.xml.bind * * * * *
+com.sun.xml.bind * * * * *
+simple-jndi simple-jndi * * * *
+org.apache.openjpa openjpa-maven-plugin * * * *
+org.apache.openjpa openjpa-persistence-jdbc * * * *
+org.codehaus.mojo ianal-maven-plugin * * * *
+org.codehaus.mojo buildnumber-maven-plugin * * * *
+org.apache.maven.plugins maven-checkstyle-plugin * * * *
+org.apache.rat apache-rat-plugin * * * *
+org.apache.maven.plugins maven-source-plugin * * * *
diff --git a/debian/maven.properties b/debian/maven.properties
new file mode 100644
index 0000000..f11c643
--- /dev/null
+++ b/debian/maven.properties
@@ -0,0 +1,3 @@
+maven.test.skip=true
+maven.compiler.source=1.5
+maven.compiler.target=1.6
diff --git a/debian/maven.publishedRules b/debian/maven.publishedRules
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/debian/maven.publishedRules
@@ -0,0 +1 @@
+
diff --git a/debian/maven.rules b/debian/maven.rules
new file mode 100644
index 0000000..bc565bb
--- /dev/null
+++ b/debian/maven.rules
@@ -0,0 +1,28 @@
+
+commons-beanutils commons-beanutils jar s/.*/debian/ * *
+commons-collections commons-collections jar s/3\..*/3.x/ * *
+commons-dbcp commons-dbcp jar s/.*/debian/ * *
+junit junit jar s/3\..*/3.x/ * *
+net.sourceforge.serp serp jar s/.*/debian/ * *
+org.apache.maven apache-maven pom s/.*/3.0.4/ * *
+org.apache.maven maven-aether-provider jar s/.*/3.0.4/ * *
+org.apache.maven maven-artifact jar s/.*/3.0.4/ * *
+org.apache.maven maven-compat jar s/.*/3.0.4/ * *
+org.apache.maven maven-core jar s/.*/3.0.4/ * *
+org.apache.maven maven-embedder jar s/.*/3.0.4/ * *
+org.apache.maven maven-model-builder jar s/.*/3.0.4/ * *
+org.apache.maven maven-model jar s/.*/3.0.4/ * *
+org.apache.maven maven-plugin-api jar s/.*/3.0.4/ * *
+org.apache.maven maven pom s/.*/3.0.4/ * *
+s/regexp/jakarta-regexp/ s/regexp/jakarta-regexp/ jar s/.*/debian/ * *
+commons-logging s/commons-logging-api/commons-logging/ * s/.*/debian/ * *
+s/hsqldb/org.hsqldb/ hsqldb * s/.*/debian/ * *
+log4j log4j * s/1\.2\..*/1.2.x/ * *
+s/ant/org.apache.ant/ * * s/.*/debian/ * *
+s/org.apache.tomcat/javax.el/ el-api jar s/.*/2.1/ * *
+s/org.apache.tomcat/javax.servlet/ jsp-api jar s/.*/2.1/ * *
+s/org.apache.tomcat/javax.servlet/ servlet-api jar s/.*/2.5/ * *
+s/org.apache.felix/org.osgi/ org.osgi.core * * * *
+s/org.jmock/jmock/ jmock* jar s/2\..*/2.x/ * *
+asm asm jar s/.*/3.x/ * *
+postgresql postgresql jar s/.*/9.2.jdbc3/ * *
diff --git a/debian/patches/706176_hsql-upstream-fix-2390-2391.diff b/debian/patches/706176_hsql-upstream-fix-2390-2391.diff
new file mode 100644
index 0000000..834b348
--- /dev/null
+++ b/debian/patches/706176_hsql-upstream-fix-2390-2391.diff
@@ -0,0 +1,85 @@
+Description: Upstream fix for libhsqldb-java 2.2.x API change
+Origin: upstream
+Bug-Debian: http://bugs.debian.org/706176
+Forwarded: no
+Last-Update: 2013-09-01
+
+--- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/HSQLDictionary.java
++++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/HSQLDictionary.java
+@@ -18,6 +18,7 @@
+ */
+ package org.apache.openjpa.jdbc.sql;
+
++import java.lang.reflect.Field;
+ import java.math.BigDecimal;
+ import java.sql.Connection;
+ import java.sql.DatabaseMetaData;
+@@ -27,7 +28,6 @@
+ import java.util.Arrays;
+
+ import org.apache.commons.lang.StringUtils;
+-import org.hsqldb.Trace;
+ import org.apache.openjpa.jdbc.identifier.DBIdentifier;
+ import org.apache.openjpa.jdbc.kernel.exps.FilterValue;
+ import org.apache.openjpa.jdbc.schema.Column;
+@@ -50,6 +50,8 @@
+ public boolean cacheTables = false;
+
+ private int dbMajorVersion;
++ private int dbMinorVersion;
++ private int violation_of_unique_index_or_constraint;
+
+ private SQLBuffer _oneBuffer = new SQLBuffer(this).append("1");
+
+@@ -114,6 +116,28 @@
+ // but doesn't support it for columns references ("schema.table.column")
+ useSchemaName = false;
+ }
++ if (dbMajorVersion > 1 && dbMinorVersion > 0) {
++ nextSequenceQuery += " LIMIT 1";
++ }
++ String packageName;
++ String fieldName;
++ if (dbMajorVersion > 1) {
++ // default value for "X_23505"
++ violation_of_unique_index_or_constraint = 104;
++ packageName = "org.hsqldb.error.ErrorCode";
++ fieldName = "X_23505";
++ } else {
++ // default value for "VIOLATION_OF_UNIQUE_INDEX"
++ violation_of_unique_index_or_constraint = 9;
++ packageName = "org.hsqldb.Trace";
++ fieldName = "VIOLATION_OF_UNIQUE_INDEX";
++ }
++ try {
++ Class<?> cls = Class.forName(packageName);
++ Field fld = cls.getField(fieldName);
++ violation_of_unique_index_or_constraint = fld.getInt(null);
++ } catch (Exception e) {
++ }
+ }
+
+ /**
+@@ -126,11 +150,13 @@
+
+ if (isJDBC3) {
+ dbMajorVersion = metaData.getDatabaseMajorVersion();
++ dbMinorVersion = metaData.getDatabaseMinorVersion();
+ } else {
+ // String is like "2.0.0"
+ String productVersion = metaData.getDatabaseProductVersion();
+ String[] version = productVersion.split("\\.") ;
+ dbMajorVersion = Integer.parseInt(version[0]) ;
++ dbMinorVersion = Integer.parseInt(version[1]);
+ }
+ }
+
+@@ -375,7 +401,7 @@
+ Object failed) {
+ OpenJPAException ke = super.newStoreException(msg, causes, failed);
+ if (ke instanceof ReferentialIntegrityException
+- && causes[0].getErrorCode() == -Trace.VIOLATION_OF_UNIQUE_INDEX) {
++ && causes[0].getErrorCode() == -violation_of_unique_index_or_constraint) {
+ ((ReferentialIntegrityException) ke).setIntegrityViolation
+ (ReferentialIntegrityException.IV_UNIQUE);
+ }
diff --git a/debian/patches/exclude-was-uow.diff b/debian/patches/exclude-was-uow.diff
new file mode 100644
index 0000000..25ee4b5
--- /dev/null
+++ b/debian/patches/exclude-was-uow.diff
@@ -0,0 +1,54 @@
+--- a/openjpa-kernel/src/main/java/org/apache/openjpa/ee/WASRegistryManagedRuntime.java
++++ b/openjpa-kernel/src/main/java/org/apache/openjpa/ee/WASRegistryManagedRuntime.java
+@@ -18,12 +18,6 @@
+ */
+ package org.apache.openjpa.ee;
+
+-import com.ibm.wsspi.uow.UOWAction;
+-import com.ibm.wsspi.uow.UOWActionException;
+-import com.ibm.wsspi.uow.UOWException;
+-import com.ibm.wsspi.uow.UOWManager;
+-import com.ibm.wsspi.uow.UOWManagerFactory;
+-
+ /**
+ * WASRegistryManagedRuntime provides WebSphere specific extensions to
+ * {@link RegistryManagedRuntime}. Currently these extensions consist of using
+@@ -38,37 +32,7 @@
+ */
+ public void doNonTransactionalWork(Runnable runnable)
+ throws RuntimeException, UnsupportedOperationException {
+- try {
+- UOWManagerFactory.getUOWManager().runUnderUOW(
+- UOWManager.UOW_TYPE_LOCAL_TRANSACTION, false,
+- new DelegatingUOWAction(runnable));
+- }
+- catch(UOWActionException e ) {
+- RuntimeException re = new RuntimeException(e.getMessage());
+- re.initCause(e);
+- throw re;
+- }
+- catch(UOWException e ) {
+- RuntimeException re = new RuntimeException(e.getMessage());
+- re.initCause(e);
+- throw re;
+- }
++ throw new RuntimeException("Not implemented");
+ }
+
+-
+- /**
+- * Delegate for the WebSphere proprietary UOWAction interface. Enables a
+- * {@link Runnable} to be passed in to the WebSphere UOWManager.
+- */
+- class DelegatingUOWAction implements UOWAction {
+- Runnable _del;
+-
+- public DelegatingUOWAction(Runnable delegate) {
+- _del = delegate;
+- }
+-
+- public void run() throws Exception {
+- _del.run();
+- }
+- }
+ }
diff --git a/debian/patches/fix_poms.diff b/debian/patches/fix_poms.diff
new file mode 100644
index 0000000..deb4254
--- /dev/null
+++ b/debian/patches/fix_poms.diff
@@ -0,0 +1,242 @@
+Description: Modify dependencies list to allow modules to build with Debian maven repo
+Author: Miguel Landaeta <miguel at miguel.cc>
+Forwarded: no
+Last-Update: 2013-09-01
+
+--- openjpa-2.2.2.orig/openjpa-lib/pom.xml
++++ openjpa-2.2.2/openjpa-lib/pom.xml
+@@ -41,43 +41,52 @@
+ <groupId>jakarta-regexp</groupId>
+ <artifactId>jakarta-regexp</artifactId>
+ <scope>test</scope>
++ <version>debian</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <scope>provided</scope>
++ <version>debian</version>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <scope>provided</scope>
++ <version>1.2.x</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <scope>provided</scope>
++ <version>debian</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
++ <version>debian</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant</artifactId>
+ <scope>provided</scope>
++ <version>debian</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
++ <version>3.x</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sourceforge.serp</groupId>
+ <artifactId>serp</artifactId>
++ <version>debian</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-validation_1.0_spec</artifactId>
+ <scope>provided</scope>
++ <version>debian</version>
+ </dependency>
+ </dependencies>
+
+--- openjpa-2.2.2.orig/openjpa-kernel/pom.xml
++++ openjpa-2.2.2/openjpa-kernel/pom.xml
+@@ -45,14 +45,17 @@
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jms_1.1_spec</artifactId>
++ <version>debian</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jta_1.1_spec</artifactId>
++ <version>debian</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-pool</groupId>
+ <artifactId>commons-pool</artifactId>
++ <version>debian</version>
+ </dependency>
+ <dependency>
+ <groupId>com.ibm.websphere</groupId>
+@@ -64,6 +67,7 @@
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant</artifactId>
+ <scope>provided</scope>
++ <version>debian</version>
+ </dependency>
+ <!-- for osgi ManagedRuntime implementation, -->
+ <!-- we pull in OSGi core at the same level as Apache Aries -->
+--- openjpa-2.2.2.orig/openjpa-jdbc/pom.xml
++++ openjpa-2.2.2/openjpa-jdbc/pom.xml
+@@ -47,42 +47,50 @@
+ <artifactId>jaxb-api</artifactId>
+ <scope>compile</scope>
+ <optional>true</optional>
++ <version>debian</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.xml.bind</groupId>
+ <artifactId>jaxb-impl</artifactId>
+ <scope>compile</scope>
+ <optional>true</optional>
++ <version>debian</version>
+ </dependency>
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <scope>provided</scope>
++ <version>debian</version>
+ </dependency>
+ <dependency>
+ <groupId>postgresql</groupId>
+ <artifactId>postgresql</artifactId>
+ <scope>provided</scope>
++ <version>9.2.jdbc3</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-dbcp</groupId>
+ <artifactId>commons-dbcp</artifactId>
+ <scope>provided</scope>
++ <version>debian</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant</artifactId>
+ <scope>provided</scope>
++ <version>debian</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jmock</groupId>
+ <artifactId>jmock</artifactId>
+ <scope>test</scope>
++ <version>2.x</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jmock</groupId>
+ <artifactId>jmock-junit3</artifactId>
+ <scope>test</scope>
++ <version>2.x</version>
+ </dependency>
+ </dependencies>
+ </project>
+--- openjpa-2.2.2.orig/openjpa-persistence/pom.xml
++++ openjpa-2.2.2/openjpa-persistence/pom.xml
+@@ -45,11 +45,13 @@
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jpa_2.0_spec</artifactId>
++ <version>debian</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-validation_1.0_spec</artifactId>
+ <scope>provided</scope>
++ <version>debian</version>
+ </dependency>
+ <!-- for osgi bundle activator code, use same level as Apache Aries -->
+ <dependency>
+--- openjpa-2.2.2.orig/openjpa-persistence-jdbc/pom.xml
++++ openjpa-2.2.2/openjpa-persistence-jdbc/pom.xml
+@@ -826,22 +826,26 @@
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <scope>test</scope>
++ <version>3.x</version>
+ </dependency>
+ <dependency>
+ <groupId>jakarta-regexp</groupId>
+ <artifactId>jakarta-regexp</artifactId>
+ <scope>test</scope>
++ <version>debian</version>
+ </dependency>
+ <!-- Required for org.apache.openjpa.persistence.xmlmapping tests -->
+ <dependency>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ <scope>test</scope>
++ <version>debian</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.xml.bind</groupId>
+ <artifactId>jaxb-impl</artifactId>
+ <scope>test</scope>
++ <version>debian</version>
+ </dependency>
+ <dependency>
+ <groupId>simple-jndi</groupId>
+--- openjpa-2.2.2.orig/openjpa-slice/pom.xml
++++ openjpa-2.2.2/openjpa-slice/pom.xml
+@@ -51,6 +51,7 @@
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jpa_2.0_spec</artifactId>
+ <scope>test</scope>
++ <version>debian</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.openjpa</groupId>
+--- openjpa-2.2.2.orig/openjpa/pom.xml
++++ openjpa-2.2.2/openjpa/pom.xml
+@@ -58,6 +58,7 @@
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
++ <version>1.2.1</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+@@ -103,6 +103,7 @@
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
++ <version>2.3.5</version>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+--- openjpa-2.2.2.orig/openjpa-jest/pom.xml
++++ openjpa-2.2.2/openjpa-jest/pom.xml
+@@ -45,6 +45,7 @@
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jpa_2.0_spec</artifactId>
++ <version>debian</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.openjpa</groupId>
+--- openjpa-2.2.2.orig/openjpa-xmlstore/pom.xml
++++ openjpa-2.2.2/openjpa-xmlstore/pom.xml
+@@ -60,6 +60,7 @@
+ <build>
+ <plugins>
+ <!-- Extract the common test support files from o-p-j-tests.jar -->
++ <!--
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+@@ -85,6 +86,7 @@
+ </execution>
+ </executions>
+ </plugin>
++ -->
+
+ <!-- new way of using openjpa-maven-plugin to enhance classes -->
+ <plugin>
diff --git a/debian/patches/java7-compat.diff b/debian/patches/java7-compat.diff
deleted file mode 100644
index b43cb79..0000000
--- a/debian/patches/java7-compat.diff
+++ /dev/null
@@ -1,15 +0,0 @@
-Description: FTBFS with Java7 as default-java due to an API change in Java's SQL libraries
-Author: Miguel Landaeta <miguel at miguel.cc>
-Forwarded: no
-Last-Update: 2012-06-25
-
---- openjpa-2.0.0.orig/openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedDataSource.java
-+++ openjpa-2.0.0/openjpa-slice/src/main/java/org/apache/openjpa/slice/jdbc/DistributedDataSource.java
-@@ -112,4 +112,7 @@ public class DistributedDataSource exten
-
- }
-
-+ public java.util.logging.Logger getParentLogger() throws java.sql.SQLFeatureNotSupportedException {
-+ throw new UnsupportedOperationException("getParentLogger");
-+ }
- }
diff --git a/debian/patches/series b/debian/patches/series
index 70a6c86..3629d80 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,3 @@
-java7-compat.diff
+706176_hsql-upstream-fix-2390-2391.diff
+fix_poms.diff
+exclude-was-uow.diff
diff --git a/debian/rules b/debian/rules
index 8d75f23..92d3665 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,24 +1,10 @@
#!/usr/bin/make -f
-export JAVA_HOME=/usr/lib/jvm/default-java
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/maven.mk
-%:
- dh --with javahelper $@
-
-override_dh_auto_build:
- ant -f debian/build.xml
-
-override_dh_auto_clean:
- ant -f debian/build.xml clean
-
-override_dh_compress:
- dh_compress -X.xml -X.sql -X.java
+JAVA_HOME := /usr/lib/jvm/default-java
+DEB_MAVEN_DOC_TARGET := javadoc:javadoc javadoc:aggregate
get-orig-source:
- cd $(dir $(firstword $(MAKEFILE_LIST)))../ && \
- uscan \
- --verbose \
- --no-symlink \
- --destdir $(CURDIR) \
- --watchfile debian/watch \
- --force-download
+ uscan --download-version $(DEB_UPSTREAM_VERSION) --force-download --rename
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/openjpa.git
More information about the pkg-java-commits
mailing list