%global namedreltag .RELEASE %global namedversion %{version}%{?namedreltag} Name: springframework-batch Version: 2.1.9 Release: 1%{?dist} Summary: Tools for enterprise batch or bulk processing Group: Development/Libraries License: ASL 2.0 URL: http://www.springsource.org/spring-batch # git clone git://github.com/SpringSource/spring-batch springframework-batch-2.1.9.RELEASE # (cd springframework-batch-2.1.9.RELEASE/ && git archive --format=tar --prefix=springframework-batch-2.1.9.RELEASE/ 2.1.9.RELEASE | xz > ../springframework-batch-2.1.9.RELEASE-src-git.tar.xz) Source0: %{name}-%{namedversion}-src-git.tar.xz BuildRequires: java-devel BuildRequires: jpackage-utils BuildRequires: apache-commons-collections BuildRequires: apache-commons-dbcp BuildRequires: apache-commons-io BuildRequires: aspectjweaver BuildRequires: cglib BuildRequires: easymock BuildRequires: felix-osgi-core BuildRequires: gemini-blueprint BuildRequires: geronimo-jms BuildRequires: geronimo-jpa BuildRequires: geronimo-jta BuildRequires: h2 BuildRequires: hibernate3 BuildRequires: hibernate3-entitymanager BuildRequires: hsqldb BuildRequires: jackson BuildRequires: javamail BuildRequires: jettison BuildRequires: junit BuildRequires: log4j BuildRequires: slf4j BuildRequires: springframework BuildRequires: springframework-aop BuildRequires: springframework-beans BuildRequires: springframework-context BuildRequires: springframework-context-support BuildRequires: springframework-jdbc BuildRequires: springframework-jms BuildRequires: springframework-orm BuildRequires: springframework-tx BuildRequires: springframework-ws BuildRequires: woodstox-core BuildRequires: xstream # test deps BuildRequires: derby BuildRequires: maven BuildRequires: maven-compiler-plugin BuildRequires: maven-jar-plugin BuildRequires: maven-javadoc-plugin BuildRequires: maven-plugin-bundle BuildRequires: maven-resources-plugin BuildRequires: maven-surefire-plugin Requires: apache-commons-collections Requires: apache-commons-dbcp Requires: apache-commons-io Requires: aspectjweaver Requires: cglib Requires: easymock Requires: felix-osgi-core Requires: gemini-blueprint Requires: geronimo-jms Requires: geronimo-jpa Requires: geronimo-jta Requires: h2 Requires: hibernate3 Requires: hibernate3-entitymanager Requires: hsqldb Requires: jackson Requires: javamail Requires: jettison Requires: junit Requires: log4j Requires: slf4j Requires: springframework Requires: springframework-aop Requires: springframework-beans Requires: springframework-context Requires: springframework-context-support Requires: springframework-jdbc Requires: springframework-jms Requires: springframework-orm Requires: springframework-tx Requires: springframework-ws Requires: woodstox-core Requires: xstream Requires: java Requires: jpackage-utils BuildArch: noarch %description Spring Batch provides tools for enterprise batch or bulk processing. It can be used to wire up jobs, and track their execution, or simply as an optimization for repetitive processing in a transactional environment. Spring Batch is part of the Spring Portfolio. %package javadoc Group: Documentation Summary: Javadoc for %{name} Requires: jpackage-utils %description javadoc This package contains javadoc for %{name}. %prep %setup -q -n %{name}-%{namedversion} cp -p src/assembly/license.txt . cp -p src/assembly/notice.txt . sed -i 's/\r//' license.txt notice.txt %pom_remove_plugin :maven-assembly-plugin %pom_remove_plugin com.agilejava.docbkx:docbkx-maven-plugin %pom_remove_plugin org.codehaus.mojo:jdepend-maven-plugin %pom_remove_plugin com.springsource.bundlor:com.springsource.bundlor.maven spring-batch-parent # require com.springsource.bundlor:com.springsource.bundlor.maven %pom_remove_plugin org.eclipse.m2e:lifecycle-mapping spring-batch-parent # require foundrylogic.vpp vpp 2.2.1 %pom_remove_plugin org.apache.maven.plugins:maven-antrun-plugin spring-batch-parent # org.springframework.build.aws org.springframework.build.aws.maven %pom_xpath_remove pom:build/pom:extensions %pom_xpath_remove pom:build/pom:extensions spring-batch-parent sed -i "s|spring-oxm-tiger|spring-ws-core|" spring-batch-parent/pom.xml sed -i 's|${pom.version}|${project.version}|' spring-batch-parent/pom.xml %pom_xpath_inject pom:properties ' UTF-8 UTF-8' spring-batch-parent # hibernate-annotations apis are available in hibernate-core %pom_remove_dep org.hibernate:hibernate-annotations spring-batch-infrastructure # unavailable deps. require: 2.3.4.726 < ibatis-sqlmap > 2.3.0 %pom_remove_dep org.apache.ibatis:ibatis-sqlmap spring-batch-infrastructure rm -r spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/Ibatis*.java \ spring-batch-infrastructure/src/test/java/org/springframework/batch/item/database/Ibatis*.java %pom_remove_dep org.springframework:spring-test spring-batch-infrastructure %pom_remove_dep cglib:cglib-nodep spring-batch-infrastructure %pom_add_dep net.sf.cglib:cglib spring-batch-infrastructure %pom_remove_dep org.aspectj:aspectjrt spring-batch-infrastructure %pom_xpath_inject "pom:build/pom:plugins" ' org.apache.felix maven-bundle-plugin 2.3.6 true org.springframework.batch.infrastructure Spring Batch Infrastructure Spring ${project.version} bundle-manifest process-classes manifest ' spring-batch-infrastructure # require unavailable foundrylogic.vpp vpp 2.2.1 %pom_remove_plugin org.apache.maven.plugins:maven-antrun-plugin spring-batch-core %pom_remove_dep org.osgi:osgi_R4_core spring-batch-core %pom_add_dep org.apache.felix:org.osgi.core spring-batch-core %pom_remove_dep org.springframework.osgi:spring-osgi-core spring-batch-core %pom_add_dep org.eclipse.gemini.blueprint:gemini-blueprint-core spring-batch-core sed -i "s|org.springframework.osgi|org.eclipse.gemini.blueprint|" spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/OsgiBundleXmlApplicationContextFactory.java %pom_remove_dep org.springframework:spring-test spring-batch-core %pom_remove_dep org.aspectj:aspectjrt spring-batch-core %pom_remove_dep cglib:cglib-nodep spring-batch-core %pom_xpath_inject "pom:dependencies" " net.sf.cglib cglib test " spring-batch-core %pom_xpath_inject "pom:build/pom:plugins" ' org.apache.felix maven-bundle-plugin 2.3.6 true org.springframework.batch.core Spring Batch Core Spring ${project.version} bundle-manifest process-classes manifest ' spring-batch-core %pom_remove_dep org.springframework:spring-test spring-batch-test rm -r spring-batch-test/src/main/java/org/springframework/batch/test/StepScopeTestExecutionListener.java %pom_remove_dep org.aspectj:aspectjrt spring-batch-test %pom_add_dep org.aspectj:aspectjweaver spring-batch-test %pom_xpath_inject "pom:build" ' org.apache.felix maven-bundle-plugin 2.3.6 true org.springframework.batch.test Spring Batch Test Spring ${project.version} bundle-manifest process-classes manifest ' spring-batch-test %build # unavailable test deps: org.springframework spring-test mvn-rpmbuild -Dmaven.test.skip=true package javadoc:aggregate %install mkdir -p %{buildroot}%{_mavenpomdir} install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-spring-batch.pom %add_maven_depmap JPP.%{name}-spring-batch.pom install -pm 644 spring-batch-parent/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-parent.pom %add_maven_depmap JPP.%{name}-parent.pom mkdir -p %{buildroot}%{_javadir}/%{name} for m in core \ infrastructure \ test; do install -m 644 spring-batch-${m}/target/spring-batch-${m}-%{namedversion}.jar %{buildroot}%{_javadir}/%{name}/spring-batch-${m}.jar install -pm 644 spring-batch-${m}/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-spring-batch-${m}.pom %add_maven_depmap JPP.%{name}-spring-batch-${m}.pom %{name}/spring-batch-${m}.jar done mkdir -p %{buildroot}%{_javadocdir}/%{name} cp -rp target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name} %files %dir %{_javadir}/%{name} %{_javadir}/%{name}/spring-batch-*.jar %{_mavenpomdir}/JPP.%{name}-spring-batch*.pom %{_mavenpomdir}/JPP.%{name}-parent.pom %{_mavendepmapfragdir}/%{name} %doc README.md license.txt notice.txt %files javadoc %{_javadocdir}/%{name} %doc license.txt notice.txt %changelog * Thu Nov 29 2012 gil cattaneo 2.1.9-1 - initial rpm