%define with_maven 1 %if %with_maven %define with_lifecycle 1 %define with_test 1 %endif Name: btm Version: 2.1.0 Release: %mkrel 1 Summary: Bitronix JTA Transaction Manager Group: Development/Java License: LGPLv3 Url: http://docs.codehaus.org/display/BTM/Home # git clone git://git.codehaus.org/btm-git.git # cd btm-git && git archive --format=tar --prefix=btm-2.1.0/ btm-2.1.0 | xz > btm-2.1.0-git.tar.xz Source0: btm-2.1.0-git.tar.xz Source1: btm-2.1.0-depmap Source2: btm-2.1.0-build.xml Source3: btm-2.1.0-build.properties Patch0: btm-2.1.0-jetty6-lifecycleadd_jetty-util.patch Patch1: btm-2.1.0-remove_lifecycle_tomcat-jetty_deps.patch #Patch1: btm-2.1.0-remove_mockito.patch %if !%with_maven BuildRequires: ant %else BuildRequires: maven BuildRequires: maven-antrun-plugin BuildRequires: maven-assembly-plugin BuildRequires: maven-compiler-plugin BuildRequires: maven-jar-plugin BuildRequires: maven-javadoc-plugin BuildRequires: maven-plugin-build-helper BuildRequires: maven-release-plugin BuildRequires: maven-source-plugin BuildRequires: maven-surefire BuildRequires: maven-surefire-provider-junit %endif BuildRequires: codehaus-parent BuildRequires: geronimo-jms BuildRequires: geronimo-jta BuildRequires: java-devel BuildRequires: jpackage-utils BuildRequires: junit BuildRequires: liblog4j-java %if %with_test BuildRequires: mockito %endif BuildRequires: slf4j # btm-*-lifecycle %if %with_maven BuildRequires: tomcat6-lib BuildRequires: jetty BuildRequires: tomcat6 %endif Requires: geronimo-jms Requires: geronimo-jta Requires: jpackage-utils Requires: slf4j Requires(post): jpackage-utils Requires(postun): jpackage-utils BuildArch: noarch %description The Bitronix Transaction Manager (BTM) is a simple but complete implementation of the JTA 1.1 API. It is a fully working XA transaction manager that provides all services required by the JTA API while trying to keep the code as simple as possible for easier understanding of the XA semantics. This is BTM's strongest point compared to its competitors: it is trivial to configure and when something goes wrong it is much easier to figure out what to do thanks to the great care placed in useful error reporting and logging. %package javadoc Group: Development/Java Summary: Javadoc for %{name} Requires: %{name} = %{version}-%{release} Requires: jpackage-utils %description javadoc Bitronix JTA (1.1 API) Transaction Manager. This package contains javadoc for %{name}. %prep %setup -q -n btm-%{version} %if %with_lifecycle # package org.mortbay.component does not exist # package org.mortbay.log does not exist %patch0 -p0 %else %patch1 -p0 %if %with_test # TODO #%patch2 -p0 %endif %if !%with_maven # TODO cp -pr %{SOURCE1} build.xml cp -pr %{SOURCE2} build.properties %endif %endif %build %if %with_maven export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository mkdir -p $MAVEN_REPO_LOCAL mvn-rpmbuild \ install:install-file \ -DgroupId=org.apache.maven.surefire \ -DartifactId=surefire-junit3 \ -Dversion=2.8.1 \ -Dpackaging=jar \ -Dfile=$(build-classpath maven-surefire/junit) \ -Dmaven.repo.local=$MAVEN_REPO_LOCAL mvn-rpmbuild \ install:install-file \ -DgroupId=org.apache.maven.surefire \ -DartifactId=surefire-providers \ -Dversion=2.8.1 \ -Dpackaging=pom \ -Dfile=/usr/share/maven2/poms/JPP.maven-surefire-providers.pom \ -Dmaven.repo.local=$MAVEN_REPO_LOCAL mvn-rpmbuild \ -Dmaven.repo.local=$MAVEN_REPO_LOCAL \ -Dmaven.jpp.depmap.file="%{SOURCE1}" \ %if !%with_test -Dmaven.test.skip=true \ %endif install javadoc:aggregate %else ant -Djar.version=%{version} build doc %endif %install [ %{buildroot} != / ] && rm -rf %{buildroot} mkdir -p %{buildroot}%{_javadir} install -pm 644 btm/target/btm-%{version}.jar %{buildroot}%{_javadir}/btm.jar mkdir -p %{buildroot}%{_mavenpomdir} install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-btm-parent.pom install -pm 644 btm/pom.xml %{buildroot}%{_mavenpomdir}/JPP-btm.pom %add_maven_depmap JPP-btm-parent.pom %add_maven_depmap JPP-btm.pom btm.jar %if %with_lifecycle install -pm 644 btm-jetty6-lifecycle/target/btm-jetty6-lifecycle-%{version}.jar %{buildroot}%{_javadir}/btm-jetty6-lifecycle.jar install -pm 644 btm-jetty6-lifecycle/pom.xml %{buildroot}%{_mavenpomdir}/JPP-btm-jetty6-lifecycle.pom %add_maven_depmap JPP-btm-jetty6-lifecycle.pom btm-jetty6-lifecycle.jar install -pm 644 btm-tomcat55-lifecycle/target/btm-tomcat55-lifecycle-%{version}.jar %{buildroot}%{_javadir}/btm-tomcat55-lifecycle.jar install -pm 644 btm-tomcat55-lifecycle/pom.xml %{buildroot}%{_mavenpomdir}/JPP-btm-tomcat55-lifecycle.pom %add_maven_depmap JPP-btm-tomcat55-lifecycle.pom btm-tomcat55-lifecycle.jar %endif cp -pr btm-dist/src/main/dist/license.txt . cp -pr btm-dist/src/main/dist/release-notes/release-notes-%{version}.txt . mkdir -p %{buildroot}%{_javadocdir}/btm cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/btm %clean [ %{buildroot} != / ] && rm -rf %{buildroot} %post %update_maven_depmap %postun %update_maven_depmap %files %{_javadir}/btm.jar %if %with_lifecycle %{_javadir}/btm-*-lifecycle.jar %endif %{_mavenpomdir}/* %{_mavendepmapfragdir}/* %doc license.txt release-notes-%{version}.txt %files javadoc %{_javadocdir}/btm %changelog * Wed Oct 19 2011 gil <gil> 2.1.0-1.mga2 + Revision: 156634 - imported package btm