[Jpackage-commits] rpms/free/maven-surefire maven-surefire-2.3-CmdShell.patch, 1.1, NONE maven-surefire-2.3-CommandShell.patch, 1.1, NONE maven-surefire-2.3-Commandline.patch, 1.1, NONE maven-surefire-2.3-ForkConfiguration.patch, 1.1, NONE maven-surefire-2.3-SurefireBooter.patch, 1.1, NONE maven-surefire-2.3-junit4-pom.patch, 1.1, NONE maven-surefire-2.3-providers-pom.patch, 1.1, NONE maven-surefire-2.3-testng-TestNGDirectoryTestSuite.patch, 1.1, NONE maven-surefire-2.3-testng-TestNGXmlTestSuite.patch, 1.1, NONE maven-surefire-booter-build.xml, 1.1, 1.2 maven-surefire-build.xml, 1.1, 1.2 maven-surefire-buildonlyjunit3.patch, NONE, 1.1 maven-surefire-jpp-depmap.xml, 1.2, 1.3 maven-surefire-plexus12.patch, NONE, 1.1 maven-surefire-plugin.xml, 1.1, NONE maven-surefire-report-plugin.xml, 1.1, NONE maven-surefire-settings.xml, 1.2, NONE maven-surefire.spec, 1.2, 1.3

jpackage jpackage at ryu.zarb.org
Thu Mar 5 07:59:20 CET 2009


Update of /home/projects/jpackage/cvs/rpms/free/maven-surefire
In directory ryu.zarb.org:/tmp/g6mIbMnbqr/rpms/free/maven-surefire

Modified Files:
	maven-surefire-jpp-depmap.xml maven-surefire.spec 
Added Files:
	maven-surefire-booter-build.xml maven-surefire-build.xml 
	maven-surefire-buildonlyjunit3.patch 
	maven-surefire-plexus12.patch 
Removed Files:
	maven-surefire-2.3-CmdShell.patch 
	maven-surefire-2.3-CommandShell.patch 
	maven-surefire-2.3-Commandline.patch 
	maven-surefire-2.3-ForkConfiguration.patch 
	maven-surefire-2.3-SurefireBooter.patch 
	maven-surefire-2.3-junit4-pom.patch 
	maven-surefire-2.3-providers-pom.patch 
	maven-surefire-2.3-testng-TestNGDirectoryTestSuite.patch 
	maven-surefire-2.3-testng-TestNGXmlTestSuite.patch 
	maven-surefire-plugin.xml maven-surefire-report-plugin.xml 
	maven-surefire-settings.xml 
Log Message:
2.3-2.jpp6

--- maven-surefire-2.3-testng-TestNGDirectoryTestSuite.patch DELETED ---

--- maven-surefire-plugin.xml DELETED ---

--- maven-surefire-2.3-CommandShell.patch DELETED ---

--- NEW FILE: maven-surefire-plexus12.patch ---
--- ./surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkConfiguration.java.sav	2007-06-19 14:21:38.000000000 -0400
+++ ./surefire-booter/src/main/java/org/apache/maven/surefire/booter/ForkConfiguration.java	2007-06-19 14:23:10.000000000 -0400
@@ -24,6 +24,7 @@ import org.codehaus.plexus.archiver.jar.
 import org.codehaus.plexus.archiver.jar.Manifest;
 import org.codehaus.plexus.archiver.jar.ManifestException;
 import org.codehaus.plexus.util.StringUtils;
+import org.codehaus.plexus.util.cli.Commandline; 
 
 import java.io.File;
 import java.io.IOException;
--- ./surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooter.java.sav	2007-06-19 14:23:20.000000000 -0400
+++ ./surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooter.java	2007-06-19 14:23:48.000000000 -0400
@@ -31,6 +31,7 @@ import org.apache.maven.surefire.util.Ne
 import org.apache.maven.surefire.util.UrlUtils;
 import org.codehaus.plexus.util.IOUtil;
 import org.codehaus.plexus.util.StringUtils;
+import org.codehaus.plexus.util.cli.Commandline;
 import org.codehaus.plexus.util.cli.CommandLineException;
 import org.codehaus.plexus.util.cli.CommandLineUtils;
 import org.codehaus.plexus.util.cli.StreamConsumer;

--- maven-surefire-settings.xml DELETED ---

--- maven-surefire-2.3-CmdShell.patch DELETED ---

--- NEW FILE: maven-surefire-booter-build.xml ---
<project name="surefire-booter" default="jar" basedir=".">
  <property file="${user.home}/.m2/maven.properties"/>
  <property name="maven.build.output" value="target/classes"/>
  <property name="maven.build.directory" value="target"/>
  <property name="maven.build.final.name" value="surefire-booter-1.5.3"/>
  <property name="maven.test.reports" value="${maven.build.directory}/test-reports"/>
  <property name="maven.test.output" value="target/test-classes"/>
  <property name="maven.repo.local" value="${user.home}/.m2/repository"/>
  <path id="build.classpath">
    <fileset dir="../lib">
      <include name="junit.jar"/>
      <include name="classworlds.jar"/>
      <include name="surefire.jar"/>
      <include name="plexus_utils.jar"/>
    </fileset>
  </path>
  <target name="clean" description="Clean the output directory">
    <delete dir="${maven.build.directory}"/>
  </target>
  <target name="compile" depends="get-deps" description="Compile the code">
    <mkdir dir="${maven.build.output}"/>
    <javac destdir="${maven.build.output}" excludes="**/package.html" debug="true" deprecation="true" optimize="false">
      <src>
        <pathelement location="src/main/java"/>
      </src>
      <classpath refid="build.classpath"/>
    </javac>
  </target>
  <target name="jar" depends="compile" description="Clean the JAR">
    <jar jarfile="${maven.build.directory}/${maven.build.final.name}.jar" basedir="${maven.build.output}" excludes="**/package.html"/>
  </target>
  <target name="compile-tests" depends="junit-present, compile" description="Compile the test code" if="junit.present">
    <mkdir dir="${maven.test.output}"/>
  </target>
  <target name="test" depends="junit-present, compile-tests" if="junit.present" description="Run the test cases"/>
  <target name="test-junit-present">
    <available classname="junit.framework.Test" property="junit.present"/>
  </target>
  <target name="junit-present" depends="test-junit-present" unless="junit.present">
    <echo>================================= WARNING ================================</echo>
    <echo> Junit isn't present in your $ANT_HOME/lib directory. Tests not executed. </echo>
    <echo>==========================================================================</echo>
  </target>
  <target name="test-offline">
    <condition property="maven.mode.offline">
      <equals arg1="${build.sysclasspath}" arg2="only"/>
    </condition>
  </target>
  <target name="get-deps" depends="test-offline" description="Download all dependencies" unless="maven.mode.offline">
    <mkdir dir="${maven.repo.local}"/>
    <mkdir dir="/home/dbhole/DIST/maven-surefire/surefire-booter/junit/junit/3.8.1"/>
    <get src="http://snapshots.maven.codehaus.org/maven2/junit/junit/3.8.1/junit-3.8.1.jar" dest="${maven.repo.local}/junit/junit/3.8.1/junit-3.8.1.jar" usetimestamp="true" ignoreerrors="true"/>
    <get src="http://repo1.maven.org/maven2/junit/junit/3.8.1/junit-3.8.1.jar" dest="${maven.repo.local}/junit/junit/3.8.1/junit-3.8.1.jar" usetimestamp="true" ignoreerrors="true"/>
    <mkdir dir="/home/dbhole/DIST/maven-surefire/surefire-booter/classworlds/classworlds/1.1-alpha-2"/>
    <get src="http://snapshots.maven.codehaus.org/maven2/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar" dest="${maven.repo.local}/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar" usetimestamp="true" ignoreerrors="true"/>
    <get src="http://repo1.maven.org/maven2/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar" dest="${maven.repo.local}/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar" usetimestamp="true" ignoreerrors="true"/>
    <mkdir dir="/home/dbhole/DIST/maven-surefire/surefire-booter/org/apache/maven/surefire/surefire/1.5.2"/>
    <get src="http://snapshots.maven.codehaus.org/maven2/org/apache/maven/surefire/surefire/1.5.2/surefire-1.5.2.jar" dest="${maven.repo.local}/org/apache/maven/surefire/surefire/1.5.2/surefire-1.5.2.jar" usetimestamp="true" ignoreerrors="true"/>
    <get src="http://repo1.maven.org/maven2/org/apache/maven/surefire/surefire/1.5.2/surefire-1.5.2.jar" dest="${maven.repo.local}/org/apache/maven/surefire/surefire/1.5.2/surefire-1.5.2.jar" usetimestamp="true" ignoreerrors="true"/>
    <mkdir dir="/home/dbhole/DIST/maven-surefire/surefire-booter/org/codehaus/plexus/plexus-utils/1.0.5"/>
    <get src="http://snapshots.maven.codehaus.org/maven2/org/codehaus/plexus/plexus-utils/1.0.5/plexus-utils-1.0.5.jar" dest="${maven.repo.local}/org/codehaus/plexus/plexus-utils/1.0.5/plexus-utils-1.0.5.jar" usetimestamp="true" ignoreerrors="true"/>
    <get src="http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils/1.0.5/plexus-utils-1.0.5.jar" dest="${maven.repo.local}/org/codehaus/plexus/plexus-utils/1.0.5/plexus-utils-1.0.5.jar" usetimestamp="true" ignoreerrors="true"/>
  </target>
</project>

--- NEW FILE: maven-surefire-build.xml ---
<project name="surefire" default="jar" basedir=".">
  <property file="${user.home}/.m2/maven.properties"/>
  <property name="maven.build.output" value="target/classes"/>
  <property name="maven.build.directory" value="target"/>
  <property name="maven.build.final.name" value="surefire-1.5.3"/>
  <property name="maven.test.reports" value="${maven.build.directory}/test-reports"/>
  <property name="maven.test.output" value="target/test-classes"/>
  <property name="maven.repo.local" value="${user.home}/.m2/repository"/>
  <path id="build.classpath">
    <fileset dir="../lib">
      <include name="junit.jar"/>
      <include name="classworlds.jar"/>
      <include name="plexus_utils.jar"/>
    </fileset>
  </path>
  <target name="clean" description="Clean the output directory">
    <delete dir="${maven.build.directory}"/>
  </target>
  <target name="compile" depends="get-deps" description="Compile the code">
    <mkdir dir="${maven.build.output}"/>
    <javac destdir="${maven.build.output}" excludes="**/package.html" debug="true" deprecation="true" optimize="false">
      <src>
        <pathelement location="src/main/java"/>
      </src>
      <classpath refid="build.classpath"/>
    </javac>
    <copy todir="${maven.build.output}">
      <fileset dir="src/main/resources"/>
    </copy>
  </target>
  <target name="jar" depends="compile" description="Clean the JAR">
    <jar jarfile="${maven.build.directory}/${maven.build.final.name}.jar" basedir="${maven.build.output}" excludes="**/package.html"/>
  </target>
  <target name="compile-tests" depends="junit-present, compile" description="Compile the test code" if="junit.present">
    <mkdir dir="${maven.test.output}"/>
    <javac destdir="${maven.test.output}" excludes="**/package.html" debug="true" deprecation="true" optimize="false">
      <src>
        <pathelement location="src/test/java"/>
      </src>
      <classpath>
        <path refid="build.classpath"/>
        <pathelement location="${maven.build.output}"/>
      </classpath>
    </javac>
  </target>
  <target name="test" depends="junit-present, compile-tests" if="junit.present" description="Run the test cases">
    <mkdir dir="${maven.test.reports}"/>
    <junit printSummary="yes" haltonerror="true" haltonfailure="true" fork="true" dir=".">
      <sysproperty key="basedir" value="."/>
      <formatter type="xml"/>
      <formatter type="plain" usefile="false"/>
      <classpath>
        <path refid="build.classpath"/>
        <pathelement location="${maven.build.output}"/>
        <pathelement location="${maven.test.output}"/>
      </classpath>
      <batchtest todir="${maven.test.reports}">
        <fileset dir="src/test/java">
          <include name="**/*Test.java"/>
          <exclude name="**/*Abstract*Test.java"/>
        </fileset>
      </batchtest>
    </junit>
  </target>
  <target name="test-junit-present">
    <available classname="junit.framework.Test" property="junit.present"/>
  </target>
  <target name="junit-present" depends="test-junit-present" unless="junit.present">
    <echo>================================= WARNING ================================</echo>
    <echo> Junit isn't present in your $ANT_HOME/lib directory. Tests not executed. </echo>
    <echo>==========================================================================</echo>
  </target>
  <target name="test-offline">
    <condition property="maven.mode.offline">
      <equals arg1="${build.sysclasspath}" arg2="only"/>
    </condition>
  </target>
  <target name="get-deps" depends="test-offline" description="Download all dependencies" unless="maven.mode.offline">
    <mkdir dir="${maven.repo.local}"/>
    <mkdir dir="/home/dbhole/DIST/maven-surefire/surefire/junit/junit/3.8.1"/>
    <get src="http://snapshots.maven.codehaus.org/maven2/junit/junit/3.8.1/junit-3.8.1.jar" dest="${maven.repo.local}/junit/junit/3.8.1/junit-3.8.1.jar" usetimestamp="true" ignoreerrors="true"/>
    <get src="http://repo1.maven.org/maven2/junit/junit/3.8.1/junit-3.8.1.jar" dest="${maven.repo.local}/junit/junit/3.8.1/junit-3.8.1.jar" usetimestamp="true" ignoreerrors="true"/>
    <mkdir dir="/home/dbhole/DIST/maven-surefire/surefire/classworlds/classworlds/1.1-alpha-2"/>
    <get src="http://snapshots.maven.codehaus.org/maven2/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar" dest="${maven.repo.local}/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar" usetimestamp="true" ignoreerrors="true"/>
    <get src="http://repo1.maven.org/maven2/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar" dest="${maven.repo.local}/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar" usetimestamp="true" ignoreerrors="true"/>
    <mkdir dir="/home/dbhole/DIST/maven-surefire/surefire/org/codehaus/plexus/plexus-utils/1.0.5"/>
    <get src="http://snapshots.maven.codehaus.org/maven2/org/codehaus/plexus/plexus-utils/1.0.5/plexus-utils-1.0.5.jar" dest="${maven.repo.local}/org/codehaus/plexus/plexus-utils/1.0.5/plexus-utils-1.0.5.jar" usetimestamp="true" ignoreerrors="true"/>
    <get src="http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils/1.0.5/plexus-utils-1.0.5.jar" dest="${maven.repo.local}/org/codehaus/plexus/plexus-utils/1.0.5/plexus-utils-1.0.5.jar" usetimestamp="true" ignoreerrors="true"/>
  </target>
</project>

--- maven-surefire-report-plugin.xml DELETED ---

Index: maven-surefire-jpp-depmap.xml
===================================================================
RCS file: /home/projects/jpackage/cvs/rpms/free/maven-surefire/maven-surefire-jpp-depmap.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -C 2 -d -r1.2 -r1.3
*** maven-surefire-jpp-depmap.xml	26 Jan 2008 13:24:55 -0000	1.2
--- maven-surefire-jpp-depmap.xml	5 Mar 2009 06:59:18 -0000	1.3
***************
*** 2,64 ****
    <dependency>
  	<maven>
- 	  <groupId>junit</groupId>
- 	  <artifactId>junit4</artifactId>
- 	  <version>4.0</version>
- 	</maven>
- 	<jpp>
- 	  <groupId>JPP</groupId>
- 	  <artifactId>junit4</artifactId>
- 	  <version>4.3.1</version>
- 	</jpp>
-   </dependency>
-   <dependency>
- 	<maven>
- 	  <groupId>junit</groupId>
- 	  <artifactId>junit</artifactId>
- 	  <version>3.8.1</version>
- 	</maven>
- 	<jpp>
- 	  <groupId>JPP</groupId>
- 	  <artifactId>junit</artifactId>
- 	  <version>3.8.2</version>
- 	</jpp>
-   </dependency>
-   <dependency>
- 	<maven>
- 	  <groupId>org.testng</groupId>
- 	  <artifactId>testng</artifactId>
- 	  <version>5.1</version>
- 	</maven>
- 	<jpp>
- 	  <groupId>JPP</groupId>
- 	  <artifactId>testng-jdk15</artifactId>
- 	  <version>5.6</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>jmock</groupId>
  	  <artifactId>jmock</artifactId>
  	  <version>1.0.1</version>
  	</maven>
- 	<jpp>
- 	  <groupId>JPP</groupId>
- 	  <artifactId>jmock</artifactId>
- 	  <version>1.2.0</version>
- 	</jpp>
    </dependency>
! <!--
! -->
  </dependencies>
--- 2,23 ----
    <dependency>
  	<maven>
  	  <groupId>jmock</groupId>
  	  <artifactId>jmock</artifactId>
  	  <version>1.0.1</version>
  	</maven>
    </dependency>
!     
!     <dependency>
!         <maven>
!             <groupId>org.apache.maven</groupId>
!             <artifactId>maven-parent</artifactId>
!             <version>5</version>
!         </maven>
!         <jpp>
!             <groupId>JPP/maven2</groupId>
!             <artifactId>parent</artifactId>
!             <version>1</version>
!         </jpp>
!     </dependency>
! 
  </dependencies>

Index: maven-surefire.spec
===================================================================
RCS file: /home/projects/jpackage/cvs/rpms/free/maven-surefire/maven-surefire.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -C 2 -d -r1.2 -r1.3
*** maven-surefire.spec	26 Jan 2008 13:24:55 -0000	1.2
--- maven-surefire.spec	5 Mar 2009 06:59:18 -0000	1.3
***************
*** 1,3 ****
! # Copyright (c) 2000-2008, JPackage Project
  # All rights reserved.
  #
--- 1,3 ----
! # Copyright (c) 2000-2005, JPackage Project
  # All rights reserved.
  #
***************
*** 29,506 ****
  #
  
! %define section   free
  
  # 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}
  
- %define maven_settings_file %{_builddir}/%{name}/settings.xml
- 
  Name:           maven-surefire
  Version:        2.3
! Release:        1jpp
  Epoch:          0
! Summary:        Surefire is a test framework project.
  License:        Apache Software License
  Group:          Development/Java
- Vendor:         JPackage Project
- Distribution:   JPackage
  URL:            http://maven.apache.org/surefire/
- Source0:        %{name}-%{version}.tar.gz
- # svn export http://svn.apache.org/repos/asf/maven/surefire/tags/surefire-2.3 maven-surefire-2.3
- Source1:        %{name}-settings.xml
- Source2:        %{name}-jpp-depmap.xml
- Source3:        %{name}-build.tar.gz
- Source4:        %{name}-plugin.xml
- Source5:        %{name}-report-plugin.xml
  
! Patch0:         maven-surefire-2.3-Commandline.patch
! Patch1:         maven-surefire-2.3-CommandShell.patch
! Patch2:         maven-surefire-2.3-CmdShell.patch
! Patch3:         maven-surefire-2.3-junit4-pom.patch
! Patch4:         maven-surefire-2.3-testng-TestNGXmlTestSuite.patch
! Patch5:         maven-surefire-2.3-testng-TestNGDirectoryTestSuite.patch
! Patch6:         maven-surefire-2.3-providers-pom.patch
! Patch7:         maven-surefire-2.3-ForkConfiguration.patch
! Patch8:         maven-surefire-2.3-SurefireBooter.patch
  
! BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot
  
  BuildArch:      noarch
! BuildRequires:  jpackage-utils >= 0:1.7.4
! BuildRequires:  java-devel = 0:1.5.0
! BuildRequires:  ant >= 0:1.6.5
! BuildRequires:  ant-junit
  BuildRequires:  ant-nodeps
  BuildRequires:  classworlds
! BuildRequires:  jmock
  BuildRequires:  junit >= 3.8.2
- BuildRequires:  junit4
- BuildRequires:  maven2-bootstrap
- BuildRequires:  maven-shared-reporting-impl
- BuildRequires:  maven-shared-plugin-testing-harness
- BuildRequires:  plexus-archiver
  BuildRequires:  plexus-utils
- BuildRequires:  testng
  
  %if %{with_maven}
! BuildRequires:  maven2 >= 0:2.0.7
! BuildRequires:  maven2-plugin-ant
  BuildRequires:  maven2-plugin-compiler
  BuildRequires:  maven2-plugin-install
  BuildRequires:  maven2-plugin-jar
  BuildRequires:  maven2-plugin-javadoc
- BuildRequires:  maven2-plugin-plugin
  BuildRequires:  maven2-plugin-resources
! BuildRequires:  maven2-plugin-site
! BuildRequires:  maven2-plugin-surefire
! BuildRequires:  maven2-common-poms >= 0:1.0-3
  %endif
  
  Requires:       classworlds
! Requires:       plexus-utils
  Requires:       junit
  
! Requires(post):    jpackage-utils >= 0:1.7.4
! Requires(postun):  jpackage-utils >= 0:1.7.4
! 
! %description
! Surefire is a test framework project.
  
! %package booter
! Summary:         Booter for %{name}
! Group:           Development/Java
! Requires:        %{name} = %{epoch}:%{version}-%{release}
! Requires:        plexus-archiver
! Requires:        plexus-containers-component-api
! Requires:        plexus-utils
  
! %description booter
! %{summary}.
  
! %package junit
! Summary:         JUnit3 Runner for %{name}
! Group:           Development/Java
! Requires:        %{name} = %{epoch}:%{version}-%{release}
! Requires:        junit
  
! %description junit
! %{summary}.
  
! %package junit4
! Summary:         JUnit4 Runner for %{name}
! Group:           Development/Java
! Requires:        %{name} = %{epoch}:%{version}-%{release}
! Requires:        junit4
  
! %description junit4
! %{summary}.
  
! %package testng
! Summary:         TestNG Runner for %{name}
! Group:           Development/Java
! Requires:        %{name} = %{epoch}:%{version}-%{release}
! Requires:        plexus-utils
! Requires:        testng
  
! %description testng
! %{summary}.
  
! %package plugin
! Summary:         Maven2 Plugin for %{name}
! Group:           Development/Java
! Requires:        %{name} = %{epoch}:%{version}-%{release}
! Requires:        %{name}-booter = %{epoch}:%{version}-%{release}
! Requires:        %{name}-junit = %{epoch}:%{version}-%{release}
! Requires:        %{name}-junit4 = %{epoch}:%{version}-%{release}
! Requires:        %{name}-testng = %{epoch}:%{version}-%{release}
! Requires:        maven2-bootstrap
! Requires:        plexus-utils
! Obsoletes:       maven2-plugin-surefire < 0:2.0.7
! Provides:        maven2-plugin-surefire = %{epoch}:%{version}-%{release}
  
! %description plugin
! %{summary}.
  
! %package report-plugin
! Summary:         Maven2 Report Plugin for %{name}
! Group:           Development/Java
! Requires:        %{name} = %{epoch}:%{version}-%{release}
! Requires:        %{name}-booter = %{epoch}:%{version}-%{release}
! Requires:        maven2-bootstrap
! Requires:        maven-doxia
! Requires:        plexus-utils
! Obsoletes:       maven2-plugin-surefire-report < 0:2.0.7
! Provides:        maven2-plugin-surefire-report = %{epoch}:%{version}-%{release}
  
! %description report-plugin
! %{summary}.
  
  %package javadoc
! Summary:        Javadoc for %{name} API
! Group:          Development/Documentation
  Requires(post):   /bin/rm,/bin/ln
  Requires(postun): /bin/rm
  
  %description javadoc
! %{summary}.
  
! %package booter-javadoc
! Summary:        Javadoc for %{name} Booter
! Group:          Development/Documentation
! Requires(post):   /bin/rm,/bin/ln
! Requires(postun): /bin/rm
  
! %description booter-javadoc
! %{summary}.
  
! %package junit-javadoc
! Summary:        Javadoc for %{name} JUnit3 Runner
! Group:          Development/Documentation
! Requires(post):   /bin/rm,/bin/ln
! Requires(postun): /bin/rm
  
! %description junit-javadoc
! %{summary}.
  
- %package junit4-javadoc
- Summary:        Javadoc for %{name} JUnit4 Runner
- Group:          Development/Documentation
- Requires(post):   /bin/rm,/bin/ln
- Requires(postun): /bin/rm
  
- %description junit4-javadoc
- %{summary}.
  
! %package testng-javadoc
! Summary:        Javadoc for %{name} TestNG Runner
! Group:          Development/Documentation
! Requires(post):   /bin/rm,/bin/ln
! Requires(postun): /bin/rm
  
! %description testng-javadoc
! %{summary}.
  
! %prep
! %setup -q
! 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
! sed -i -e "s|<url>__MAVENDIR_PLUGIN_PLACEHOLDER__</url>|<url>file:///usr/share/maven2/plugins</url>|g" settings.xml
! sed -i -e "s|<url>__ECLIPSEDIR_PLUGIN_PLACEHOLDER__</url>|<url>file:///usr/share/eclipse/plugins</url>|g" settings.xml
  
! gzip -dc %{SOURCE3} | tar xf -
  
! sed -i -e s:"private static void failSame(":"public static void failSame(":g \
!     surefire-api/src/main/java/org/apache/maven/surefire/assertion/SurefireAssert.java
! sed -i -e s:"private static void failNotSame(":"public static void failNotSame(":g \
!     surefire-api/src/main/java/org/apache/maven/surefire/assertion/SurefireAssert.java
! sed -i -e s:"private static void failNotEquals(":"public static void failNotEquals(":g \
!     surefire-api/src/main/java/org/apache/maven/surefire/assertion/SurefireAssert.java
! %patch0 -b .sav0
! %patch1 -b .sav1
! %patch2 -b .sav2
! %patch3 -b .sav3
! %patch4 -b .sav4
! %patch5 -b .sav4
! %patch6 -b .sav6
! %patch7 -b .sav7
! %patch8 -b .sav8
  
! for i in \
!     maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java \
!     maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportMojo.java; do
  
!         sed -i -e s:org.codehaus.doxia.sink.Sink:org.apache.maven.doxia.sink.Sink:g $i
!         sed -i -e s:org.codehaus.doxia.site.renderer.SiteRenderer:org.apache.maven.doxia.siterenderer.Renderer:g $i
!         sed -i -r -e s:\(\\s+\)SiteRenderer\(\\s+\):\\1Renderer\\2:g $i
! done
  
  
- %build
- export JAVA_HOME=%{_jvmdir}/java-1.5.0
  %if %{with_maven}
! export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
! mkdir -p $MAVEN_REPO_LOCAL
! rm -rf surefire-api/src/test
! rm -rf surefire-booter/src/test
! rm -rf maven-surefire-report-plugin/src/test
! mvn-jpp \
          -e \
-         -s settings.xml \
-         -Dmaven.test.failure.ignore=true \
          -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
!         -Dmaven2.jpp.depmap.file=%{SOURCE2} \
!         ant:ant install javadoc:javadoc
  %else
! export CLASSPATH=$(build-classpath \
! commons-lang \
! plexus/utils \
! )
! CLASSPATH=$CLASSPATH:target/classes:target/test-classes
! pushd surefire-api
! ant -Dbuild.sysclasspath=only jar javadoc
! popd
! export CLASSPATH=$(build-classpath \
! plexus/archiver \
! plexus/containers-component-api \
! plexus/utils \
! )
! CLASSPATH=$CLASSPATH:$(pwd)/surefire-api/target/surefire-api-%{version}.jar
! CLASSPATH=$CLASSPATH:target/classes:target/test-classes
! pushd surefire-booter
! ant -Dbuild.sysclasspath=only jar javadoc
! popd
! export CLASSPATH=$(build-classpath \
! junit \
! )
! CLASSPATH=$CLASSPATH:$(pwd)/surefire-api/target/surefire-api-%{version}.jar
! CLASSPATH=$CLASSPATH:target/classes:target/test-classes
! pushd surefire-providers/surefire-junit
! ant -Dbuild.sysclasspath=only jar javadoc
! popd
! export CLASSPATH=$(build-classpath \
! junit4 \
! )
! CLASSPATH=$CLASSPATH:$(pwd)/surefire-api/target/surefire-api-%{version}.jar
! CLASSPATH=$CLASSPATH:target/classes:target/test-classes
! pushd surefire-providers/surefire-junit4
! ant -Dbuild.sysclasspath=only jar javadoc
! popd
! export CLASSPATH=$(build-classpath \
! plexus/utils \
! testng-jdk15 \
! )
! CLASSPATH=$CLASSPATH:$(pwd)/surefire-api/target/surefire-api-%{version}.jar
! CLASSPATH=$CLASSPATH:target/classes:target/test-classes
! pushd surefire-providers/surefire-testng
! ant -Dbuild.sysclasspath=only jar javadoc
! popd
! export CLASSPATH=$(build-classpath \
! maven2/artifact \
! maven2/artifact-manager \
! maven2/plugin-api \
! plexus/utils \
! )
! CLASSPATH=$CLASSPATH:$(pwd)/surefire-api/target/surefire-api-%{version}.jar
! CLASSPATH=$CLASSPATH:$(pwd)/surefire-booter/target/surefire-booter-%{version}.jar
! CLASSPATH=$CLASSPATH:target/classes:target/test-classes
! pushd maven-surefire-plugin
! mkdir -p target/classes/META-INF/maven/org.apache.maven.plugins/maven-surefire-plugin/
! cp pom.xml target/classes/META-INF/maven/org.apache.maven.plugins/maven-surefire-plugin/
! cp %{SOURCE4} target/classes/META-INF/maven/plugin.xml
! cat > target/classes/META-INF/maven/org.apache.maven.plugins/maven-surefire-plugin/pom.properties <<EOT
! version=2.3
! groupId=org.apache.maven.plugins
! artifactId=maven-surefire-plugin
! EOT
! ant -Dbuild.sysclasspath=only jar
! popd
! export CLASSPATH=$(build-classpath \
! maven2/artifact \
! maven2/model \
! maven2/plugin-api \
! maven2/project \
! maven2/reporting-api \
! maven2/reporting-impl \
! maven-doxia/sink \
! maven-doxia/site-renderer \
! maven-shared/reporting-impl \
! plexus/utils \
! )
! CLASSPATH=$CLASSPATH:$(pwd)/surefire-api/target/surefire-api-%{version}.jar
! CLASSPATH=$CLASSPATH:$(pwd)/surefire-booter/target/surefire-booter-%{version}.jar
! CLASSPATH=$CLASSPATH:target/classes:target/test-classes
! pushd maven-surefire-report-plugin
! mkdir -p target/classes/META-INF/maven/org.apache.maven.plugins/maven-surefire-report-plugin/
! cp pom.xml target/classes/META-INF/maven/org.apache.maven.plugins/maven-surefire-report-plugin/
! cp %{SOURCE5} target/classes/META-INF/maven/plugin.xml
! cat > target/classes/META-INF/maven/org.apache.maven.plugins/maven-surefire-report-plugin/pom.properties <<EOT
! version=2.3
! groupId=org.apache.maven.plugins
! artifactId=maven-surefire-report-plugin
! EOT
! ant -Dbuild.sysclasspath=only jar
! popd
  %endif
  
- 
  %install
  rm -rf $RPM_BUILD_ROOT
  # jars
  install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/maven-surefire
- install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/plugins
  install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
  
! install -m 644 pom.xml \
!     $RPM_BUILD_ROOT%{_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 \
!     $RPM_BUILD_ROOT%{_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 \
!     $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.maven-surefire-api.pom
  
! install -m 644 surefire-booter/target/surefire-booter-%{version}.jar \
!     $RPM_BUILD_ROOT%{_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 \
!     $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.maven-surefire-booter.pom
  
! install -m 644 surefire-providers/pom.xml \
!     $RPM_BUILD_ROOT%{_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 \
!     $RPM_BUILD_ROOT%{_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 \
!     $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.maven-surefire-junit4.pom
  
! install -m 644 surefire-providers/surefire-junit/target/surefire-junit-%{version}.jar \
!     $RPM_BUILD_ROOT%{_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 \
!     $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.maven-surefire-junit.pom
  
! install -m 644 surefire-providers/surefire-testng/target/surefire-testng-%{version}.jar \
!     $RPM_BUILD_ROOT%{_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 \
!     $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.maven-surefire-testng.pom
  
  
! install -m 644 maven-surefire-plugin/target/maven-surefire-plugin-%{version}.jar \
!     $RPM_BUILD_ROOT%{_datadir}/maven2/plugins/surefire-plugin-%{version}.jar
! %add_to_maven_depmap org.apache.maven.plugins maven-surefire-plugin %{version} JPP/maven2/plugins surefire-plugin
! install -m 644 maven-surefire-plugin/pom.xml \
!     $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.maven2.plugins-surefire-plugin.pom
  
! install -m 644 maven-surefire-report-plugin/target/maven-surefire-report-plugin-%{version}.jar \
!     $RPM_BUILD_ROOT%{_datadir}/maven2/plugins/surefire-report-plugin-%{version}.jar
! %add_to_maven_depmap org.apache.maven.plugins maven-surefire-report-plugin %{version} JPP/maven2/plugins surefire-report-plugin
! install -m 644 maven-surefire-report-plugin/pom.xml \
!     $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.maven2.plugins-surefire-report-plugin.pom
  
  
! (cd $RPM_BUILD_ROOT%{_javadir}/maven-surefire && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)
! (cd $RPM_BUILD_ROOT%{_javadir}/maven-surefire && ln -sf api.jar surefire.jar)
! (cd $RPM_BUILD_ROOT%{_datadir}/maven2/plugins && for jar in *-%{version}*; do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)
  
! # javadoc
  
! install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-api-%{version}
! cp -pr surefire-api/target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-api-%{version}
! ln -s %{name}-api-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}-api # ghost symlink
! install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-booter-%{version}
! cp -pr surefire-booter/target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-booter-%{version}
! ln -s %{name}-booter-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}-booter # ghost symlink
! install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-junit4-%{version}
! cp -pr surefire-providers/surefire-junit4/target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-junit4-%{version}
! ln -s %{name}-junit4-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}-junit4 # ghost symlink
! install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-junit-%{version}
! cp -pr surefire-providers/surefire-junit/target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-junit-%{version}
! ln -s %{name}-junit-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}-junit # ghost symlink
! install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-testng-%{version}
! cp -pr surefire-providers/surefire-testng/target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-testng-%{version}
! ln -s %{name}-testng-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}-testng # ghost symlink
  
  %clean
  rm -rf $RPM_BUILD_ROOT
  
  %post
- %update_maven_depmap
  
- %postun
  %update_maven_depmap
  
! %post javadoc
! rm -f %{_javadocdir}/maven-surefire-api
! ln -s maven-surefire-api-%{version} %{_javadocdir}/maven-surefire-api
! 
! %post booter-javadoc
! rm -f %{_javadocdir}/maven-surefire-booter
! ln -s maven-surefire-booter-%{version} %{_javadocdir}/maven-surefire-booter
! 
! %post junit-javadoc
! rm -f %{_javadocdir}/maven-surefire-junit
! ln -s maven-surefire-junit-%{version} %{_javadocdir}/maven-surefire-junit
! 
! %post junit4-javadoc
! rm -f %{_javadocdir}/maven-surefire-junit4
! ln -s maven-surefire-junit4-%{version} %{_javadocdir}/maven-surefire-junit4
! 
! %post testng-javadoc
! rm -f %{_javadocdir}/maven-surefire-testng
! ln -s maven-surefire-testng-%{version} %{_javadocdir}/maven-surefire-testng
! 
! %postun javadoc
! if [ "$1" = "0" ]; then
!   rm -f %{_javadocdir}/maven-surefire-api
  fi
  
! %postun booter-javadoc
! if [ "$1" = "0" ]; then
!   rm -f %{_javadocdir}/maven-surefire-booter
  fi
  
! %postun junit-javadoc
! if [ "$1" = "0" ]; then
!   rm -f %{_javadocdir}/maven-surefire-junit
! fi
  
! %postun junit4-javadoc
! if [ "$1" = "0" ]; then
!   rm -f %{_javadocdir}/maven-surefire-junit4
! fi
  
! %postun testng-javadoc
! if [ "$1" = "0" ]; then
!   rm -f %{_javadocdir}/maven-surefire-junit4
  fi
  
  %files
--- 29,337 ----
  #
  
! %define _with_gcj_support 1
! %define gcj_support %{?_with_gcj_support:1}%{!?_with_gcj_support:%{?_without_gcj_support:0}%{!?_without_gcj_support:%{?_gcj_support:%{_gcj_support}}%{!?_gcj_support:0}}}
! %define 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}
  
  Name:           maven-surefire
  Version:        2.3
! Release:        2%{?dist}
  Epoch:          0
! Summary:        Test framework project
  License:        Apache Software License
  Group:          Development/Java
  URL:            http://maven.apache.org/surefire/
  
! # svn export
! #    http://svn.apache.org/repos/asf/maven/surefire/tags/surefire-2.3 maven-surefire
! # tar czf surefire-2.3-tar.gz maven-surefire/
! Source0:        %{name}-%{version}-src.tar.gz
! #Source1:        %{name}-settings.xml
! Source2:        %{name}-build.xml
! Source3:        %{name}-booter-build.xml
! Source4:        %{name}-jpp-depmap.xml
  
! Patch0:         %{name}-plexus12.patch
! Patch1:         %{name}-buildonlyjunit3.patch
  
+ BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+ 
+ %if ! %{gcj_support}
  BuildArch:      noarch
! %endif
! BuildRequires:  ant
  BuildRequires:  ant-nodeps
  BuildRequires:  classworlds
! BuildRequires:  jpackage-utils >= 0:1.7.2
  BuildRequires:  junit >= 3.8.2
  BuildRequires:  plexus-utils
  
  %if %{with_maven}
! BuildRequires:  maven2 >= 2.0.4
! #BuildRequires:  maven2-common-poms
  BuildRequires:  maven2-plugin-compiler
  BuildRequires:  maven2-plugin-install
  BuildRequires:  maven2-plugin-jar
  BuildRequires:  maven2-plugin-javadoc
  BuildRequires:  maven2-plugin-resources
! BuildRequires:	maven2-plugin-site
! BuildRequires:  maven2-plugin-plugin
! BuildRequires:  plexus-containers-component-api >= 1.0-0.a34
! BuildRequires:  tomcat5
! BuildRequires:  tomcat5-servlet-2.4-api
! BuildRequires:  excalibur-avalon-logkit
! BuildRequires:  excalibur-avalon-framework
  %endif
  
  Requires:       classworlds
! Requires:       maven2
  Requires:       junit
+ Requires:       plexus-utils
  
! Requires(post):    jpackage-utils >= 0:1.7.2
! Requires(postun):  jpackage-utils >= 0:1.7.2
  
! %if %{gcj_support}
! BuildRequires:          java-gcj-compat-devel
! Requires(post):         java-gcj-compat
! Requires(postun):       java-gcj-compat
! %endif
  
! Obsoletes:      maven-surefire-booter <= 0:1.5.3
! Provides:       maven-surefire-booter = %{epoch}:%{version}-%{release}
  
! %description
! Surefire is a test framework project.
  
! %package maven-plugin
! Summary:                Surefire plugin for maven
! Group:                  Development/Java
! Requires:               maven-surefire = %{epoch}:%{version}-%{release}
! Obsoletes:              maven2-plugin-surefire <= 0:2.0.4
! Provides :              maven2-plugin-surefire = %{epoch}:%{version}-%{release}
  
! %if %{gcj_support}
! BuildRequires:          java-gcj-compat-devel
! Requires(post):         java-gcj-compat
! Requires(postun):       java-gcj-compat
! %endif
  
! %description maven-plugin
! Maven surefire plugin for running tests via the surefire framework.
  
! %package report-maven-plugin
! Summary:                Surefire reports plugin for maven
! Group:                  Development/Java
! Requires:               maven-surefire = %{epoch}:%{version}-%{release}
! Obsoletes:              maven2-plugin-surefire-report <= 0:2.0.4
! Provides :              maven2-plugin-surefire-report = %{epoch}:%{version}-%{release}
  
! %if %{gcj_support}
! BuildRequires:          java-gcj-compat-devel
! Requires(post):         java-gcj-compat
! Requires(postun):       java-gcj-compat
! %endif
  
! %description report-maven-plugin
! Plugin for generating reports from surefire test runs.
  
! %package provider-junit
! Summary:                JUnit3 provider for Maven Surefire
! Group:                  Development/Java
! Requires:               maven-surefire = %{epoch}:%{version}-%{release}
! Obsoletes:              maven2-plugin-surefire-report <= 0:2.0.4
! Provides :              maven2-plugin-surefire-report = %{epoch}:%{version}-%{release}
  
! %if %{gcj_support}
! BuildRequires:          java-gcj-compat-devel
! Requires(post):         java-gcj-compat
! Requires(postun):       java-gcj-compat
! %endif
  
! %description provider-junit
! JUnit3 provider for Maven Surefire.
  
  %package javadoc
! Summary:          Javadoc for %{name}
! Group:            Development/Documentation
  Requires(post):   /bin/rm,/bin/ln
  Requires(postun): /bin/rm
  
  %description javadoc
! Javadoc for %{name}.
  
! %prep
! %setup -q -n %{name}
  
! #find / -name JPP.maven2-parent.pom
  
! #sed -i "s|<version>5</version>|<version>1</version>|" pom.xml
! #sed -i "s|<relativePath>../pom/maven/pom.xml</relativePath>||" pom.xml
! #rpm -ql maven2-common-poms
  
! #cat /etc/maven/maven2-versionless-depmap.xml
  
  
  
! # We use plexus 1.2. Delete deprecated files accordingly.
! rm -f surefire-booter/src/main/java/org/apache/maven/surefire/booter/shell/CommandShell.java
! rm -f surefire-booter/src/main/java/org/apache/maven/surefire/booter/shell/Shell.java
! rm -f surefire-booter/src/main/java/org/apache/maven/surefire/booter/shell/CmdShell.java
! rm -f surefire-booter/src/main/java/org/apache/maven/surefire/booter/Commandline.java
  
! %patch0 -b .sav
! %patch1 -b .sav
  
! # Replace doxia package names
! for i in maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java \
!          maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportMojo.java; do
  
!     sed -i -e s:org.codehaus.doxia.sink.Sink:org.apache.maven.doxia.sink.Sink:g $i
!     sed -i -e s:org.codehaus.doxia.site.renderer.SiteRenderer:org.apache.maven.doxia.siterenderer.Renderer:g $i
!     sed -i -r -e s:\(\\s+\)SiteRenderer\(\\s+\):\\1Renderer\\2:g $i
! done
  
! %build
  
! %if %{with_maven}
  
!         export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository
!         mkdir -p $MAVEN_REPO_LOCAL
! 
! %else
!         mkdir -p lib
!         build-jar-repository -s -p lib classworlds junit plexus/utils
! %endif
  
  
  %if %{with_maven}
! 
! cat %{SOURCE4}
! 
!     mvn-jpp \
          -e \
          -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
!         -Dmaven2.jpp.depmap.file=%{SOURCE4} \
!         -Dmaven.test.skip=true \
!         install
! #        -s %{SOURCE1} \
! 
!     for dir in maven-surefire-plugin \
!                maven-surefire-report-plugin \
!                surefire-api \
!                surefire-booter \
!                surefire-providers/surefire-junit; do
!         (cd $dir 
!           mvn-jpp \
!               -Dmaven.repo.local=$MAVEN_REPO_LOCAL \
!               -Dmaven2.jpp.depmap.file=%{SOURCE4} \
!               javadoc:javadoc
!         )
!     done
! 
! 
  %else
!     ant -Dmaven.mode.offline=true
!     cp -p target/*jar ../lib/$project.jar
  %endif
  
  %install
  rm -rf $RPM_BUILD_ROOT
  # jars
  install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/maven-surefire
  install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
  
! install -pm 644 maven-surefire-plugin/target/maven-surefire-plugin-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/maven-plugin-%{version}.jar
! %add_to_maven_depmap org.apache.maven.surefire maven-surefire-plugin 2.3 JPP/maven-surefire maven-plugin
! install -pm 644 maven-surefire-plugin/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.maven-surefire-maven-plugin.pom
  
! install -pm 644 maven-surefire-report-plugin/target/maven-surefire-report-plugin-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/report-maven-plugin-%{version}.jar
! %add_to_maven_depmap org.apache.maven.surefire maven-surefire-report-plugin 2.3 JPP/maven-surefire report-maven-plugin
! install -pm 644 maven-surefire-report-plugin/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.maven-surefire-report-maven-plugin.pom
  
! install -pm 644 surefire-api/target/surefire-api-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/api-%{version}.jar
! %add_to_maven_depmap org.apache.maven.surefire surefire-api 2.3 JPP/maven-surefire api
! install -pm 644 surefire-api/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.maven-surefire-api.pom
  
! install -pm 644 surefire-booter/target/surefire-booter-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/booter-%{version}.jar
! %add_to_maven_depmap org.apache.maven.surefire surefire-booter 2.3 JPP/maven-surefire booter
! install -pm 644 surefire-booter/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.maven-surefire-booter.pom
  
! install -pm 644 surefire-providers/surefire-junit/target/surefire-junit-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/junit-%{version}.jar
! %add_to_maven_depmap org.apache.maven.surefire surefire-junit 2.3 JPP/maven-surefire junit
! install -pm 644 surefire-providers/surefire-junit/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.maven-surefire-junit.pom
  
! %add_to_maven_depmap org.apache.maven.surefire providers 2.3 JPP/maven-surefire providers
! install -pm 644 surefire-providers/pom.xml $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP.maven-surefire-providers.pom
  
! (cd $RPM_BUILD_ROOT%{_javadir}/maven-surefire && for jar in *-%{version}*; \
!   do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)
  
+ %if %{with_maven}
+ # javadoc
  
! install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/maven-surefire
! install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/maven-surefire/maven-plugin
! install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/maven-surefire/report-maven-plugin
! install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/maven-surefire/api
! install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/maven-surefire/booter
! install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/maven-surefire/junit
  
! cp -pr maven-surefire-plugin/target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/maven-surefire/maven-plugin/
! cp -pr maven-surefire-report-plugin/target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/maven-surefire/report-maven-plugin/
! cp -pr surefire-api/target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/maven-surefire/api/
! cp -pr surefire-booter/target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/maven-surefire/booter/
! cp -pr surefire-providers/surefire-junit/target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/maven-surefire/junit/
  
+ %endif
  
! # Create compatibility links
! ln -s %{_javadir}/maven-surefire/api.jar \
!       $RPM_BUILD_ROOT%{_javadir}/maven-surefire/surefire.jar
  
! install -dm 755 $RPM_BUILD_ROOT%{_datadir}/maven2/plugins
! ln -s %{_javadir}/maven-surefire/maven-surefire-plugin.jar \
!       $RPM_BUILD_ROOT%{_datadir}/maven2/plugins/surefire-plugin.jar
  
! ln -s %{_javadir}/maven-surefire/maven-surefire-report-plugin.jar \
!       $RPM_BUILD_ROOT%{_datadir}/maven2/plugins/surefire-report-plugin.jar
! 
! %if %{gcj_support}
! %{_bindir}/aot-compile-rpm
! %endif
  
  %clean
  rm -rf $RPM_BUILD_ROOT
  
+ %if %{gcj_support}
  %post
  
  %update_maven_depmap
  
! if [ -x %{_bindir}/rebuild-gcj-db ]
! then
!   %{_bindir}/rebuild-gcj-db
  fi
  
! if [ -x %{_bindir}/rebuild-gcj-db ]
! then
!   %{_bindir}/rebuild-gcj-db
  fi
+ %endif
  
! %if %{gcj_support}
! %postun
  
! %update_maven_depmap
  
! if [ -x %{_bindir}/rebuild-gcj-db ]
! then
!   %{_bindir}/rebuild-gcj-db
  fi
+ %endif
  
  %files
***************
*** 508,574 ****
  %dir %{_javadir}/maven-surefire
  %{_javadir}/maven-surefire/api*
  %{_javadir}/maven-surefire/surefire.jar
! %dir %{_datadir}/maven2
! %dir %{_datadir}/maven2/poms
! %{_datadir}/maven2/poms/*
  %{_mavendepmapfragdir}
  
! %files booter
! %defattr(-,root,root,-)
! %{_javadir}/maven-surefire/booter*
! 
! %files junit
! %defattr(-,root,root,-)
! %{_javadir}/maven-surefire/junit-%{version}.jar
! %{_javadir}/maven-surefire/junit.jar
! 
! %files junit4
! %defattr(-,root,root,-)
! %{_javadir}/maven-surefire/junit4-%{version}.jar
! %{_javadir}/maven-surefire/junit4.jar
! 
! %files testng
! %defattr(-,root,root,-)
! %{_javadir}/maven-surefire/testng*
  
! %files plugin
! %defattr(-,root,root,-)
  %dir %{_datadir}/maven2/plugins
! %{_datadir}/maven2/plugins/surefire-plugin*
  
! %files report-plugin
! %defattr(-,root,root,-)
  %dir %{_datadir}/maven2/plugins
! %{_datadir}/maven2/plugins/surefire-report-plugin*
! 
! %files javadoc
! %defattr(-,root,root,-)
! %doc %{_javadocdir}/maven-surefire-api-%{version}
! %ghost %doc %{_javadocdir}/maven-surefire-api
  
! %files booter-javadoc
! %defattr(-,root,root,-)
! %doc %{_javadocdir}/maven-surefire-booter-%{version}
! %ghost %doc %{_javadocdir}/maven-surefire-booter
  
! %files junit-javadoc
  %defattr(-,root,root,-)
! %doc %{_javadocdir}/maven-surefire-junit-%{version}
! %ghost %doc %{_javadocdir}/maven-surefire-junit
  
! %files junit4-javadoc
! %defattr(-,root,root,-)
! %doc %{_javadocdir}/maven-surefire-junit4-%{version}
! %ghost %doc %{_javadocdir}/maven-surefire-junit4
  
! %files testng-javadoc
! %defattr(-,root,root,-)
! %doc %{_javadocdir}/maven-surefire-testng-%{version}
! %ghost %doc %{_javadocdir}/maven-surefire-testng
  
  
! %changelog
! * Fri Jan 25 2007 Ralph Apel <r.apel at r-apel.de> 0:2.3-1jpp
! - 2.3
  
  * Tue Oct 17 2006 Deepak Bhole <dbhole at redhat.com> 1.5.3-2jpp
--- 339,400 ----
  %dir %{_javadir}/maven-surefire
  %{_javadir}/maven-surefire/api*
+ %{_javadir}/maven-surefire/booter*
  %{_javadir}/maven-surefire/surefire.jar
! %{_datadir}/maven2/poms
  %{_mavendepmapfragdir}
  
! %if %{gcj_support}
! %dir %attr(-,root,root) %{_libdir}/gcj/%{name}
! %attr(-,root,root) %{_libdir}/gcj/%{name}/api*
! %attr(-,root,root) %{_libdir}/gcj/%{name}/booter*
! %endif
  
! %files maven-plugin
! %{_javadir}/maven-surefire/maven-plugin*
  %dir %{_datadir}/maven2/plugins
! %{_datadir}/maven2/plugins/surefire-plugin.jar
! %if %{gcj_support}
! %attr(-,root,root) %{_libdir}/gcj/%{name}/maven-plugin*
! %endif
  
! %files report-maven-plugin
! %{_javadir}/maven-surefire/report-maven-plugin*
  %dir %{_datadir}/maven2/plugins
! %{_datadir}/maven2/plugins/surefire-report-plugin.jar
! %if %{gcj_support}
! %attr(-,root,root) %{_libdir}/gcj/%{name}/report-maven-plugin*
! %endif
  
! %files provider-junit
! %{_javadir}/maven-surefire/junit*
! %if %{gcj_support}
! %attr(-,root,root) %{_libdir}/gcj/%{name}/junit*
! %endif
  
! %files javadoc
  %defattr(-,root,root,-)
! %doc %{_javadocdir}/*
  
! %changelog
! * Thu Mar 05 2009 Yong Yang <yyang at redhat.com> - 0:2.3-2
! - Adding missing BRs
  
! * Wed Mar 04 2009 Deepak Bhole <dbhole at redhat.com> - 0:2.3-1jpp.1
! - Update to 2.3
! - Adding missing BR's
  
+ * Tue Mar 20 2007 Deepak Bhole <dbhole at redhat.com> 0:1.5.3-2jpp.2
+ - Build with maven
  
! * Mon Feb 26 2007 Tania Bento <tbento at redhat.com> 0:1.5.3-2jpp.1
! - Fixed %%Release.
! - Fixed %%BuildRoot.
! - Removed %%Vendor.
! - Removed %%Distribution.
! - Removed period at the end of %%Summary.
! - Removed %%post and %%postun sections for javadoc.
! - Removed %%post and %%postun sections for booter-javadoc.
! - Added gcj support option.
! - Fixed instructions on how to generate source drop.
  
  * Tue Oct 17 2006 Deepak Bhole <dbhole at redhat.com> 1.5.3-2jpp

--- maven-surefire-2.3-testng-TestNGXmlTestSuite.patch DELETED ---

--- maven-surefire-2.3-Commandline.patch DELETED ---

--- NEW FILE: maven-surefire-buildonlyjunit3.patch ---
--- ./surefire-providers/pom.xml.sav	2007-06-19 14:49:51.000000000 -0400
+++ ./surefire-providers/pom.xml	2007-06-19 14:50:10.000000000 -0400
@@ -30,8 +30,10 @@
   <name>SureFire Providers</name>
   <modules>
     <module>surefire-junit</module>
+<!--
     <module>surefire-junit4</module>
     <module>surefire-testng</module>
+-->
   </modules>
   <dependencies>
     <dependency>

--- maven-surefire-2.3-providers-pom.patch DELETED ---

--- maven-surefire-2.3-junit4-pom.patch DELETED ---

--- maven-surefire-2.3-SurefireBooter.patch DELETED ---

--- maven-surefire-2.3-ForkConfiguration.patch DELETED ---




More information about the JPackage-commits mailing list