[Jpackage-commits] dist/jmock/JPP-6 Makefile, NONE, 1.1 jmock-1.2.0-AssertMo.patch, NONE, 1.1 jmock-1.2.0-build_xml.patch, NONE, 1.1 jmock-1.2.0.pom, NONE, 1.1 jmock-cglib-1.2.0.pom, NONE, 1.1 jmock.spec, NONE, 1.1 sources, NONE, 1.1

jpackage jpackage at ryu.zarb.org
Sun Dec 5 20:39:27 CET 2010


Update of /home/projects/jpackage/cvs/dist/jmock/JPP-6
In directory ryu.zarb.org:/tmp/cvs-serv20772/JPP-6

Added Files:
	Makefile jmock-1.2.0-AssertMo.patch 
	jmock-1.2.0-build_xml.patch jmock-1.2.0.pom 
	jmock-cglib-1.2.0.pom jmock.spec sources 
Log Message:
Import jmock into JPP-6

--- NEW FILE: jmock-1.2.0-AssertMo.patch ---
--- src/org/jmock/expectation/AssertMo.java.sav	2007-07-13 17:44:35.000000000 +0200
+++ src/org/jmock/expectation/AssertMo.java	2007-07-13 17:45:06.000000000 +0200
@@ -73,7 +73,7 @@
         assertTrue("Should not have verified", threwException);
     }
 
-    static protected void failNotEquals( String message,
+    public static void failNotEquals( String message,
                                          Object expected,
                                          Object actual ) {
         String formatted = "";

--- NEW FILE: Makefile ---
# Makefile for source rpm: jmock
# $Id: Makefile,v 1.1 2010/12/05 19:39:25 jpackage Exp $
NAME := jmock
SPECFILE = $(firstword $(wildcard *.spec))

define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef

MAKEFILE_COMMON := $(shell $(find-makefile-common))

ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef

MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif

include $(MAKEFILE_COMMON)

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

%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 section   free

Name:           jmock
Version:        1.2.0
Release:        3%{?dist}
Epoch:          0
Summary:        Test Java code using mock objects
Group:          Development/Libraries/Java
# FIXME: (dwalluck): not a valid license
License:        Open Source
URL:            http://jmock.codehaus.org/
Source0:        jmock-1.2.0.tar.gz
# svn export http://svn.codehaus.org/jmock/tags/1.2.0/ jmock-1.2.0
Source1:        jmock-1.2.0.pom
Source2:        jmock-cglib-1.2.0.pom
Patch0:         jmock-1.2.0-AssertMo.patch
Patch1:         jmock-1.2.0-build_xml.patch
%if ! %{gcj_support}
BuildArch:      noarch
%endif
BuildRequires:  jpackage-utils >= 0:1.7.5
BuildRequires:  java-devel >= 0:1.6.0
BuildRequires:  ant >= 0:1.7.1
BuildRequires:  ant-junit
BuildRequires:  junit >= 0:3.8.2
BuildRequires:  cglib21 >= 0:2.1.3
BuildRequires:  asm >= 0:1.5.3
Requires:       java-devel >= 0:1.6.0
Requires:       cglib21 >= 0:2.1.3
Requires:       asm >= 0:1.5.3
%if %{gcj_support}
BuildRequires:  java-gcj-compat-devel
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root

%description
jMock is a library for testing Java code using mock objects.
Mock objects help you design and test the interactions between the 
objects in your programs.
The jMock package:
* makes it quick and easy to define mock objects, so you don't break 
  the rhythm of programming.
* lets you define flexible constraints over object interactions, 
  reducing the brittleness of your tests.
* is easy to extend.

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

%description    javadoc
%{summary}.

%package        demo
Summary:        Examples for %{name}
Group:          Development/Documentation

%description    demo
%{summary}.

%prep
%setup -q 
find . -name "*.jar" | xargs rm
%patch0 -p0
%patch1 -p0

%build
export OPT_JAR_LIST="ant/ant-junit junit"
export CLASSPATH=`pwd`/build/classes:$(build-classpath asm cglib21-nodep)
ant -Dbuild.sysclasspath=only package

%install
rm -rf $RPM_BUILD_ROOT

install -Dpm 644 build/%{name}-core-%{version}.jar \
  $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
install -pm 644 build/%{name}-cglib-%{version}.jar \
  $RPM_BUILD_ROOT%{_javadir}/%{name}-cglib-%{version}.jar
install -pm 644 build/%{name}-tests-%{version}.jar \
  $RPM_BUILD_ROOT%{_javadir}/%{name}-tests-%{version}.jar
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed  "s|-%{version}||g"`; done)

%add_to_maven_depmap %{name} %{name} %{version} JPP %{name}
%add_to_maven_depmap %{name} %{name}-cglib %{version} JPP %{name}-cglib

# poms
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/maven2/poms
install -pm 644 %{SOURCE1} \
    $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}.pom
install -pm 644 %{SOURCE2} \
    $RPM_BUILD_ROOT%{_datadir}/maven2/poms/JPP-%{name}-cglib.pom

#
install -dm 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
cp -pr build/javadoc-%{version}/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
#
install -dm 755 $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}
cp -pr examples/* $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}

%if %{gcj_support}
%{_bindir}/aot-compile-rpm
%endif

%clean
rm -rf $RPM_BUILD_ROOT

%post
%update_maven_depmap
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
  %{_bindir}/rebuild-gcj-db
fi
%endif

%postun
%update_maven_depmap
%if %{gcj_support}
if [ -x %{_bindir}/rebuild-gcj-db ]
then
  %{_bindir}/rebuild-gcj-db
fi
%endif

%files
%defattr(0644,root,root,0755)
%doc LICENSE.txt overview.html
%{_javadir}/*.jar
%{_datadir}/maven2/poms/*
%{_mavendepmapfragdir}/*
%if %{gcj_support}
%dir %{_libdir}/gcj/%{name}
%attr(-,root,root) %{_libdir}/gcj/%{name}/%{name}*%{version}.jar.*
%endif

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

%files demo
%defattr(0644,root,root,0755)
%{_datadir}/%{name}-%{version}

%changelog
* Mon Nov 29 2010 Ralph Apel <r.apel at r-apel.de> 0:1.2.0-3
- Adapt to JPP6
- Fix naming of poms

* Tue Jul 29 2008 David Walluck <dwalluck at redhat.com> 0:1.2.0-2
- remove javadoc scriptlets
- GCJ fixes
- fix BuildRoot
- fix permissions
- fix maven directory ownership

* Tue Jul 17 2007 Ralph Apel <r.apel at r-apel.de> - 0:1.2.0-1jpp
- Upgrade to 1.2.0
- Add poms and depmap frags
- Make Vendor, Distribution based on macro

* Fri Feb 23 2007 Ralph Apel <r.apel at r-apel.de> - 0:1.0.1-4jpp
- Patch AssertMo.java to current junit
- Add gcj_support option

* Fri Feb 17 2006 Ralph Apel <r.apel at r-apel.de> - 0:1.0.1-3jpp
- Require cglib-nohook instead of cglib to break circular dependency

* Wed Jan 04 2006 Fernando Nasser <fnasser at redhat.com> - 0:1.0.1-2jpp
- First JPP 1.7 build

* Wed Mar 16 2005 Ralph Apel <r.apel at r-apel.de> - 0:1.0.1-1jpp
- Upgrade to 1.0.1
- Patch to adapt to asm-1.5.3
- Built with asm-1.5.3 and cglib-2.1.0

* Sun Aug 23 2004 Randy Watler <rwatler at finali.com> - 0:1.0.0-3jpp
- Rebuild with ant-1.6.2
- Upgrade to Ant 1.6.X

* Fri Jun 04 2004 Ralph Apel <r.apel at r-apel.de> - 0:1.0.0-2jpp
- Graduate to free section for use with qdox-1.4

* Tue Jun 01 2004 Ralph Apel <r.apel at r-apel.de> - 0:1.0.0-1jpp
- First JPackage release


--- NEW FILE: jmock-1.2.0.pom ---
<project>
    <modelVersion>4.0.0</modelVersion>
    <groupId>jmock</groupId>
    <artifactId>jmock</artifactId>
    <version>1.2.0</version>
    <packaging>jar</packaging>
    <name>jMock</name>
    <url>http://www.jmock.org/</url>
    <description>jMock is a library for testing Java code using mock objects</description>
    <licenses>
        <license>
            <name>BSD</name>
            <url>http://www.jmock.org/license.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <scm>
        <url>http://cvs.jmock.codehaus.org/browse/jmock/jmock</url>
    </scm>
    <organization>
        <name>jMock.org</name>
        <url>http://www.jmock.org/</url>
    </organization>
    <dependencies>
	    <dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>3.8.1</version>
		</dependency>
	</dependencies>
</project>

--- NEW FILE: sources ---
21fe8d1d401dbb70ec2d018463a1d74f  jmock-1.2.0.tar.gz

--- NEW FILE: jmock-cglib-1.2.0.pom ---
<project>
    <modelVersion>4.0.0</modelVersion>
    <groupId>jmock</groupId>
    <artifactId>jmock-cglib</artifactId>
    <version>1.2.0</version>
    <packaging>jar</packaging>
    <name>jMock CGLIB extension</name>
    <url>http://www.jmock.org/</url>
    <description>jMock is a library for testing Java code using mock objects. The CGLIB extension allows creating of mock objects for classes.</description>
    <licenses>
        <license>
            <name>BSD</name>
            <url>http://www.jmock.org/license.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <scm>
        <url>http://cvs.jmock.codehaus.org/browse/jmock/jmock</url>
    </scm>
    <organization>
        <name>jMock.org</name>
        <url>http://www.jmock.org/</url>
    </organization>
    <dependencies>
	    <dependency>
			<groupId>jmock</groupId>
			<artifactId>jmock</artifactId>
			<version>1.2.0</version>
		</dependency>
	    <dependency>
			<groupId>cglib</groupId>
			<artifactId>cglib-nodep</artifactId>
			<version>2.1_3</version>
		</dependency>
	</dependencies>
</project>

--- NEW FILE: jmock-1.2.0-build_xml.patch ---
--- build.xml.sav	2007-07-15 11:18:10.000000000 +0200
+++ build.xml	2007-07-15 11:19:51.000000000 +0200
@@ -1,5 +1,5 @@
 <project name="jMock 1" default="build">
-	<property name="version" value="DEVELOPER-BUILD"/>
+	<property name="version" value="1.2.0"/>
 	
 	<target name="build" depends="clean, package"/>
 	
@@ -27,11 +27,13 @@
 				<exclude name="test/**"/>
 				<exclude name="org/jmock/cglib/**"/>
 			</fileset>
+<!--
 			<fileset dir="src">
 				<exclude name="atest/**"/>
 				<exclude name="test/**"/>
 				<exclude name="org/jmock/cglib/**"/>
 			</fileset>
+-->
 		</jar>
 		
 		<jar destfile="build/jmock-cglib-${version}.jar">
@@ -39,9 +41,11 @@
 			<fileset dir="build/classes">
 				<include name="org/jmock/cglib/**"/>
 			</fileset>
+<!--
 			<fileset dir="src">
 				<include name="org/jmock/cglib/**"/>
 			</fileset>
+-->
 		</jar>
 		
 		<jar destfile="build/jmock-tests-${version}.jar">
@@ -98,8 +102,8 @@
 		       srcdir="testdata"
 			   debug="yes"
 			   failonerror="yes"
-		       source="1.5" 
-		       target="1.5"/>
+		       source="1.4" 
+		       target="1.4"/>
 		
 		<jar destfile="build/testdata/signed.jar" compress="false">
 			<fileset dir="build/testdata/classes/" includes="*"/>




More information about the JPackage-commits mailing list