[Jpackage-commits] dist/openjpa/devel .cvsignore, 1.1, 1.2 openjpa-1.0.2-TestSQLBigDecimalId.patch, NONE, 1.1 openjpa-1.0.2-TestSQLBigIntegerId.patch, NONE, 1.1 openjpa-1.0.2-TestSQLDateId.patch, NONE, 1.1 openjpa-1.0.2-jpp-depmap.xml, NONE, 1.1 openjpa-1.0.2-pom.patch, NONE, 1.1 openjpa-1.0.2-project-pom.patch, NONE, 1.1 openjpa-1.0.2-site_xml.patch, NONE, 1.1 openjpa-settings.xml, NONE, 1.1 openjpa.spec, NONE, 1.1 sources, 1.1, 1.2

jpackage jpackage at ryu.zarb.org
Wed May 28 21:20:53 CEST 2008


Update of /home/projects/jpackage/cvs/dist/openjpa/devel
In directory ryu.zarb.org:/tmp/cvs-serv22343/devel

Modified Files:
	.cvsignore sources 
Added Files:
	openjpa-1.0.2-TestSQLBigDecimalId.patch 
	openjpa-1.0.2-TestSQLBigIntegerId.patch 
	openjpa-1.0.2-TestSQLDateId.patch openjpa-1.0.2-jpp-depmap.xml 
	openjpa-1.0.2-pom.patch openjpa-1.0.2-project-pom.patch 
	openjpa-1.0.2-site_xml.patch openjpa-settings.xml openjpa.spec 
Log Message:
Import from JPP 5.0

--- NEW FILE: openjpa-1.0.2-TestSQLBigIntegerId.patch ---
--- openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLBigIntegerId.java.sav	2008-02-23 19:02:19.000000000 +0100
+++ openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLBigIntegerId.java	2008-02-23 19:02:32.000000000 +0100
@@ -57,6 +57,6 @@
     }
 
     public static void main(String[] args) {
-        TestRunner.run(SQLBigIntegerIdEntity.class);
+        TestRunner.run((Class)SQLBigIntegerIdEntity.class);
     }
 }

Index: .cvsignore
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/openjpa/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** .cvsignore	28 May 2008 19:20:25 -0000	1.1
--- .cvsignore	28 May 2008 19:20:51 -0000	1.2
***************
*** 0 ****
--- 1,3 ----
+ apache-openjpa-1.0.2-source.zip
+ openjpa-autogenerated-files-notests.tar.gz
+ openjpa-autogenerated-files.tar.gz

--- NEW FILE: openjpa-1.0.2-jpp-depmap.xml ---
<dependencies>
<!--
-->
   <dependency>
      <maven>
         <groupId>org.apache.maven.skins</groupId>
         <artifactId>maven-default-skin</artifactId>
         <version>1.1</version>
      </maven>
      <jpp>
         <groupId>JPP/maven2</groupId>
         <artifactId>default-skin</artifactId>
         <version>1.1</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>org.apache.maven</groupId>
         <artifactId>maven-default-skin</artifactId>
         <version>1.0</version>
      </maven>
      <jpp>
         <groupId>JPP/maven2</groupId>
         <artifactId>default-skin</artifactId>
         <version>1.0</version>
      </jpp>
   </dependency>

   <dependency>
      <maven>
         <groupId>jakarta-regexp</groupId>
         <artifactId>jakarta-regexp</artifactId>
         <version>1.4</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>regexp</artifactId>
         <version>1.4</version>
      </jpp>
   </dependency>

   <dependency>
      <maven>
         <groupId>net.sourceforge.serp</groupId>
         <artifactId>serp</artifactId>
         <version>1.13.1</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>serp</artifactId>
         <version>1.13.1</version>
      </jpp>
   </dependency>

   <dependency>
      <maven>
         <groupId>commons-el</groupId>
         <artifactId>commons-el</artifactId>
         <version>1.0</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>commons-el</artifactId>
         <version>1.0</version>
      </jpp>
   </dependency>

   <dependency>
      <maven>
         <groupId>commons-pool</groupId>
         <artifactId>commons-pool</artifactId>
         <version>1.3</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>commons-pool</artifactId>
         <version>1.3</version>
      </jpp>
   </dependency>

   <dependency>
      <maven>
         <groupId>net.java.dev.javacc</groupId>
         <artifactId>javacc</artifactId>
         <version>4.0</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>javacc</artifactId>
         <version>4.0</version>
      </jpp>
   </dependency>

   <dependency>
      <maven>
         <groupId>hsqldb</groupId>
         <artifactId>hsqldb</artifactId>
         <version>1.8.0.1</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>hsqldb</artifactId>
         <version>1.8.0.8</version>
      </jpp>
   </dependency>

   <dependency>
      <maven>
         <groupId>org.apache.derby</groupId>
         <artifactId>derby</artifactId>
         <version>10.2.2.0</version>
      </maven>
      <jpp>
         <groupId>JPP/derby</groupId>
         <artifactId>derby</artifactId>
         <version>10.1.1.0</version>
      </jpp>
   </dependency>

   <dependency>
      <maven>
         <groupId>javax.persistence</groupId>
         <artifactId>persistence-api</artifactId>
         <version>1.0b</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>jpa_3_0_api</artifactId>
         <version>3.0</version>
      </jpp>
   </dependency>

   <dependency>
      <maven>
         <groupId>javax.servlet.jsp</groupId>
         <artifactId>jsp-api</artifactId>
         <version>2.0</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>jsp_2_0_api</artifactId>
         <version>2.0</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>javax.servlet</groupId>
         <artifactId>servlet-api</artifactId>
         <version>2.5</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>servlet_2_5_api</artifactId>
         <version>2.5</version>
      </jpp>
   </dependency>

   <dependency>
      <maven>
         <groupId>saxon</groupId>
         <artifactId>saxon</artifactId>
         <version>6.5.3</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>saxon</artifactId>
         <version>6.5.3</version>
      </jpp>
   </dependency>

   <dependency>
      <maven>
         <groupId>batik</groupId>
         <artifactId>batik-bridge</artifactId>
         <version>1.6</version>
      </maven>
      <jpp>
         <groupId>JPP/batik</groupId>
         <artifactId>bridge</artifactId>
         <version>1.6</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>batik</groupId>
         <artifactId>batik-gvt</artifactId>
         <version>1.6</version>
      </maven>
      <jpp>
         <groupId>JPP/batik</groupId>
         <artifactId>gvt</artifactId>
         <version>1.6</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>batik</groupId>
         <artifactId>batik-ext</artifactId>
         <version>1.6</version>
      </maven>
      <jpp>
         <groupId>JPP/batik</groupId>
         <artifactId>ext</artifactId>
         <version>1.6</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>batik</groupId>
         <artifactId>batik-extension</artifactId>
         <version>1.6</version>
      </maven>
      <jpp>
         <groupId>JPP/batik</groupId>
         <artifactId>extension</artifactId>
         <version>1.6</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>batik</groupId>
         <artifactId>batik-svg-dom</artifactId>
         <version>1.6</version>
      </maven>
      <jpp>
         <groupId>JPP/batik</groupId>
         <artifactId>svg-dom</artifactId>
         <version>1.6</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>batik</groupId>
         <artifactId>batik-awt-util</artifactId>
         <version>1.6</version>
      </maven>
      <jpp>
         <groupId>JPP/batik</groupId>
         <artifactId>awt-util</artifactId>
         <version>1.6</version>
      </jpp>
   </dependency>
   <dependency>
      <maven>
         <groupId>batik</groupId>
         <artifactId>batik-transcoder</artifactId>
         <version>1.6</version>
      </maven>
      <jpp>
         <groupId>JPP/batik</groupId>
         <artifactId>transcoder</artifactId>
         <version>1.6</version>
      </jpp>
   </dependency>

   <dependency>
      <maven>
         <groupId>xml-resolver</groupId>
         <artifactId>xml-resolver</artifactId>
         <version>1.1</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>xml-commons-resolver11</artifactId>
         <version>1.1</version>
      </jpp>
   </dependency>

   <dependency>
      <maven>
         <groupId>org.docbook</groupId>
         <artifactId>docbook-xml</artifactId>
         <version>4.4</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>docbook-xml</artifactId>
         <version>4.4</version>
      </jpp>
   </dependency>

   <dependency>
      <maven>
         <groupId>org.apache.xmlgraphics</groupId>
         <artifactId>fop</artifactId>
         <version>0.94</version>
      </maven>
      <jpp>
         <groupId>JPP</groupId>
         <artifactId>xmlgraphics-fop</artifactId>
         <version>0.94</version>
      </jpp>
   </dependency>

</dependencies>

--- NEW FILE: openjpa.spec ---
# Copyright (c) 2000-2008, JPackage Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the
#    distribution.
# 3. Neither the name of the JPackage Project nor the names of its
#    contributors may be used to endorse or promote products derived
#    from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

%define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}}

## If you don't want to build with maven, and use straight ant instead,
## give rpmbuild option '--without maven'

%define with_maven %{!?_without_maven:1}%{?_without_maven:0}
%define without_maven %{?_without_maven:1}%{!?_without_maven:0}

## If you don't want to wait for tests
## give rpmbuild option '--without tests'

%define with_tests %{!?_without_tests:1}%{?_without_tests:0}
%define without_tests %{?_without_tests:1}%{!?_without_tests:0}

%define section   free

Name:           openjpa
Version:        1.0.2
Release:        1jpp
Epoch:          0
Summary:        Apache OpenJPA
License:        Apache License 2.0
Url:            http://openjpa.apache.org/
Group:          Development/Libraries/Java
Vendor: %{?_vendorinfo:%{_vendorinfo}}%{!?_vendorinfo:%{_vendor}}
Distribution: %{?_distribution:%{_distribution}}%{!?_distribution:%{_vendor}}
Source0:        http://www.apache.org/dist/openjpa/1.0.2/apache-openjpa-1.0.2-source.zip
Source1:        %{name}-settings.xml
Source2:        %{name}-%{version}-jpp-depmap.xml
Source3:        %{name}-autogenerated-files.tar.gz
Source4:        %{name}-autogenerated-files-notests.tar.gz
Patch0:         openjpa-1.0.2-TestSQLDateId.patch
Patch1:         openjpa-1.0.2-TestSQLBigDecimalId.patch 
Patch2:         openjpa-1.0.2-TestSQLBigIntegerId.patch
Patch3:         openjpa-1.0.2-pom.patch
Patch4:         openjpa-1.0.2-project-pom.patch
Patch5:         openjpa-1.0.2-site_xml.patch

BuildRequires:  jpackage-utils >= 0:1.7.4
BuildRequires:  java-devel = 0:1.5.0
BuildRequires:  ant >= 0:1.6.5
BuildRequires:  ant-nodeps
BuildRequires:  ant-junit
BuildRequires:  junit
BuildRequires:  derby
BuildRequires:  hsqldb
BuildRequires:  javacc
%if %{with_maven}
BuildRequires:  docbkx
BuildRequires:  docbook-xml
BuildRequires:  maven2-common-poms
BuildRequires:  maven2 >= 0:2.0.7
BuildRequires:  maven2-default-skin
BuildRequires:  maven2-plugin-ant
BuildRequires:  maven2-plugin-antrun
BuildRequires:  maven2-plugin-compiler
BuildRequires:  maven2-plugin-idea
BuildRequires:  maven2-plugin-install
BuildRequires:  maven2-plugin-jar
BuildRequires:  maven2-plugin-javadoc
BuildRequires:  maven2-plugin-jxr
BuildRequires:  maven2-plugin-pmd
BuildRequires:  maven2-plugin-project-info-reports
BuildRequires:  maven2-plugin-resources
BuildRequires:  maven2-plugin-site
BuildRequires:  maven2-plugin-surefire
BuildRequires:  maven2-plugin-surefire-report
BuildRequires:  mojo-maven2-plugin-cobertura
BuildRequires:  mojo-maven2-plugin-javacc
BuildRequires:  mojo-maven2-plugin-taglist
BuildRequires:  jetty6-maven2-plugins
%endif


BuildRequires:  jakarta-commons-collections
BuildRequires:  jakarta-commons-dbcp
BuildRequires:  jakarta-commons-lang
BuildRequires:  jakarta-commons-logging
BuildRequires:  jakarta-commons-pool
BuildRequires:  jaxb_2_1_api
BuildRequires:  jms_1_1_api
BuildRequires:  jpa_3_0_api
BuildRequires:  jta_1_1_api
BuildRequires:  log4j
BuildRequires:  regexp
BuildRequires:  serp
BuildRequires:  stax_1_0_api

Requires:  hsqldb
Requires:  jakarta-commons-collections
Requires:  jakarta-commons-dbcp
Requires:  jakarta-commons-lang
Requires:  jakarta-commons-logging
Requires:  jakarta-commons-pool
Requires:  jaxb_2_1_api
Requires:  jms_1_1_api
Requires:  jpa_3_0_api
Requires:  jta_1_1_api
Requires:  log4j
Requires:  regexp
Requires:  serp
Requires:  stax_1_0_api

BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-buildroot

%description
Apache OpenJPA, a Java EE persistence project of the Apache
Software Foundation. It is a feature-rich implementation of
the persistence part of Enterprise Java Beans 3.0, also known 
as the Java Persistence API (JPA), and is available under the 
terms of the Apache Software License. OpenJPA can be used as 
a stand-alone POJO persistence layer, or it can be integrated 
into any EJB3.0 compliant container and many lightweight frameworks.

%package javadoc
Summary:        Javadoc for %{name}
Group:          Development/Documentation

%description javadoc
%{summary}.

%if %{with_maven}
%package manual
Summary:        Documents for %{name}
Group:          Development/Documentation

%description manual
%{summary}.
%endif

%prep
%setup -q -n apache-%{name}-%{version}-source
#find . -name "*.jar" -exec rm -f {} \;
for j in $(find . -name "*.jar"); do
    mv $j $j.no
done
%if %{without_maven}
%if %{with_tests}
gzip -dc %{SOURCE3} | tar xf -
%else
gzip -dc %{SOURCE4} | tar xf -
%endif
%endif

%patch0 -b .sav0
%patch1 -b .sav1
%patch2 -b .sav2
%patch3 -b .sav3
%patch4 -b .sav4
%patch5 -b .sav5

cp %{SOURCE1} settings.xml
sed -i -e "s|<url>__JPP_URL_PLACEHOLDER__</url>|<url>file://`pwd`/.m2/repository</url>|g" settings.xml
sed -i -e "s|<url>__JAVADIR_PLACEHOLDER__</url>|<url>file://`pwd`/external_repo</url>|g" settings.xml
sed -i -e "s|<url>__MAVENREPO_DIR_PLACEHOLDER__</url>|<url>file://`pwd`/.m2/repository</url>|g" settings.xml

cp src/site/site.xml openjpa-project/src/site

%build
export JAVA_HOME=%{_jvmdir}/java-1.5.0

%if %{with_maven}
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
mkdir -p $MAVEN_REPO_LOCAL/org/apache/maven/skins/maven-default-skin/1.1/
ln -sf $(build-classpath maven2/default-skin) $MAVEN_REPO_LOCAL/org/apache/maven/skins/maven-default-skin/1.1/maven-default-skin-1.1.jar

mkdir external_repo
ln -s %{_javadir} external_repo/JPP

export M2_SETTINGS=$(pwd)/settings.xml
mvn-jpp \
        -e \
        -s $M2_SETTINGS \
%if %{with_tests}
        -P test-derby \
%else
        -Dtest=false \
%endif
        -Dmaven.test.failure.ignore=true \
        -Dmaven2.jpp.depmap.file=%{SOURCE2} \
        -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
        install
mvn-jpp \
        -e \
        -s $M2_SETTINGS \
        -Pjavadoc-profile \
        -Dtest=false \
        -Dmaven2.jpp.depmap.file=%{SOURCE2} \
        -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
        javadoc:javadoc site
export MAVEN_OPTS="-Xmx512m"
mvn-jpp \
        -e \
        -s $M2_SETTINGS \
        -Pdocbook-profile \
        -Dtest=false \
        -Dmaven2.jpp.depmap.file=%{SOURCE2} \
        -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
        process-resources

%else
#[INFO] Reactor build order:
#[INFO]   OpenJPA
#[INFO]   OpenJPA Utilities
#[INFO]   OpenJPA Kernel
#[INFO]   OpenJPA JDBC
#[INFO]   OpenJPA XML Store
#[INFO]   OpenJPA JDBC 1.5
#[INFO]   OpenJPA Utilities 1.5
#[INFO]   OpenJPA Kernel 1.5
#[INFO]   OpenJPA JPA
#[INFO]   OpenJPA JPA JDBC
#[INFO]   OpenJPA Aggregate Jar
#[INFO]   OpenJPA Distribution
#[INFO]   OpenJPA Integration Tests
#[INFO]   OpenJPA Examples Integration Tests
#[INFO]   OpenJPA JPA TCK Integration Tests
#[INFO]   OpenJPA Persistence Examples

export OPT_JAR_LIST="ant/ant-nodep ant/ant-junit junit"
export CLASSPATH=$(build-classpath \
commons-collections \
commons-lang \
commons-logging \
log4j \
regexp \
serp \
)
CLASSPATH=$CLASSPATH:target/classes:target/test-classes
pushd openjpa-lib
ant -Dmaven.settings.offline=true -Dbuild.sysclasspath=only jar javadoc
popd
export CLASSPATH=$(build-classpath \
commons-collections \
commons-lang \
commons-pool \
jms_1_1_api \
jta_1_1_api \
regexp \
serp \
)
CLASSPATH=$CLASSPATH:$(pwd)/openjpa-lib/target/openjpa-lib-%{version}.jar
CLASSPATH=$CLASSPATH:target/classes:target/test-classes
pushd openjpa-kernel
jjtree -BUILD_NODE_FILES=false -OUTPUT_DIRECTORY=target/generated-sources/jjtree/org/apache/openjpa/kernel/jpql/ src/main/jjtree/org/apache/openjpa/kernel/jpql/JPQL.jjt 
javacc -OUTPUT_DIRECTORY=target/generated-sources/javacc/org/apache/openjpa/kernel/jpql/ target/generated-sources/jjtree/org/apache/openjpa/kernel/jpql/JPQL.jj 
rm target/generated-sources/javacc/org/apache/openjpa/kernel/jpql/ParseException.java
ant -Dmaven.settings.offline=true -Dbuild.sysclasspath=only jar
$JAVA_HOME/bin/java org.apache.openjpa.ee.WASManagedRuntime
$JAVA_HOME/bin/java org.apache.openjpa.util.ProxyManagerImpl -utils 5
ant -Dmaven.settings.offline=true -Dbuild.sysclasspath=only jar javadoc
popd
export CLASSPATH=$(build-classpath \
commons-collections \
commons-lang \
hsqldb \
jta_1_1_api \
serp \
)
CLASSPATH=$CLASSPATH:$(pwd)/openjpa-lib/target/openjpa-lib-%{version}.jar
CLASSPATH=$CLASSPATH:$(pwd)/openjpa-kernel/target/openjpa-kernel-%{version}.jar
CLASSPATH=$CLASSPATH:target/classes:target/test-classes
pushd openjpa-jdbc
ant -Dmaven.settings.offline=true -Dbuild.sysclasspath=only jar javadoc
popd
export CLASSPATH=$(build-classpath \
commons-collections \
serp \
)
CLASSPATH=$CLASSPATH:$(pwd)/openjpa-lib/target/openjpa-lib-%{version}.jar
CLASSPATH=$CLASSPATH:$(pwd)/openjpa-kernel/target/openjpa-kernel-%{version}.jar
CLASSPATH=$CLASSPATH:$(pwd)/openjpa-jdbc/target/openjpa-jdbc-%{version}.jar
CLASSPATH=$CLASSPATH:target/classes:target/test-classes
pushd openjpa-xmlstore
ant -Dmaven.settings.offline=true -Dbuild.sysclasspath=only jar javadoc
popd
export CLASSPATH=$(build-classpath \
commons-collections \
jaxb_2_1_api \
stax_1_0_api \
)
CLASSPATH=$CLASSPATH:$(pwd)/openjpa-lib/target/openjpa-lib-%{version}.jar
CLASSPATH=$CLASSPATH:$(pwd)/openjpa-kernel/target/openjpa-kernel-%{version}.jar
CLASSPATH=$CLASSPATH:$(pwd)/openjpa-jdbc/target/openjpa-jdbc-%{version}.jar
CLASSPATH=$CLASSPATH:target/classes:target/test-classes
pushd openjpa-jdbc-5
ant -Dmaven.settings.offline=true -Dbuild.sysclasspath=only jar javadoc
popd
export CLASSPATH=$(build-classpath \
serp \
)
CLASSPATH=$CLASSPATH:$(pwd)/openjpa-lib/target/openjpa-lib-%{version}.jar
CLASSPATH=$CLASSPATH:target/classes:target/test-classes
pushd openjpa-lib-5
ant -Dmaven.settings.offline=true -Dbuild.sysclasspath=only jar javadoc
popd
export CLASSPATH=$(build-classpath \
commons-collections \
serp \
)
CLASSPATH=$CLASSPATH:$(pwd)/openjpa-lib/target/openjpa-lib-%{version}.jar
CLASSPATH=$CLASSPATH:$(pwd)/openjpa-kernel/target/openjpa-kernel-%{version}.jar
CLASSPATH=$CLASSPATH:$(pwd)/openjpa-jdbc/target/openjpa-jdbc-%{version}.jar
CLASSPATH=$CLASSPATH:target/classes:target/test-classes
pushd openjpa-kernel-5
ant -Dmaven.settings.offline=true -Dbuild.sysclasspath=only jar javadoc
popd
export CLASSPATH=$(build-classpath \
commons-collections \
commons-lang \
jpa_3_0_api \
jta_1_1_api \
serp \
)
CLASSPATH=$CLASSPATH:$(pwd)/openjpa-lib/target/openjpa-lib-%{version}.jar
CLASSPATH=$CLASSPATH:$(pwd)/openjpa-kernel/target/openjpa-kernel-%{version}.jar
CLASSPATH=$CLASSPATH:$(pwd)/openjpa-jdbc/target/openjpa-jdbc-%{version}.jar
CLASSPATH=$CLASSPATH:$(pwd)/openjpa-lib-5/target/openjpa-lib-5-%{version}.jar
CLASSPATH=$CLASSPATH:$(pwd)/openjpa-kernel-5/target/openjpa-kernel-5-%{version}.jar
CLASSPATH=$CLASSPATH:$(pwd)/openjpa-jdbc-5/target/openjpa-jdbc-5-%{version}.jar
CLASSPATH=$CLASSPATH:target/classes:target/test-classes
pushd openjpa-persistence
ant -Dmaven.settings.offline=true -Dbuild.sysclasspath=only jar javadoc
popd
export CLASSPATH=$(build-classpath \
commons-collections \
commons-dbcp \
commons-lang \
commons-pool \
derby/derby \
jaxb_2_1_api \
jpa_3_0_api \
jta_1_1_api \
log4j \
serp \
stax_1_0_api \
)
CLASSPATH=$CLASSPATH:$(pwd)/openjpa-lib/target/openjpa-lib-%{version}.jar
CLASSPATH=$CLASSPATH:$(pwd)/openjpa-kernel/target/openjpa-kernel-%{version}.jar
CLASSPATH=$CLASSPATH:$(pwd)/openjpa-jdbc/target/openjpa-jdbc-%{version}.jar
CLASSPATH=$CLASSPATH:$(pwd)/openjpa-lib-5/target/openjpa-lib-5-%{version}.jar
CLASSPATH=$CLASSPATH:$(pwd)/openjpa-kernel-5/target/openjpa-kernel-5-%{version}.jar
CLASSPATH=$CLASSPATH:$(pwd)/openjpa-jdbc-5/target/openjpa-jdbc-5-%{version}.jar
CLASSPATH=$CLASSPATH:$(pwd)/openjpa-persistence/target/openjpa-persistence-%{version}.jar
CLASSPATH=$CLASSPATH:target/classes:target/test-classes
pushd openjpa-persistence-jdbc
ant -Dmaven.settings.offline=true -Dbuild.sysclasspath=only jar javadoc
popd
export CLASSPATH=
pushd openjpa-all
ant -Dmaven.settings.offline=true -Dbuild.sysclasspath=only 
popd
export CLASSPATH=$(build-classpath \
commons-collections \
jpa_3_0_api \
)
CLASSPATH=$CLASSPATH:$(pwd)/openjpa-kernel/target/openjpa-kernel-%{version}.jar
CLASSPATH=$CLASSPATH:$(pwd)/openjpa-jdbc/target/openjpa-jdbc-%{version}.jar
CLASSPATH=$CLASSPATH:target/classes:target/test-classes
pushd openjpa-examples
ant -Dmaven.settings.offline=true -Dbuild.sysclasspath=only jar javadoc
popd

%endif

%install
rm -rf $RPM_BUILD_ROOT

# jars
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/%{name}
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms

%add_to_maven_depmap org.apache.openjpa %{name}-parent %{version} JPP/%{name} parent
install -m 644 pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-parent.pom

install -m 644 %{name}-all/target/%{name}-%{version}.jar \
           $RPM_BUILD_ROOT%{_javadir}/%{name}/all-%{version}.jar
%add_to_maven_depmap org.apache.openjpa %{name} %{version} JPP/%{name} all
install -m 644 %{name}-all/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-all.pom

install -m 644 %{name}-jdbc-5/target/%{name}-jdbc-5-%{version}.jar \
           $RPM_BUILD_ROOT%{_javadir}/%{name}/jdbc-5-%{version}.jar
%add_to_maven_depmap org.apache.openjpa %{name}-jdbc-5 %{version} JPP/%{name} jdbc-5
install -m 644 %{name}-jdbc-5/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-jdbc-5.pom

install -m 644 %{name}-jdbc/target/%{name}-jdbc-%{version}.jar \
           $RPM_BUILD_ROOT%{_javadir}/%{name}/jdbc-%{version}.jar
%add_to_maven_depmap org.apache.openjpa %{name}-jdbc %{version} JPP/%{name} jdbc
install -m 644 %{name}-jdbc/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-jdbc.pom

install -m 644 %{name}-kernel-5/target/%{name}-kernel-5-%{version}.jar \
           $RPM_BUILD_ROOT%{_javadir}/%{name}/kernel-5-%{version}.jar
%add_to_maven_depmap org.apache.openjpa %{name}-kernel-5 %{version} JPP/%{name} kernel-5
install -m 644 %{name}-kernel-5/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-kernel-5.pom

install -m 644 %{name}-kernel/target/%{name}-kernel-%{version}.jar \
           $RPM_BUILD_ROOT%{_javadir}/%{name}/kernel-%{version}.jar
%add_to_maven_depmap org.apache.openjpa %{name}-kernel %{version} JPP/%{name} kernel
install -m 644 %{name}-kernel/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-kernel.pom

install -m 644 %{name}-lib-5/target/%{name}-lib-5-%{version}.jar \
           $RPM_BUILD_ROOT%{_javadir}/%{name}/lib-5-%{version}.jar
%add_to_maven_depmap org.apache.openjpa %{name}-lib-5 %{version} JPP/%{name} lib-5
install -m 644 %{name}-lib-5/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-lib-5.pom

install -m 644 %{name}-lib/target/%{name}-lib-%{version}.jar \
           $RPM_BUILD_ROOT%{_javadir}/%{name}/lib-%{version}.jar
%add_to_maven_depmap org.apache.openjpa %{name}-lib %{version} JPP/%{name} lib
install -m 644 %{name}-lib/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-lib.pom

install -m 644 %{name}-persistence-jdbc/target/%{name}-persistence-jdbc-%{version}.jar \
           $RPM_BUILD_ROOT%{_javadir}/%{name}/persistence-jdbc-%{version}.jar
%add_to_maven_depmap org.apache.openjpa %{name}-persistence-jdbc %{version} JPP/%{name} persistence-jdbc
install -m 644 %{name}-persistence-jdbc/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-persistence-jdbc.pom

install -m 644 %{name}-persistence/target/%{name}-persistence-%{version}.jar \
           $RPM_BUILD_ROOT%{_javadir}/%{name}/persistence-%{version}.jar
%add_to_maven_depmap org.apache.openjpa %{name}-persistence %{version} JPP/%{name} persistence
install -m 644 %{name}-persistence/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-persistence.pom

install -m 644 %{name}-xmlstore/target/%{name}-xmlstore-%{version}.jar \
           $RPM_BUILD_ROOT%{_javadir}/%{name}/xmlstore-%{version}.jar
%add_to_maven_depmap org.apache.openjpa %{name}-xmlstore %{version} JPP/%{name} xmlstore
install -m 644 %{name}-xmlstore/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.%{name}-xmlstore.pom



(cd $RPM_BUILD_ROOT%{_javadir}/%{name} && for jar in *-%{version}*; do \
ln -sf ${jar} ${jar/-%{version}/}; done)


# javadoc
for module in \
           examples \
           jdbc-5 \
           jdbc \
           kernel-5 \
           kernel \
           lib-5 \
           lib \
           persistence-jdbc \
           persistence \
           xmlstore \
           ; do
    install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/$module
    cp -pr %{name}-$module/target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}/$module
done
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} # ghost symlink

## manual
install -d -m 755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp -p LICENSE.txt $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
%if %{with_maven}
cp -pr target/site $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
cp -pr openjpa-project/target/manual $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
%endif

%clean
rm -rf $RPM_BUILD_ROOT

%post javadoc
ln -sf %{name}-%{version} %{_javadocdir}/%{name}
 
%postun javadoc
if [ "$1" = "0" ]; then
  rm -f %{_javadocdir}/%{name}
fi

%post
%update_maven_depmap

%postun
%update_maven_depmap

%files
%defattr(0644,root,root,0755)
%{_docdir}/%{name}-%{version}/LICENSE.txt
%{_javadir}/%{name}
%{_datadir}/maven2
%{_mavendepmapfragdir}

%files javadoc
%defattr(0644,root,root,0755)
%doc %{_javadocdir}/%{name}-%{version}
%ghost %{_javadocdir}/%{name}

%if %{with_maven}
%files manual
%defattr(0644,root,root,0755)
%doc %{_docdir}/%{name}-%{version}/manual
%doc %{_docdir}/%{name}-%{version}/site
%endif

%changelog
* Tue Feb 26 2008 Ralph Apel <r.apel at r-apel.de> 0:1.0.2-1jpp
- First release

--- NEW FILE: openjpa-1.0.2-project-pom.patch ---
--- openjpa-project/pom.xml.sav4	2008-02-12 14:28:20.000000000 +0100
+++ openjpa-project/pom.xml	2008-02-24 13:02:10.000000000 +0100
@@ -99,6 +99,7 @@
         </resources>
 
         <plugins>
+<!-- Don't assemble: waste of time and disk space
             <plugin>
                 <artifactId>maven-assembly-plugin</artifactId>
                 <executions>
@@ -128,7 +129,7 @@
                     </execution>
                 </executions>
             </plugin>
-
+-->
             <!--
                 Copy over site files from src/site to target/filtered-site
                 so we can filter resources and include other generated
@@ -373,5 +374,12 @@
             <artifactId>derby</artifactId>
             <version>10.2.2.0</version>
         </dependency>
+
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-default-skin</artifactId>
+            <version>1.0</version>
+        </dependency>
+
     </dependencies>
 </project>

Index: sources
===================================================================
RCS file: /home/projects/jpackage/cvs/dist/openjpa/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** sources	28 May 2008 19:20:25 -0000	1.1
--- sources	28 May 2008 19:20:51 -0000	1.2
***************
*** 0 ****
--- 1,3 ----
+ d43c6ee85e490ec0c8dc0686dfa9ab1e  apache-openjpa-1.0.2-source.zip
+ 9f417f9004b34b44f656fd28ab413a55  openjpa-autogenerated-files-notests.tar.gz
+ 74f07d27a6dcc9f01b93294fe77c6d3c  openjpa-autogenerated-files.tar.gz

--- NEW FILE: openjpa-1.0.2-TestSQLDateId.patch ---
--- openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLDateId.java.sav0	2008-02-12 13:05:46.000000000 +0100
+++ openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLDateId.java	2008-02-23 18:58:55.000000000 +0100
@@ -57,7 +57,7 @@
     }
 
     public static void main(String[] args) {
-        TestRunner.run(SQLDateIdEntity.class);
+        TestRunner.run((Class)SQLDateIdEntity.class);
     }
 }
 

--- NEW FILE: openjpa-1.0.2-site_xml.patch ---
--- src/site/site.xml.sav4	2007-11-06 17:37:16.000000000 +0100
+++ src/site/site.xml	2008-02-13 08:59:58.000000000 +0100
@@ -18,6 +18,11 @@
  under the License.   
 -->
 <project name="OpenJPA">
+    <skin>
+     <groupId>org.apache.maven</groupId>
+     <artifactId>maven-default-skin</artifactId>
+     <version>1.0</version>
+    </skin>
     <bannerLeft>
         <name>OpenJPA</name>
     </bannerLeft>     

--- NEW FILE: openjpa-1.0.2-pom.patch ---
--- pom.xml.sav2	2007-11-06 17:38:34.000000000 +0100
+++ pom.xml	2008-02-22 16:28:13.000000000 +0100
@@ -323,7 +323,9 @@
                         <argLine>${surefire.jvm.args}</argLine>
                         <useFile>false</useFile>
                         <trimStackTrace>false</trimStackTrace>
+<!--
                         <useSystemClassLoader>true</useSystemClassLoader>
+-->
                     </configuration>
                 </plugin>
                 <plugin>

--- NEW FILE: openjpa-settings.xml ---
<settings>
	<profiles>
		<profile>
			<id>JPP</id>
			<repositories>
				<repository>
					<id>internal</id>
					<layout>jpp</layout>
					<url>__JPP_URL_PLACEHOLDER__</url>
				</repository>
				<repository>
					<id>external</id>
					<layout>jpp</layout>
					<url>__JAVADIR_PLACEHOLDER__</url>
				</repository>
				<repository>
					<id>local</id>
					<layout>jpp</layout>
					<url>__MAVENREPO_DIR_PLACEHOLDER__</url>
				</repository>
			</repositories>
			<pluginRepositories>
				<pluginRepository>
					<id>plugins-internal</id>
					<name>plugins-internal</name>
					<layout>jpp</layout>
					<url>__JPP_URL_PLACEHOLDER__</url>
				</pluginRepository>
				<pluginRepository>
					<id>plugins-external</id>
					<name>plugins-external</name>
					<layout>jpp</layout>
					<url>__JAVADIR_PLACEHOLDER__</url>
				</pluginRepository>
				<pluginRepository>
					<id>plugins-maven</id>
					<name>plugins-maven</name>
					<layout>jpp</layout>
					<url>__MAVENDIR_PLUGIN_PLACEHOLDER__</url>
				</pluginRepository>
			</pluginRepositories>
		</profile>
	</profiles>
	<activeProfiles>
		<activeProfile>JPP</activeProfile>
	</activeProfiles>
</settings>

--- NEW FILE: openjpa-1.0.2-TestSQLBigDecimalId.patch ---
--- openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLBigDecimalId.java.sav	2008-02-23 19:01:13.000000000 +0100
+++ openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLBigDecimalId.java	2008-02-23 19:01:28.000000000 +0100
@@ -56,6 +56,6 @@
     }
 
     public static void main(String[] args) {
-        TestRunner.run(SQLBigDecimalIdEntity.class);
+        TestRunner.run((Class)SQLBigDecimalIdEntity.class);
     }
 }




More information about the JPackage-commits mailing list