%define maven 0 Name: maven-surefire Version: 2.4.3 Release: 2mamba Summary: a test framework project Group: Development/Libraries/Java Vendor: openmamba Distribution: openmamba Packager: gil URL: http://maven.apache.org/surefire/ # all in one # svn export http://svn.apache.org/repos/asf/maven/surefire/tags/surefire-2.4.3/ # tar czf surefire-2.4.3-svn-src.tar.gz surefire-2.4.3 Source0: surefire-%{version}-svn-src.tar.gz Source1: maven2-2.2.1-settings.xml Source2: maven-surefire-2.4.3-autogeneratedfiles.tar.gz Patch0: maven-surefire-2.4.3-surefire-api-test.patch Patch1: maven-surefire-2.4.3-surefire-booter-test.patch License: Apache Software License 2.0 BuildRequires: apache-ant BuildRequires: apache-ant-nodeps %if %maven BuildRequires: apache-maven2 BuildRequires: apache-maven2-plugin-compiler BuildRequires: apache-maven2-plugin-install BuildRequires: apache-maven2-plugin-jar BuildRequires: apache-maven2-plugin-javadoc BuildRequires: apache-maven2-plugin-resources BuildRequires: apache-maven2-plugin-site BuildRequires: apache-maven2-plugin-source BuildRequires: apache-maven2-plugin-surefire BuildRequires: jakarta-commons-cli BuildRequires: java-plexus-container-default BuildRequires: java-plexus-interactivity BuildRequires: java-sch BuildRequires: java-testng BuildRequires: java-tidy # TODO BuildRequires: maven-wagon BuildRequires: xml-commons-apis %endif BuildRequires: jakarta-commons-lang BuildRequires: java-classworlds BuildRequires: java-junit3 BuildRequires: java-junit45 BuildRequires: java-jmock1 BuildRequires: java-plexus-utils BuildRequires: jpackage-utils Requires: java-classworlds Requires: java-junit3 Requires: java-plexus-utils Requires: jpackage-utils BuildRoot: %{_tmppath}/%{name}-%{version}-root %description Surefire is a test framework project. %package booter Summary: Booter for %{name} Group: Development/Libraries/Java Requires: %{name} = %{version}-%{release} %description booter Surefire is a test framework project. This package contains %{name} Booter %package junit4 Group: Development/Libraries/Java Summary: SureFire JUnit4 Runner Requires: %{name} = %{version}-%{release} Requires: java-junit45 %description junit4 Surefire is a test framework project. This package contains SureFire JUnit4 Runner. %package junit Group: Development/Libraries/Java Summary: SureFire JUnit (3.8.x) Runner Requires: %{name} = %{version}-%{release} Requires: java-junit3 %description junit Surefire is a test framework project. This package contains SureFire JUnit (3.8.x) Runner. %if %maven %package plugin Group: Development/Libraries/Java Summary: Maven Surefire Plugin Requires: %{name} = %{version}-%{release} Requires: apache-maven %description plugin Surefire is a test framework project. This package contains Maven Surefire Plugin. %package report-plugin Group: Development/Libraries/Java Summary: Maven Surefire Report Plugin Requires: %{name} = %{version}-%{release} Requires: apache-maven %description report-plugin Surefire is a test framework project. This package contains Maven Surefire Plugin. %package testng Group: Development/Libraries/Java Summary: SureFire TestNG Runner Requires: %{name} = %{version}-%{release} Requires: java-plexus-utils Requires: java-testng %description testng Surefire is a test framework project. This package contains SureFire TestNG Runner %endif %package javadoc Group: Documentation Summary: Javadoc for SureFire API %description javadoc Surefire is a test framework project. This package contains javadoc for SureFire API. %package booter-javadoc Group: Documentation Summary: Javadoc for SureFire Booter %description booter-javadoc Surefire is a test framework project. This package contains javadoc for SureFire Booter %package junit4-javadoc Group: Documentation Summary: Javadoc for SureFire JUnit 4.x Runner. %description junit4-javadoc Surefire is a test framework project. This package contains javadoc for SureFire JUnit Runner. %package junit-javadoc Group: Documentation Summary: Javadoc for SureFire JUnit (3.8.x) Runner %description junit-javadoc Surefire is a test framework project. This package contains javadoc for SureFire JUnit (3.8.x) Runner %prep %setup -q -n surefire-%{version} # -D -T #:<< __GIL for j in $(find . -name "*.jar" -o -name "CVS"); do rm -rf $j done %if %maven cp %{SOURCE1} settings.xml mkdir -p .m2/repository/JPP/maven2 sed -i -e "s|__INTERNAL_REPO_PLACEHOLDER__|file://`pwd`/external_repo|g" settings.xml sed -i -e "s|__EXTERNAL_REPO_PLACEHOLDER__|file://`pwd`/.m2/repository|g" settings.xml %else tar xf %{SOURCE2} %patch0 %patch1 %endif #__GIL %build #:<< __GIL export JAVA_HOME=/usr/lib/jvm/jdk-sun export MAVEN_REPO_LOCAL=$PWD/.m2/repository mkdir -p $MAVEN_REPO_LOCAL %if %maven export MAVEN_SETTINGS=$(pwd)/settings.xml mkdir external_repo ln -s %{_javadir} external_repo/JPP mvn-jpp \ -e \ -s $MAVEN_SETTINGS \ -Dmaven.test.failure.ignore=true \ -Dmaven.repo.local=$MAVEN_REPO_LOCAL \ ant:ant install javadoc:javadoc %else pushd surefire-api export CLASSPATH="" CLASSPATH=$CLASSPATH:$(build-classpath commons-lang plexus/utils) CLASSPATH=$CLASSPATH:$(build-classpath jmock1 junit-3.8.2):target/classes:target/test-classes ant \ -Duser.home=$PWD \ -Dmaven.repo.local=$MAVEN_REPO_LOCAL \ -Dmaven.settings.offline=true \ -Dmaven.settings.interactiveMode=false \ -Dbuild.sysclasspath=first \ jar javadoc popd pushd surefire-booter export CLASSPATH="" CLASSPATH=$CLASSPATH:$(build-classpath commons-lang plexus/utils) CLASSPATH=$CLASSPATH:../surefire-api/target/surefire-api-%{version}.jar CLASSPATH=$CLASSPATH:$(build-classpath jmock1 junit-3.8.2):target/classes:target/test-classes ant \ -Duser.home=$PWD \ -Dmaven.repo.local=$MAVEN_REPO_LOCAL \ -Dmaven.settings.offline=true \ -Dmaven.settings.interactiveMode=false \ -Dbuild.sysclasspath=first \ jar javadoc popd pushd surefire-providers/surefire-junit # junit-3.8.1 export CLASSPATH="" CLASSPATH=$CLASSPATH:$(build-classpath commons-lang plexus/utils) CLASSPATH=$CLASSPATH:../../surefire-api/target/surefire-api-%{version}.jar CLASSPATH=$CLASSPATH:$(build-classpath jmock1 junit-3.8.2):target/classes:target/test-classes ant \ -Duser.home=$PWD \ -Dmaven.repo.local=$MAVEN_REPO_LOCAL \ -Dmaven.settings.offline=true \ -Dmaven.settings.interactiveMode=false \ -Dbuild.sysclasspath=first \ jar javadoc popd pushd surefire-providers/surefire-junit4 # junit-4.0 export CLASSPATH="" CLASSPATH=$CLASSPATH:$(build-classpath commons-lang plexus/utils) CLASSPATH=$CLASSPATH:../../surefire-api/target/surefire-api-%{version}.jar CLASSPATH=$CLASSPATH:$(build-classpath jmock1 junit45):target/classes:target/test-classes ant \ -Duser.home=$PWD \ -Dmaven.repo.local=$MAVEN_REPO_LOCAL \ -Dmaven.settings.offline=true \ -Dmaven.settings.interactiveMode=false \ -Dbuild.sysclasspath=first \ jar javadoc popd %endif %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" mkdir -p %{buildroot}%{_javadir}/maven-surefire mkdir -p %{buildroot}%{_datadir}/maven2/poms install -m 644 pom.xml \ %{buildroot}%{_datadir}/maven2/poms/JPP-maven-surefire-surefire.pom %add_to_maven_depmap org.apache.maven.surefire surefire %{version} JPP/maven-surefire surefire install -m 644 surefire-api/target/surefire-api-%{version}.jar \ %{buildroot}%{_javadir}/maven-surefire/api-%{version}.jar %add_to_maven_depmap org.apache.maven.surefire surefire-api %{version} JPP/maven-surefire api install -m 644 surefire-api/pom.xml \ %{buildroot}%{_datadir}/maven2/poms/JPP-maven-surefire-api.pom install -m 644 surefire-booter/target/surefire-booter-%{version}.jar \ %{buildroot}%{_javadir}/maven-surefire/booter-%{version}.jar %add_to_maven_depmap org.apache.maven.surefire surefire-booter %{version} JPP/maven-surefire booter install -m 644 surefire-booter/pom.xml \ %{buildroot}%{_datadir}/maven2/poms/JPP-maven-surefire-booter.pom install -m 644 surefire-providers/pom.xml \ %{buildroot}%{_datadir}/maven2/poms/JPP-maven-surefire-providers.pom %add_to_maven_depmap org.apache.maven.surefire surefire-providers %{version} JPP/maven-surefire providers install -m 644 surefire-providers/surefire-junit4/target/surefire-junit4-%{version}.jar \ %{buildroot}%{_javadir}/maven-surefire/junit4-%{version}.jar %add_to_maven_depmap org.apache.maven.surefire surefire-junit4 %{version} JPP/maven-surefire junit4 install -m 644 surefire-providers/surefire-junit4/pom.xml \ %{buildroot}%{_datadir}/maven2/poms/JPP-maven-surefire-junit4.pom install -m 644 surefire-providers/surefire-junit/target/surefire-junit-%{version}.jar \ %{buildroot}%{_javadir}/maven-surefire/junit-%{version}.jar %add_to_maven_depmap org.apache.maven.surefire surefire-junit %{version} JPP/maven-surefire junit install -m 644 surefire-providers/surefire-junit/pom.xml \ %{buildroot}%{_datadir}/maven2/poms/JPP-maven-surefire-junit.pom %if %maven install -m 644 surefire-providers/surefire-testng/target/surefire-testng-%{version}.jar \ %{buildroot}%{_javadir}/maven-surefire/testng-%{version}.jar %add_to_maven_depmap org.apache.maven.surefire surefire-testng %{version} JPP/maven-surefire testng install -m 644 surefire-providers/surefire-testng/pom.xml \ %{buildroot}%{_datadir}/maven2/poms/JPP-maven-surefire-testng.pom install -m 644 maven-surefire-plugin/target/maven-surefire-plugin-%{version}.jar \ %{buildroot}%{_javadir}/maven-surefire/maven-surefire-plugin-%{version}.jar %add_to_maven_depmap org.apache.maven.plugins maven-surefire-plugin %{version} JPP/maven-surefire maven-plugin install -pm 644 maven-surefire-plugin/pom.xml %{buildroot}%{_datadir}/maven2/poms/JPP.maven-surefire-maven-surefire-plugin.pom install -pm 644 maven-surefire-plugin/pom.xml %{buildroot}%{_datadir}/maven2/poms/JPP.maven2.plugins-maven-surefire-plugin.pom install -m 644 maven-surefire-report-plugin/target/maven-surefire-report-plugin-%{version}.jar \ %{buildroot}%{_javadir}/maven-surefire/maven-surefire-report-plugin-%{version}.jar %add_to_maven_depmap org.apache.maven.plugins maven-surefire-report-plugin %{version} JPP/maven-surefire maven-surefire-report-plugin install -m 644 maven-surefire-report-plugin/pom.xml \ %{buildroot}%{_datadir}/maven2/poms/JPP.maven-surefire-maven-surefire-report-plugin.pom mkdir -p %{buildroot}%{_datadir}/maven2/plugins ln -s ../../java/maven-surefire/maven-surefire-plugin.jar %{buildroot}%{_datadir}/maven2/plugins/maven-surefire-plugin.jar ln -s ../../java/maven-surefire/maven-surefire/maven-surefire-report-plugin.jar \ %{buildroot}%{_datadir}/maven2/plugins/maven-surefire-report-plugin.jar %endif ( cd %{buildroot}%{_javadir}/maven-surefire for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"` done ) ( cd %{buildroot}%{_javadir}/maven-surefire ln -sf api.jar surefire.jar ) %if %maven ( cd %{buildroot}%{_datadir}/maven2/plugins for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"` done ) %endif mkdir -p %{buildroot}%{_javadocdir}/maven-surefire cp -pr surefire-api/target/site/apidocs/* %{buildroot}%{_javadocdir}/maven-surefire mkdir -p %{buildroot}%{_javadocdir}/maven-surefire/booter cp -pr surefire-booter/target/site/apidocs/* %{buildroot}%{_javadocdir}/maven-surefire/booter mkdir -p %{buildroot}%{_javadocdir}/maven-surefire/junit4 cp -pr surefire-providers/surefire-junit4/target/site/apidocs/* %{buildroot}%{_javadocdir}/maven-surefire/junit4 mkdir -p %{buildroot}%{_javadocdir}/maven-surefire/junit cp -pr surefire-providers/surefire-junit/target/site/apidocs/* %{buildroot}%{_javadocdir}/maven-surefire/junit %if %maven mkdir -p %{buildroot}%{_javadocdir}/maven-surefire-plugin-%{version} cp -pr maven-surefire-plugin/target/site/apidocs/* %{buildroot}%{_javadocdir}/maven-surefire-plugin-%{version} ln -s maven-surefire-plugin-%{version} %{buildroot}%{_javadocdir}/maven-surefire-plugin mkdir -p %{buildroot}%{_javadocdir}/maven-surefire-report-plugin-%{version} cp -pr maven-surefire-report-plugin/target/site/apidocs/* %{buildroot}%{_javadocdir}/maven-surefire-report-plugin-%{version} ln -s maven-surefire-report-plugin-%{version} %{buildroot}%{_javadocdir}/maven-surefire-report-plugin mkdir -p %{buildroot}%{_javadocdir}/maven-surefire-testng-%{version} cp -pr surefire-providers/surefire-testng/target/site/apidocs/* %{buildroot}%{_javadocdir}/maven-surefire-testng-%{version} ln -s maven-surefire-testng-%{version} %{buildroot}%{_javadocdir}/maven-surefire-testng %endif %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %post %update_maven_depmap %postun %update_maven_depmap %files %defattr(-,root,root) %dir %{_javadir}/maven-surefire %{_javadir}/maven-surefire/api-%{version}.jar %{_javadir}/maven-surefire/api.jar %{_javadir}/maven-surefire/surefire.jar %{_datadir}/maven2/poms %{_mavendepmapfragdir} %files booter %defattr(-,root,root) %{_javadir}/maven-surefire/booter-%{version}.jar %{_javadir}/maven-surefire/booter.jar %files junit4 %defattr(-,root,root) %{_javadir}/maven-surefire/junit4-%{version}.jar %{_javadir}/maven-surefire/junit4.jar %files junit %defattr(-,root,root) %{_javadir}/maven-surefire/junit-%{version}.jar %{_javadir}/maven-surefire/junit.jar %if %maven %files plugin %defattr(-,root,root) %{_datadir}/maven2/plugins/maven-surefire-plugin-%{version}.jar %{_datadir}/maven2/plugins/maven-surefire-plugin.jar %files report-plugin %defattr(-,root,root) %{_datadir}/maven2/plugins/surefire-report-plugin-%{version}.jar %{_datadir}/maven2/plugins/surefire-report-plugin.jar %doc maven-surefire-report-plugin/target/site/unit %files testng %defattr(-,root,root) %{_javadir}/maven-surefire/testng-%{version}.jar %{_javadir}/maven-surefire/testng.jar %endif %files javadoc %defattr(-,root,root) %{_javadocdir}/maven-surefire %changelog * Thu Jul 23 2009 gil 2.4.3-2mamba - rebuilt * Mon Jun 22 2009 gil 2.4.3-1mamba - update to 2.4.3 - maven support * Wed Jun 17 2009 gil 1.5.3-1mamba - package created by autospec