[Jpackage-commits] rpms/free/junit-addons junit-addons-1.4.pom, NONE, 1.1 junit-addons-build.xml, 1.1, 1.2 junit-addons-pom.patch, NONE, 1.1 junit-addons.spec, 1.1, 1.2

jpackage jpackage at ryu.zarb.org
Sat Oct 15 02:44:49 CEST 2011


Update of /home/projects/jpackage/cvs/rpms/free/junit-addons
In directory ryu.zarb.org:/tmp/45HbHds7zS/rpms/free/junit-addons

Added Files:
	junit-addons-1.4.pom junit-addons-build.xml 
	junit-addons-pom.patch junit-addons.spec 
Log Message:
1.4-5.jpp6

--- NEW FILE: junit-addons-build.xml ---
<?xml version="1.0" encoding="ISO-8859-1"?>

<!--
  - Build file for the JUnit-addons Project.
  -
  - This script should be started with the following command line :
  -
  -     ant <target>
  -
  - Run "ant -projecthelp" to get a list of available targets.
  -
  - Version: $Revision: 1.2 $ $Date: 2011/10/15 00:44:47 $
  - Author: Vladimir R. Bossicard (vbossica at users.sourceforge.net)
  -->

<project name="junit-addons" default="build" basedir=".">

    <property file="build.properties" />
    <property file="common.properties" />

    <!-- directories settings -->

    <property name="src" value="src" />
    <property name="main.src" value="src/main" />
    <property name="test.src" value="src/test" />
    <property name="example.src" value="src/example" />

    <property name="build.dest" value="build" />
    <property name="api.dest" value="${build.dest}/api" />
    <property name="classes.dest" value="${build.dest}/classes" />
    <property name="classes.instrumented.dest" value="${build.dest}/classes-instrumented" />
    <property name="test.classes.dest" value="${build.dest}/classes-test" />
    <property name="example.classes.dest" value="${build.dest}/classes-example" />
    <property name="dist.dest" value="dist" />

    <!-- miscellaneous settings -->

    <property name="compilation.debug" value="on" />
    <property name="compilation.deprecation" value="off" />
    <property name="compilation.verbose" value="off" />

    <!--
      - Initializes the build and check if all libraries are available.
      -->
    <target name="init">
        <tstamp/>
        <mkdir dir="${build.dest}" />
        <mkdir dir="${classes.dest}" />
        <mkdir dir="${test.classes.dest}" />
        <mkdir dir="${example.classes.dest}" />
        <mkdir dir="${api.dest}" />
        <mkdir dir="${dist.dest}" />
    </target>

    <path id="libraries">
        <pathelement location="${jdom.jar}" />
        <pathelement location="${jaxen.jar}" />
        <pathelement location="${saxpath.jar}" />
        <pathelement location="${ant.jar}" />
        <pathelement location="${junit.jar}" />
        <pathelement location="${xerces.jar}" />
        <pathelement location="${xml-apis.jar}" />
        <pathelement location="${commons-logging.jar}" />
    </path>

    <!--
      - Compiles the source code to the build dir
      - Copy all other resources to the build dir
      - which are needed to run the application alone
      -->
    <target name="build"
            depends="init"
            description="compiles the junit-addons classes">
        <javac srcdir="${main.src}"
               destdir="${classes.dest}"
               debug="${compilation.debug}"
               verbose="${compilation.verbose}"
               deprecation="${compilation.deprecation}">
            <classpath>
                <path refid="libraries"/>
            </classpath>
        </javac>

        <javac srcdir="${example.src}"
               destdir="${example.classes.dest}"
               debug="${compilation.debug}"
               verbose="${compilation.verbose}"
               deprecation="${compilation.deprecation}">
            <classpath>
                <pathelement location="${classes.dest}" />
                <path refid="libraries"/>
            </classpath>
        </javac>

        <javac srcdir="${test.src}"
               destdir="${test.classes.dest}"
               debug="${compilation.debug}"
               verbose="${compilation.verbose}"
               deprecation="${compilation.deprecation}">
            <classpath>
                <pathelement location="${classes.dest}" />
                <pathelement location="${example.classes.dest}" />
                <path refid="libraries"/>
            </classpath>
        </javac>
    </target>

    <target name="test"
            depends="build"
            description="tests the junit-addons classes">
        <java classname="junit.textui.TestRunner" fork="yes">
            <jvmarg value="-DPropertyManager.file=${test.src}/tests.properties" />
            <jvmarg value="-DXMLPropertyManager.file=${test.src}/tests.xml" />
            <arg line="-verbose" />
            <arg line="-runner.properties ${test.src}/conf/runner.properties" />
            <arg line="-test.properties ${test.src}/conf/tests.properties" />
            <arg line="-class AllTests" />
            <classpath>
      			<pathelement location="${classes.instrumented.dest}"/>
                <pathelement location="${classes.dest}" />
                <pathelement location="${test.classes.dest}" />
                <pathelement location="${example.classes.dest}" />
                <pathelement location="${example.src}" />
                <pathelement location="${junit-addons-runner.jar}" />
                <path refid="libraries"/>
                
	        	<path refid="jcoverage.classpath"/>
            </classpath>
        </java>
    </target>

    <target name="test-old"
            depends="build">
<!--
        <java classname="junit.textui.TestRunner" fork="yes">
            <arg line="-class AllTests" />
            <jvmarg value="-DPropertyManager.file=${test.src}/conf/tests.properties" />
            <jvmarg value="-DXMLPropertyManager.file=${test.src}/conf/tests.xml" />
            <classpath>
                <pathelement location="${classes.dest}" />
                <pathelement location="${test.classes.dest}" />
                <pathelement location="${example.classes.dest}" />
                <pathelement location="${example.src}" />
                <path refid="libraries"/>
            </classpath>
        </java>
-->        

		<junit printsummary="yes" fork="yes" haltonfailure="yes">
            <jvmarg value="-DPropertyManager.file=${test.src}/conf/tests.properties" />
            <jvmarg value="-DXMLPropertyManager.file=${test.src}/conf/tests.xml" />
		  	<formatter type="xml"/>
		  	<test name="AllTests"/>
            <classpath>
                <pathelement location="${classes.dest}" />
                <pathelement location="${test.classes.dest}" />
                <pathelement location="${example.classes.dest}" />
                <pathelement location="${example.src}" />
                <path refid="libraries"/>
            </classpath>
		</junit>
    </target>

    <target name="example"
            depends="build"
            description="compiles and runs the examples">
        <javac srcdir="${example.src}"
               destdir="${test.classes.dest}"
               debug="${compilation.debug}"
               verbose="${compilation.verbose}"
               deprecation="${compilation.deprecation}">
            <classpath>
                <pathelement location="${classes.dest}" />
                <path refid="libraries"/>
            </classpath>
        </javac>
        <java classname="junitx.tool.TestClassValidator" fork="yes">
            <arg line="junitx.example.ValidationExample" />
            <classpath>
                <pathelement location="${classes.dest}" />
                <pathelement location="${test.classes.dest}" />
                <path refid="libraries"/>
            </classpath>
        </java>
    </target>

	<path id="jcoverage.classpath">
  		<pathelement location="${jcoverage.home}/jcoverage.jar"/>
  		<pathelement location="${jcoverage.home}/lib/log4j/1.2.8/log4j-1.2.8.jar"/>
  		<pathelement location="${jcoverage.home}/lib/bcel/5.1/bcel.jar"/>
  		<pathelement location="${jcoverage.home}/lib/oro/2.0.7/jakarta-oro-2.0.7.jar"/>
  		<pathelement location="${jcoverage.home}/lib/gnu/getopt/1.0.9/java-getopt-1.0.9.jar"/>
    </path>

	<taskdef resource="tasks.properties">
        <classpath>
        	<path refid="jcoverage.classpath"/>
		</classpath>
	</taskdef>

	<target name="instrument" depends="build">
		<instrument todir="${classes.instrumented.dest}">
			<fileset dir="${classes.dest}">
				<exclude name="junitx/ant/*.class"/>
				<exclude name="junitx/tool/*.class"/>
			</fileset>
		</instrument>
	</target>
	
	<target name="coverage" depends="instrument, test">
		<report srcdir="${main.src}" destdir="${build.dest}/jcoverage"/>
	</target>

    <!--
      - Generates the junit-addons API
      -->
    <target name="javadocs"
            depends="build"
            description="generates the API">
        <javadoc
            packagenames="junitx.*"
            sourcepath="${main.src}"
            destdir="${api.dest}"
            overview="${main.src}/overview.html"
            author="true"
            version="true"
            protected="true"
            use="false"
            windowtitle="${project.title} v${project.version}"
            doctitle="${project.title}, version ${project.version}<br>API specification"
            header="<b>${project.title}<br>version ${project.version}</b>"
            bottom="Copyright &#169; ${project.year} ${project.holder}. All Rights Reserved.">
            <classpath>
                <path refid="libraries"/>
            </classpath>
        </javadoc>
    </target>

    <!--
      - Generates a jar archive with the content of the build directory
      -->
    <target name="release"
            depends="clean, build, test, javadocs"
            description="Generate the junit-addons jar archive" >
        <delete quiet="true">
            <fileset dir="${dist.dest}/" includes="${project.name}-${project.version}.jar" />
        </delete>
        <jar jarfile="${dist.dest}/${project.name}-${project.version}.jar"
            basedir="${classes.dest}" >
            <manifest>
                <attribute name="Implementation-Vendor"
                           value="${project.holder}" />
                <attribute name="Implementation-Version"
                           value="${project.version}" />
                <attribute name="Implementation-Title"
                           value="${project.title}" />
            </manifest>
        </jar>
        <zip zipfile="${dist.dest}/${project.name}-${project.version}.jar"
             update="yes">
            <zipfileset dir="." includes="LICENSE" prefix="META-INF" />
        </zip>
        <zip zipfile="${dist.dest}/src.jar">
        	<zipfileset dir="${src}" excludes="**/sflogo.png" prefix="src" />
       	</zip>
    </target>

    <!--
      - Delete all generate directories and their content
      -->
    <target name="clean">
        <delete dir="${build.dest}" quiet="true" />
        <delete dir="${dist.dest}" quiet="true" />
    </target>

</project>

--- NEW FILE: junit-addons-1.4.pom ---
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>junit-addons</groupId>
  <artifactId>junit-addons</artifactId>
  <version>1.4</version>
  <dependencies> 
    <dependency> 
      <groupId>junit</groupId> 
      <artifactId>junit</artifactId> 
      <version>3.8.1</version> 
    </dependency> 
    <dependency> 
      <groupId>xerces</groupId> 
      <artifactId>xercesImpl</artifactId> 
      <version>2.6.2</version> 
    </dependency> 
    <dependency> 
      <groupId>xerces</groupId> 
      <artifactId>xmlParserAPIs</artifactId> 
      <version>2.6.2</version> 
    </dependency> 
  </dependencies> 
</project>

--- NEW FILE: junit-addons-pom.patch ---
--- junit-addons-1.4.pom.orig	2006-03-11 07:14:03.000000000 -0500
+++ junit-addons-1.4.pom	2011-10-14 20:30:49.220683926 -0400
@@ -7,17 +7,17 @@
     <dependency> 
       <groupId>junit</groupId> 
       <artifactId>junit</artifactId> 
-      <version>3.8.1</version> 
+      <version>3.8.2</version> 
     </dependency> 
-    <dependency> 
+    <!--<dependency> 
       <groupId>xerces</groupId> 
       <artifactId>xercesImpl</artifactId> 
-      <version>2.6.2</version> 
-    </dependency> 
+      <version>2.9.1</version> 
+    </dependency>-->
     <dependency> 
-      <groupId>xerces</groupId> 
-      <artifactId>xmlParserAPIs</artifactId> 
-      <version>2.6.2</version> 
+      <groupId>xml-apis</groupId> 
+      <artifactId>xml-apis</artifactId> 
+      <version>1.3.04</version> 
     </dependency> 
   </dependencies> 
 </project>

--- NEW FILE: junit-addons.spec ---
# Copyright (c) 2000-2011, 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.

%global namedversion %{version}

%define	section free

Name:		junit-addons
Version:	1.4
Release:	5%{?dist}
Epoch:		0
Summary:	JUnitX helper classes for JUnit
License:	ASL 1.1
Group:		Development/Testing
URL:		http://sourceforge.net/projects/junit-addons/
Source0:	%{name}-%{namedversion}.zip
Source1:	%{name}-build.xml
Source2:        http://repo1.maven.org/maven2/junit-addons/junit-addons/1.4/junit-addons-1.4.pom
Patch0:         junit-addons-pom.patch
Requires(post): jpackage-utils
Requires(postun): jpackage-utils
Requires:	ant
Requires:	jakarta-commons-logging
Requires:	jaxen
Requires:	jdom
Requires:       jpackage-utils
Requires:	junit
BuildRequires:	ant
BuildRequires:	jakarta-commons-logging
BuildRequires:	jaxen
BuildRequires:	jdom
BuildRequires:  jpackage-utils
BuildRequires:	junit
BuildRequires:	xerces-j2
BuildRequires:	xml-commons-jaxp-1.3-apis
BuildArch:	noarch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root

%description
JUnit-addons is a collection of helper classes for JUnit. 
This library can be used with both JUnit 3.7 and JUnit 3.8.x

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

%description javadoc
Javadoc for %{name}.

%prep
%setup -q
%{__chmod} -Rf a+rX,u+w,g-w,o-w *
%{jar} xf src.jar
# FIXME: (dwalluck): removing this jar (which contains bianry class files) will break the tests
find . -type f -name "*.jar" -a -type f -not -name tests.jar | xargs -t rm
cp -p %{SOURCE1} build.xml
%{__cp} -p %{SOURCE2} junit-addons-%{namedversion}.pom
%patch0 -p0 -b .sav0

%build
export CLASSPATH=
export OPT_JAR_LIST=:
%{ant} \
        -Dant.build.javac.source=1.4 \
	-Djdom.jar=$(build-classpath jdom) \
	-Djaxen.jar=$(build-classpath jaxen) \
	-Dsaxpath.jar=$(build-classpath jaxen) \
	-Dant.jar=$(build-classpath ant) \
	-Djunit.jar=$(build-classpath junit) \
	-Dxerces.jar=$(build-classpath xerces-j2) \
	-Dxml-apis.jar=$(build-classpath xml-commons-jaxp-1.3-apis) \
	-Dcommons-logging.jar=$(build-classpath commons-logging) \
	-Dproject.name=junit-addons \
	-Dproject.version=%{namedversion} \
	release

%install
rm -rf %{buildroot}

# jars
mkdir -p %{buildroot}%{_javadir}
cp -p dist/junit-addons-%{namedversion}.jar %{buildroot}%{_javadir}/%{name}-%{namedversion}.jar
(cd %{buildroot}%{_javadir} && for jar in *-%{namedversion}*; do ln -sf ${jar} `echo $jar| sed  "s|-%{namedversion}||g"`; done)

# pom
%{__mkdir_p} %{buildroot}%{_datadir}/maven2/poms
%{__cp} -p junit-addons-%{namedversion}.pom %{buildroot}%{_datadir}/maven2/poms/JPP-%{name}.pom
%add_to_maven_depmap junit-addons junit-addons JPP %{namedversion} %{name}

# examples
mkdir -p %{buildroot}%{_datadir}/%{name}
mkdir -p %{buildroot}%{_datadir}/%{name}/examples
cp -pr src/example/* %{buildroot}%{_datadir}/%{name}/examples

# javadoc
mkdir -p %{buildroot}%{_javadocdir}/%{name}-%{namedversion}
cp -pr api/* %{buildroot}%{_javadocdir}/%{name}-%{namedversion}
ln -s %{name}-%{namedversion} %{buildroot}%{_javadocdir}/%{name}

%clean
rm -rf %{buildroot}

%files
%defattr(0644,root,root,0755)
%doc LICENSE README WHATSNEW
%{_javadir}*/%{name}-%{namedversion}.jar
%{_javadir}*/%{name}.jar
%{_datadir}/%{name}
%{_datadir}/maven2/poms/JPP-%{name}.pom
%{_mavendepmapfragdir}/%{name}

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

%changelog
* Fri Oct 14 2011 David Walluck <dwalluck at redhat.com> 0:1.4-5
- add pom

* Fri Dec 12 2008 David Walluck <dwalluck at redhat.com> 0:1.4-4
- fix License

* Fri Dec 12 2008 David Walluck <dwalluck at redhat.com> 0:1.4-3
- build for JPackage 5

* Fri Mar 10 2006 Fernando Nasser <fnasser at redhat.com> 0:1.4-2jpp
- First JPP 1.7 build

* Mon Feb 21 2005 Ralph Apel <r.apel at r-apel.de> 0:1.4-1jpp
- First release





More information about the JPackage-commits mailing list