Broken dependencies: joda-time
by Fedora Koji Build System
joda-time has broken dependencies in the epel-5 tree:
On ppc:
joda-time-1.5.2-7.tzdata2008d.el5.noarch requires java > 0:1.5.0
Please resolve this as soon as possible.
11 years, 6 months
Broken dependencies: joda-time
by Fedora Koji Build System
joda-time has broken dependencies in the epel-5 tree:
On ppc:
joda-time-1.5.2-7.tzdata2008d.el5.noarch requires java > 0:1.5.0
Please resolve this as soon as possible.
11 years, 6 months
[jmock] Initial import (#847742).
by gil
commit 7f0bec7e88db5352c4f6749abec05f13423d1aed
Author: gil <puntogil(a)libero.it>
Date: Sat Nov 3 07:32:32 2012 +0100
Initial import (#847742).
.gitignore | 1 +
jmock-2.5.1-DeterministicSchedule.patch | 28 +++
jmock-2.5.1-cglib22.patch | 85 +++++++++
jmock-2.5.1-hamcrest12.patch | 296 +++++++++++++++++++++++++++++++
jmock-2.5.1-javadoc.patch | 20 ++
jmock-2.5.1-name-clash.patch | 76 ++++++++
jmock-2.5.1-poms.patch | 99 ++++++++++
jmock-2.5.1-use_system_libraries.patch | 31 ++++
jmock.spec | 146 +++++++++++++++
sources | 1 +
10 files changed, 783 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..71c2ae5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/jmock-2.5.1-clean-src-svn.tar.gz
diff --git a/jmock-2.5.1-DeterministicSchedule.patch b/jmock-2.5.1-DeterministicSchedule.patch
new file mode 100644
index 0000000..b16f931
--- /dev/null
+++ b/jmock-2.5.1-DeterministicSchedule.patch
@@ -0,0 +1,28 @@
+--- src/org/jmock/lib/concurrent/DeterministicScheduler.java 2008-06-23 14:06:51.000000000 +0200
++++ src/org/jmock/lib/concurrent/DeterministicScheduler.java-gil 2011-07-27 20:46:08.446224533 +0200
+@@ -110,21 +110,21 @@
+ throw blockingOperationsNotSupported();
+ }
+
+- public <T> List<Future<T>> invokeAll(Collection<Callable<T>> tasks) throws InterruptedException {
++ public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) throws InterruptedException {
+ throw blockingOperationsNotSupported();
+ }
+
+- public <T> List<Future<T>> invokeAll(Collection<Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException {
++ public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) throws InterruptedException {
+ throw blockingOperationsNotSupported();
+ }
+
+- public <T> T invokeAny(Collection<Callable<T>> tasks)
++ public <T> T invokeAny(Collection<? extends Callable<T>> tasks)
+ throws InterruptedException, ExecutionException
+ {
+ throw blockingOperationsNotSupported();
+ }
+
+- public <T> T invokeAny(Collection<Callable<T>> tasks, long timeout, TimeUnit unit)
++ public <T> T invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit)
+ throws InterruptedException, ExecutionException, TimeoutException
+ {
+ throw blockingOperationsNotSupported();
diff --git a/jmock-2.5.1-cglib22.patch b/jmock-2.5.1-cglib22.patch
new file mode 100644
index 0000000..b96d143
--- /dev/null
+++ b/jmock-2.5.1-cglib22.patch
@@ -0,0 +1,85 @@
+diff -Nru jmock-2.5.1/test/org/jmock/test/unit/support/MethodFactory.java jmock-2.5.1-gil/test/org/jmock/test/unit/support/MethodFactory.java
+--- jmock-2.5.1/test/org/jmock/test/unit/support/MethodFactory.java 2007-07-23 13:43:05.000000000 +0200
++++ jmock-2.5.1-gil/test/org/jmock/test/unit/support/MethodFactory.java 2012-04-19 10:46:53.707914792 +0200
+@@ -4,13 +4,13 @@
+
+ import java.lang.reflect.Method;
+
+-import net.sf.cglib.asm.ClassWriter;
+-import net.sf.cglib.asm.Type;
++import org.objectweb.asm.ClassWriter;
++import org.objectweb.asm.Type;
+ import net.sf.cglib.core.Constants;
+
+
+ public class MethodFactory extends ClassLoader {
+- public static final int CLASS_FORMAT_VERSION = 45;
++ public static final int CLASS_FORMAT_VERSION = 49;
+
+ public static Class<?>[] NO_ARGUMENTS = {};
+ public static Class<?>[] NO_EXCEPTIONS = {};
+@@ -33,20 +33,20 @@
+ {
+ @Override
+ protected Class<?> findClass( String interfaceName ) {
+- ClassWriter writer = new ClassWriter(true);
++ ClassWriter writer = new ClassWriter(ClassWriter.COMPUTE_MAXS);
+
+ writer.visit(CLASS_FORMAT_VERSION,
+ Constants.ACC_PUBLIC|Constants.ACC_INTERFACE,
+ nameToClassFormat(interfaceName),
++ null,
+ "java/lang/Object",
+- null, /* interfaces */
+- null /* source file */);
++ null /* interfaces */);
+
+ writer.visitMethod(Constants.ACC_PUBLIC | Constants.ACC_ABSTRACT,
+ methodName,
+ methodDescriptor(returnType, argTypes),
+- classNamesInClassFormat(exceptionTypes),
+- null /* no attributes */);
++ null,
++ classNamesInClassFormat(exceptionTypes));
+
+ byte[] classAsBytes = writer.toByteArray();
+
+diff -Nru jmock-2.5.1/test/org/jmock/test/unit/support/SyntheticEmptyInterfaceClassLoader.java jmock-2.5.1-gil/test/org/jmock/test/unit/support/SyntheticEmptyInterfaceClassLoader.java
+--- jmock-2.5.1/test/org/jmock/test/unit/support/SyntheticEmptyInterfaceClassLoader.java 2007-04-10 10:34:01.000000000 +0200
++++ jmock-2.5.1-gil/test/org/jmock/test/unit/support/SyntheticEmptyInterfaceClassLoader.java 2012-04-19 10:46:53.706914792 +0200
+@@ -3,9 +3,11 @@
+ */
+ package org.jmock.test.unit.support;
+
++import static org.jmock.test.unit.support.MethodFactory.CLASS_FORMAT_VERSION;
++
+ import java.util.regex.Pattern;
+
+-import net.sf.cglib.asm.ClassWriter;
++import org.objectweb.asm.ClassWriter;
+ import net.sf.cglib.core.Constants;
+
+ public class SyntheticEmptyInterfaceClassLoader extends ClassLoader {
+@@ -30,13 +32,15 @@
+ }
+
+ private Class<?> synthesiseInterface(String name) throws ClassFormatError {
+- ClassWriter writer = new ClassWriter(true);
+- writer.visit(MethodFactory.CLASS_FORMAT_VERSION,
+- Constants.ACC_PUBLIC | Constants.ACC_INTERFACE,
+- name.replace('.', '/'),
+- "java/lang/Object",
+- null, /* interfaces */
+- null /* source file */);
++ ClassWriter writer = new ClassWriter(ClassWriter.COMPUTE_MAXS);
++ writer.visit(CLASS_FORMAT_VERSION,
++ Constants.ACC_PUBLIC|Constants.ACC_INTERFACE,
++ MethodFactory.nameToClassFormat(name),
++ null,
++ "java/lang/Object",
++ null /* interfaces */);
++
++
+
+ byte[] b = writer.toByteArray();
+
diff --git a/jmock-2.5.1-hamcrest12.patch b/jmock-2.5.1-hamcrest12.patch
new file mode 100644
index 0000000..f650122
--- /dev/null
+++ b/jmock-2.5.1-hamcrest12.patch
@@ -0,0 +1,296 @@
+diff -Nru jmock-2.5.1/src/org/jmock/Expectations.java jmock-2.5.1-gil/src/org/jmock/Expectations.java
+--- jmock-2.5.1/src/org/jmock/Expectations.java 2008-07-03 13:52:29.000000000 +0200
++++ jmock-2.5.1-gil/src/org/jmock/Expectations.java 2012-11-02 13:58:47.805563931 +0100
+@@ -184,39 +184,48 @@
+ }
+
+ public boolean with(boolean value) {
+- return with(equalTo(value));
++ addParameterMatcher(equal(value));
++ return false;
+ }
+
+ public byte with(byte value) {
+- return with(equalTo(value));
++ addParameterMatcher(equal(value));
++ return 0;
+ }
+
+ public short with(short value) {
+- return with(equalTo(value));
++ addParameterMatcher(equal(value));
++ return 0;
+ }
+
+ public char with(char value) {
+- return with(equalTo(value));
++ addParameterMatcher(equal(value));
++ return 0;
+ }
+
+ public int with(int value) {
+- return with(equalTo(value));
++ addParameterMatcher(equal(value));
++ return 0;
+ }
+
+ public long with(long value) {
+- return with(equalTo(value));
++ addParameterMatcher(equal(value));
++ return 0;
+ }
+
+ public float with(float value) {
+- return with(equalTo(value));
++ addParameterMatcher(equal(value));
++ return 0;
+ }
+
+ public double with(double value) {
+- return with(equalTo(value));
++ addParameterMatcher(equal(value));
++ return 0;
+ }
+
+ public <T> T with(T value) {
+- return with(equalTo(value));
++ addParameterMatcher(equal(value));
++ return value;
+ }
+
+ public void will(Action action) {
+diff -Nru jmock-2.5.1/src/org/jmock/internal/InvocationExpectationBuilder.java jmock-2.5.1-gil/src/org/jmock/internal/InvocationExpectationBuilder.java
+--- jmock-2.5.1/src/org/jmock/internal/InvocationExpectationBuilder.java 2008-06-23 10:56:29.000000000 +0200
++++ jmock-2.5.1-gil/src/org/jmock/internal/InvocationExpectationBuilder.java 2012-11-02 13:58:47.808563779 +0100
+@@ -10,10 +10,9 @@
+ import org.jmock.api.Action;
+ import org.jmock.api.Expectation;
+ import org.jmock.api.Invocation;
+-import org.jmock.internal.matcher.MethodMatcher;
+ import org.jmock.internal.matcher.MethodNameMatcher;
+ import org.jmock.internal.matcher.MockObjectMatcher;
+-import org.jmock.internal.matcher.ParametersMatcher;
++import org.jmock.internal.matcher.AllParametersMatcher;
+ import org.jmock.syntax.MethodClause;
+ import org.jmock.syntax.ParametersClause;
+ import org.jmock.syntax.ReceiverClause;
+@@ -83,14 +82,14 @@
+ }
+
+ public void createExpectationFrom(Invocation invocation) {
+- expectation.setMethodMatcher(new MethodMatcher(invocation.getInvokedMethod()));
++ expectation.setMethod(invocation.getInvokedMethod());
+
+ if (capturedParameterMatchers.isEmpty()) {
+- expectation.setParametersMatcher(new ParametersMatcher(invocation.getParametersAsArray()));
++ expectation.setParametersMatcher(new AllParametersMatcher(invocation.getParametersAsArray()));
+ }
+ else {
+ checkParameterMatcherCount(invocation);
+- expectation.setParametersMatcher(new ParametersMatcher(capturedParameterMatchers));
++ expectation.setParametersMatcher(new AllParametersMatcher(capturedParameterMatchers));
+ }
+ }
+
+@@ -130,7 +129,7 @@
+ }
+
+ public void with(Matcher<?>... parameterMatchers) {
+- expectation.setParametersMatcher(new ParametersMatcher(Arrays.asList(parameterMatchers)));
++ expectation.setParametersMatcher(new AllParametersMatcher(Arrays.asList(parameterMatchers)));
+ }
+
+ public void withNoArguments() {
+diff -Nru jmock-2.5.1/src/org/jmock/internal/InvocationExpectation.java jmock-2.5.1-gil/src/org/jmock/internal/InvocationExpectation.java
+--- jmock-2.5.1/src/org/jmock/internal/InvocationExpectation.java 2007-12-28 00:26:14.000000000 +0100
++++ jmock-2.5.1-gil/src/org/jmock/internal/InvocationExpectation.java 2012-11-02 13:58:47.807563829 +0100
+@@ -10,6 +10,7 @@
+ import org.jmock.api.Action;
+ import org.jmock.api.Expectation;
+ import org.jmock.api.Invocation;
++import org.jmock.internal.matcher.MethodMatcher;
+ import org.jmock.lib.action.VoidAction;
+
+ /**
+@@ -19,10 +20,11 @@
+ * @author smgf
+ */
+ public class InvocationExpectation implements Expectation {
++ private static ParametersMatcher ANY_PARAMETERS = new AnyParametersMatcher();
+ private Cardinality cardinality = Cardinality.ALLOWING;
+ private Matcher<?> objectMatcher = IsAnything.anything();
+- private Matcher<Method> methodMatcher = IsAnything.anything("<any method>");
+- private Matcher<Object[]> parametersMatcher = IsAnything.anything("(<any parameters>)");
++ private Matcher<? super Method> methodMatcher = IsAnything.anything("<any method>");
++ private ParametersMatcher parametersMatcher = ANY_PARAMETERS;
+ private Action action = new VoidAction();
+ private List<OrderingConstraint> orderingConstraints = new ArrayList<OrderingConstraint>();
+ private List<SideEffect> sideEffects = new ArrayList<SideEffect>();
+@@ -36,12 +38,16 @@
+ public void setObjectMatcher(Matcher<?> objectMatcher) {
+ this.objectMatcher = objectMatcher;
+ }
++
++ public void setMethod(Method method) {
++ this.methodMatcher = new MethodMatcher(method);
++ }
+
+- public void setMethodMatcher(Matcher<Method> methodMatcher) {
+- this.methodMatcher = methodMatcher;
++ public void setMethodMatcher(Matcher<? super Method> matcher) {
++ this.methodMatcher = matcher;
+ }
+
+- public void setParametersMatcher(Matcher<Object[]> parametersMatcher) {
++ public void setParametersMatcher(ParametersMatcher parametersMatcher) {
+ this.parametersMatcher = parametersMatcher;
+ }
+
+@@ -121,4 +127,14 @@
+ sideEffect.perform();
+ }
+ }
++
++ private static class AnyParametersMatcher extends IsAnything<Object[]> implements ParametersMatcher {
++ public AnyParametersMatcher() {
++ super("(<any parameters>)");
++ }
++
++ public boolean isCompatibleWith(Object[] parameters) {
++ return true;
++ }
++ };
+ }
+diff -Nru jmock-2.5.1/src/org/jmock/internal/matcher/AllParametersMatcher.java jmock-2.5.1-gil/src/org/jmock/internal/matcher/AllParametersMatcher.java
+--- jmock-2.5.1/src/org/jmock/internal/matcher/AllParametersMatcher.java 1970-01-01 01:00:00.000000000 +0100
++++ jmock-2.5.1-gil/src/org/jmock/internal/matcher/AllParametersMatcher.java 2012-11-02 13:58:47.809563730 +0100
+@@ -0,0 +1,80 @@
++package org.jmock.internal.matcher;
++
++import static java.util.Arrays.asList;
++
++import java.util.List;
++
++import org.hamcrest.Description;
++import org.hamcrest.Matcher;
++import org.hamcrest.TypeSafeDiagnosingMatcher;
++import org.hamcrest.core.IsEqual;
++import org.jmock.internal.ParametersMatcher;
++
++public class AllParametersMatcher extends TypeSafeDiagnosingMatcher<Object[]> implements ParametersMatcher {
++ private final Matcher<Object>[] elementMatchers;
++
++ public AllParametersMatcher(Object[] expectedValues) {
++ this.elementMatchers = equalMatchersFor(expectedValues);
++ }
++
++ @SuppressWarnings("unchecked")
++ public AllParametersMatcher(List<Matcher<?>> parameterMatchers) {
++ this.elementMatchers = parameterMatchers.toArray(new Matcher[0]);
++ }
++
++ public boolean isCompatibleWith(Object[] parameters) {
++ return elementMatchers.length == parameters.length;
++ }
++
++ @Override
++ public boolean matchesSafely(Object[] parameters, Description mismatch) {
++ return matchesNumberOfParameters(parameters, mismatch)
++ && matchesParameters(parameters, mismatch);
++ }
++
++ private boolean matchesNumberOfParameters(Object[] parameters, Description mismatch) {
++ if (elementMatchers.length != parameters.length) {
++ mismatch.appendText("wrong number of parameters: ")
++ .appendValue(parameters);
++ return false;
++ }
++ return true;
++ }
++
++ private boolean matchesParameters(Object[] parameters, Description mismatch) {
++ boolean result = true;
++ for (int i = 0; i < parameters.length; i++) {
++ result &= matchesParameter(parameters[i], elementMatchers[i], mismatch, i);
++ }
++ return result;
++ }
++
++ private boolean matchesParameter(final Object value, final Matcher<Object> matcher, Description mismatch, int index) {
++ mismatch.appendText("\n parameter " + index + " ");
++ final boolean parameterMatches = matcher.matches(value);
++ if (parameterMatches) {
++ mismatch.appendText("matched: ").appendDescriptionOf(matcher);
++ } else {
++ mismatch.appendText("did not match: ")
++ .appendDescriptionOf(matcher)
++ .appendText(", because ");
++ matcher.describeMismatch(value, mismatch);
++ }
++ return parameterMatches;
++ }
++
++ public void describeTo(Description description) {
++ description.appendList("(", ", ",")", asList(elementMatchers));
++ }
++
++ @SuppressWarnings("unchecked")
++ private static Matcher<Object>[] equalMatchersFor(Object[] expectedValues) {
++ Matcher<Object>[] matchers = new Matcher[expectedValues.length];
++ for (int i = 0; i < expectedValues.length; i++) {
++ matchers[i] = new IsEqual<Object>(expectedValues[i]);
++ }
++ return matchers;
++ }
++
++}
++
+diff -Nru jmock-2.5.1/src/org/jmock/internal/ParametersMatcher.java jmock-2.5.1-gil/src/org/jmock/internal/ParametersMatcher.java
+--- jmock-2.5.1/src/org/jmock/internal/ParametersMatcher.java 1970-01-01 01:00:00.000000000 +0100
++++ jmock-2.5.1-gil/src/org/jmock/internal/ParametersMatcher.java 2012-11-02 13:58:47.809563730 +0100
+@@ -0,0 +1,12 @@
++package org.jmock.internal;
++
++import org.hamcrest.Matcher;
++
++public interface ParametersMatcher extends Matcher<Object[]> {
++ /**
++ * Is this matcher likely to be relevant to the given parameters?
++ * @param parameters The parameters to be matched
++ * @return true iff the parameters may be relevant.
++ */
++ boolean isCompatibleWith(Object[] parameters);
++}
+diff -Nru jmock-2.5.1/test/org/jmock/test/acceptance/HamcrestTypeSafetyAcceptanceTests.java jmock-2.5.1-gil/test/org/jmock/test/acceptance/HamcrestTypeSafetyAcceptanceTests.java
+--- jmock-2.5.1/test/org/jmock/test/acceptance/HamcrestTypeSafetyAcceptanceTests.java 2007-02-06 17:20:50.000000000 +0100
++++ jmock-2.5.1-gil/test/org/jmock/test/acceptance/HamcrestTypeSafetyAcceptanceTests.java 2012-11-02 13:58:47.809563730 +0100
+@@ -1,7 +1,7 @@
+ package org.jmock.test.acceptance;
+
+-import static org.hamcrest.number.OrderingComparisons.greaterThan;
+-import static org.hamcrest.text.StringStartsWith.startsWith;
++import static org.hamcrest.CoreMatchers.startsWith;
++import static org.hamcrest.number.OrderingComparison.greaterThan;
+
+ import java.lang.reflect.Method;
+
+diff -Nru jmock-2.5.1/test/org/jmock/test/unit/internal/InvocationExpectationTests.java jmock-2.5.1-gil/test/org/jmock/test/unit/internal/InvocationExpectationTests.java
+--- jmock-2.5.1/test/org/jmock/test/unit/internal/InvocationExpectationTests.java 2007-06-23 10:48:36.000000000 +0200
++++ jmock-2.5.1-gil/test/org/jmock/test/unit/internal/InvocationExpectationTests.java 2012-11-02 13:58:47.811563631 +0100
+@@ -16,6 +16,7 @@
+ import org.jmock.internal.InvocationExpectation;
+ import org.jmock.internal.OrderingConstraint;
+ import org.jmock.internal.SideEffect;
++import org.jmock.internal.matcher.AllParametersMatcher;
+ import org.jmock.lib.action.ReturnValueAction;
+ import org.jmock.test.unit.support.AssertThat;
+ import org.jmock.test.unit.support.MethodFactory;
+@@ -72,7 +73,7 @@
+ Object[] differentArgCount = {1,2,3};
+ Object[] noArgs = null;
+
+- expectation.setParametersMatcher(equalTo(args));
++ expectation.setParametersMatcher(new AllParametersMatcher(args));
+
+ assertTrue("should match", expectation.matches(new Invocation(targetObject, method, args)));
+ assertTrue("should not match", !expectation.matches(new Invocation(targetObject, method, differentArgs)));
diff --git a/jmock-2.5.1-javadoc.patch b/jmock-2.5.1-javadoc.patch
new file mode 100644
index 0000000..0ffb4e8
--- /dev/null
+++ b/jmock-2.5.1-javadoc.patch
@@ -0,0 +1,20 @@
+--- build.xml 2008-06-23 14:06:51.000000000 +0200
++++ build.xml-gil 2011-07-27 20:51:11.859243192 +0200
+@@ -192,8 +192,6 @@
+
+ <target name="javadoc" depends="dir.dist">
+ <mkdir dir="build/extract/hamcrest-api"/>
+- <unzip src="lib/hamcrest-core-1.1.jar" dest="build/extract/hamcrest-api"/>
+- <unzip src="lib/hamcrest-library-1.1.jar" dest="build/extract/hamcrest-api"/>
+
+ <mkdir dir="${distdir}/doc"/>
+ <javadoc destdir="${distdir}/doc" source="1.5" failonerror="yes"
+@@ -208,8 +206,6 @@
+ </packageset>
+
+ <group title="jMock 2" packages="org.jmock, org.jmock.*"/>
+- <group title="Hamcrest API" packages="org.hamcrest"/>
+- <group title="Hamcrest Matcher Library" packages="org.hamcrest.*"/>
+
+ <link offline="false" href="http://java.sun.com/j2se/1.5.0/docs/api/"/>
+ <link offline="false" href="http://www.junit.org/junit/javadoc/3.8.1/"/>
diff --git a/jmock-2.5.1-name-clash.patch b/jmock-2.5.1-name-clash.patch
new file mode 100644
index 0000000..ddbb056
--- /dev/null
+++ b/jmock-2.5.1-name-clash.patch
@@ -0,0 +1,76 @@
+diff -Nru src/org/jmock/Expectations.java src-gil/org/jmock/Expectations.java
+--- src/org/jmock/Expectations.java 2012-08-13 12:22:27.031761235 +0200
++++ src-gil/org/jmock/Expectations.java 2012-08-13 12:26:25.000000000 +0200
+@@ -143,42 +143,42 @@
+ return null;
+ }
+
+- public boolean with(Matcher<Boolean> matcher) {
++ public boolean withBoolean(Matcher<Boolean> matcher) {
+ addParameterMatcher(matcher);
+ return false;
+ }
+
+- public byte with(Matcher<Byte> matcher) {
++ public byte withByte(Matcher<Byte> matcher) {
+ addParameterMatcher(matcher);
+ return 0;
+ }
+
+- public short with(Matcher<Short> matcher) {
++ public short withShort(Matcher<Short> matcher) {
+ addParameterMatcher(matcher);
+ return 0;
+ }
+
+- public char with(Matcher<Character> matcher) {
++ public char withCharacter(Matcher<Character> matcher) {
+ addParameterMatcher(matcher);
+ return 0;
+ }
+
+- public int with(Matcher<Integer> matcher) {
++ public int withInteger(Matcher<Integer> matcher) {
+ addParameterMatcher(matcher);
+ return 0;
+ }
+
+- public long with(Matcher<Long> matcher) {
++ public long withLong(Matcher<Long> matcher) {
+ addParameterMatcher(matcher);
+ return 0;
+ }
+
+- public float with(Matcher<Float> matcher) {
++ public float withFloat(Matcher<Float> matcher) {
+ addParameterMatcher(matcher);
+ return 0.0f;
+ }
+
+- public double with(Matcher<Double> matcher) {
++ public double withDouble(Matcher<Double> matcher) {
+ addParameterMatcher(matcher);
+ return 0.0;
+ }
+diff -Nru src/org/jmock/syntax/ArgumentConstraintPhrases.java src-gil/org/jmock/syntax/ArgumentConstraintPhrases.java
+--- src/org/jmock/syntax/ArgumentConstraintPhrases.java 2006-10-12 16:06:01.000000000 +0200
++++ src-gil/org/jmock/syntax/ArgumentConstraintPhrases.java 2012-08-13 12:27:35.000000000 +0200
+@@ -4,11 +4,11 @@
+
+ public interface ArgumentConstraintPhrases {
+ <T> T with(Matcher<T> matcher);
+- boolean with(Matcher<Boolean> matcher);
+- byte with(Matcher<Byte> matcher);
+- short with(Matcher<Short> matcher);
+- int with(Matcher<Integer> matcher);
+- long with(Matcher<Long> matcher);
+- float with(Matcher<Float> matcher);
+- double with(Matcher<Double> matcher);
++ boolean withBoolean(Matcher<Boolean> matcher);
++ byte withByte(Matcher<Byte> matcher);
++ short withShort(Matcher<Short> matcher);
++ int withInteger(Matcher<Integer> matcher);
++ long withLong(Matcher<Long> matcher);
++ float withFloat(Matcher<Float> matcher);
++ double withDouble(Matcher<Double> matcher);
+ }
diff --git a/jmock-2.5.1-poms.patch b/jmock-2.5.1-poms.patch
new file mode 100644
index 0000000..b0e1216
--- /dev/null
+++ b/jmock-2.5.1-poms.patch
@@ -0,0 +1,99 @@
+diff -Nru maven/jmock-junit4/pom.xml maven-gil/jmock-junit4/pom.xml
+--- maven/jmock-junit4/pom.xml 2008-08-26 16:28:52.000000000 +0200
++++ maven-gil/jmock-junit4/pom.xml 2012-04-19 11:05:33.000000000 +0200
+@@ -17,7 +17,7 @@
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+- <artifactId>junit-dep</artifactId>
++ <artifactId>junit</artifactId>
+ <version>4.4</version>
+ <exclusions>
+ <exclusion> <!-- Excluded as already a transitive dep of jmock -->
+diff -Nru maven/jmock-legacy/pom.xml maven-gil/jmock-legacy/pom.xml
+--- maven/jmock-legacy/pom.xml 2008-08-26 16:28:52.000000000 +0200
++++ maven-gil/jmock-legacy/pom.xml 2012-04-19 11:03:42.000000000 +0200
+@@ -21,9 +21,9 @@
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+- <groupId>cglib</groupId>
+- <artifactId>cglib-nodep</artifactId>
+- <version>2.1_3</version>
++ <groupId>net.sf.cglib</groupId>
++ <artifactId>cglib</artifactId>
++ <version>2.2</version>
+ </dependency>
+ </dependencies>
+
+diff -Nru maven/jmock-script/pom.xml maven-gil/jmock-script/pom.xml
+--- maven/jmock-script/pom.xml 2008-08-26 16:28:52.000000000 +0200
++++ maven-gil/jmock-script/pom.xml 2012-04-19 10:58:33.000000000 +0200
+@@ -15,9 +15,9 @@
+ <version>${pom.version}</version>
+ </dependency>
+ <dependency>
+- <groupId>org.beanshell</groupId>
++ <groupId>bsh</groupId>
+ <artifactId>bsh</artifactId>
+- <version>2.0b4</version>
++ <version>1.3.0</version>
+ </dependency>
+ </dependencies>
+ </project>
+\ Manca newline alla fine del file
+diff -Nru maven/pom.xml maven-gil/pom.xml
+--- maven/pom.xml 2008-08-26 16:28:52.000000000 +0200
++++ maven-gil/pom.xml 2012-04-19 11:14:07.786932958 +0200
+@@ -52,7 +52,7 @@
+ </archive>
+ </configuration>
+ </plugin>
+- <plugin>
++ <!--plugin>
+ <groupId>org.codehaus.groovy.maven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <version>1.0-rc-2</version>
+@@ -103,7 +103,7 @@
+ </configuration>
+ </execution>
+ </executions>
+- </plugin>
++ </plugin-->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+@@ -134,13 +134,13 @@
+ </configuration>
+ </plugin>
+ </plugins>
+- <extensions>
++ <!--extensions>
+ <extension>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-webdav</artifactId>
+ <version>1.0-beta-2</version>
+ </extension>
+- </extensions>
++ </extensions-->
+ </build>
+
+ <properties>
+@@ -150,7 +150,7 @@
+ </properties>
+
+ <profiles>
+- <profile>
++ <!--profile>
+ <id>jmock1</id>
+ <modules>
+ <module>jmock-core</module>
+@@ -160,7 +160,7 @@
+ <release.version>1.2.0</release.version>
+ <download.artifact.dir>${basedir}/../${download.dir}/${download.name}</download.artifact.dir>
+ </properties>
+- </profile>
++ </profile-->
+ <profile>
+ <id>jmock2</id>
+ <modules>
diff --git a/jmock-2.5.1-use_system_libraries.patch b/jmock-2.5.1-use_system_libraries.patch
new file mode 100644
index 0000000..ee69484
--- /dev/null
+++ b/jmock-2.5.1-use_system_libraries.patch
@@ -0,0 +1,31 @@
+--- build.xml 2008-06-23 14:06:51.000000000 +0200
++++ build.xml-gil 2012-08-13 12:21:15.007275254 +0200
+@@ -3,7 +3,13 @@
+ <property name="distdir" value="build/jmock-${version}"/>
+
+ <path id="build.classpath">
+- <fileset dir="lib" includes="*.jar" excludes="*-src.jar"/>
++ <fileset dir="/usr/share/java" includes="bsh.jar"/>
++ <fileset dir="/usr/share/java" includes="cglib.jar"/>
++ <fileset dir="/usr/share/java" includes="hamcrest12/core.jar"/>
++ <fileset dir="/usr/share/java" includes="hamcrest12/library.jar"/>
++ <fileset dir="/usr/share/java" includes="junit4.jar"/>
++ <fileset dir="/usr/share/java" includes="objenesis.jar"/>
++ <fileset dir="/usr/share/java" includes="objectweb-asm/asm.jar"/>
+ </path>
+
+ <target name="build"
+@@ -225,6 +231,13 @@
+ <classpath>
+ <path refid="build.classpath"/>
+ <fileset dir="${distdir}" includes="*.jar"/>
++ <fileset dir="/usr/share/java" includes="bsh.jar"/>
++ <fileset dir="/usr/share/java" includes="cglib.jar"/>
++ <fileset dir="/usr/share/java" includes="hamcrest12/core.jar"/>
++ <fileset dir="/usr/share/java" includes="hamcrest12/library.jar"/>
++ <fileset dir="/usr/share/java" includes="junit4.jar"/>
++ <fileset dir="/usr/share/java" includes="objenesis.jar"/>
++ <fileset dir="/usr/share/java" includes="objectweb-asm/asm.jar"/>
+ </classpath>
+
+ <formatter type="brief" usefile="no"/>
diff --git a/jmock.spec b/jmock.spec
new file mode 100644
index 0000000..12cafea
--- /dev/null
+++ b/jmock.spec
@@ -0,0 +1,146 @@
+%global namedreltag %{nil}
+%global namedversion %{version}%{?namedreltag}
+
+Name: jmock
+Version: 2.5.1
+Release: 1%{?dist}
+Summary: Java library for testing code with mock objects
+Group: Development/Libraries
+License: BSD
+Url: http://www.jmock.org/
+# svn export http://svn.codehaus.org/jmock/tags/2.5.1 jmock-2.5.1
+# find jmock-2.5.1 -name "*.jar" -type f -delete
+# find jmock-2.5.1 -name "*.class" -delete
+# svn export http://svn.codehaus.org/jmock/tags/packaging-maven-2.5.1 jmock-2.5.1/maven
+# tar czf jmock-2.5.1-clean-src-svn.tar.gz jmock-2.5.1
+Source0: %{name}-%{namedversion}-clean-src-svn.tar.gz
+Patch0: %{name}-%{namedversion}-use_system_libraries.patch
+# build with cglib 2.2
+Patch1: %{name}-%{namedversion}-cglib22.patch
+# patch for java6
+Patch2: %{name}-%{namedversion}-DeterministicSchedule.patch
+# remove hamcrest classes
+Patch3: %{name}-%{namedversion}-javadoc.patch
+# remove
+# gmaven
+# wagon-webdav
+# profile jmock1
+# change
+# cglib cglib-nodep 2.1_3 -> net.sf.cglib cglib 2.2
+# junit-dep -> junit
+Patch4: %{name}-%{namedversion}-poms.patch
+# from Debian
+Patch5: %{name}-%{namedversion}-hamcrest12.patch
+# build fix for java 7
+Patch6: %{name}-%{namedversion}-name-clash.patch
+
+BuildRequires: java-devel >= 1:1.6.0
+BuildRequires: jpackage-utils
+
+BuildRequires: ant
+BuildRequires: ant-junit
+BuildRequires: bsh
+BuildRequires: cglib
+BuildRequires: hamcrest12
+BuildRequires: junit4
+BuildRequires: objectweb-asm
+BuildRequires: objenesis
+
+Requires: bsh
+Requires: hamcrest12
+Requires: junit4
+
+Requires: objenesis
+Requires: java >= 1:1.6.0
+Requires: jpackage-utils
+BuildArch: noarch
+
+%description
+Mock objects help you design and test the interactions between the objects in
+your programs.
+The jMock library:
+ * makes it quick and easy to define mock objects, so you don't break the
+ rhythm of programming.
+ * lets you precisely specify the interactions between your objects, reducing
+ the brittleness of your tests.
+ * works well with the auto-completion and re-factoring features of your IDE
+ * plugs into your favorite test framework
+ * is easy to extend.
+
+%package javadoc
+Group: Documentation
+Summary: Javadoc for %{name}
+Requires: jpackage-utils
+
+%description javadoc
+This package contains javadoc for %{name}.
+
+%prep
+%setup -q
+%patch0 -p0
+%patch1 -p1
+%patch2 -p0
+%patch3 -p0
+%patch4 -p0
+%patch5 -p1
+%patch6 -p0
+
+# fix non ASCII chars
+for s in test/org/jmock/example/sniper/Money.java;do
+ native2ascii -encoding UTF8 ${s} ${s}
+done
+
+# TODO this test fails
+rm -r test/org/jmock/test/acceptance/ParameterMatchingAcceptanceTests.java \
+ test/org/jmock/test/acceptance/PrimitiveParameterTypesAcceptanceTests.java
+
+%build
+
+ant \
+ -Dant.build.javac.source=1.5 \
+ -Dant.build.javac.target=1.5 \
+ -Dversion=%{namedversion} \
+ zip.jars javadoc
+
+%install
+
+mkdir -p %{buildroot}%{_mavenpomdir}
+install -pm 644 maven/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-parent.pom
+%add_maven_depmap JPP.%{name}-parent.pom
+
+mkdir -p %{buildroot}%{_javadir}/%{name}
+for m in %{name} \
+ %{name}-junit3 \
+ %{name}-junit4 \
+ %{name}-legacy \
+ %{name}-script;do
+ install -m 644 build/%{name}-%{namedversion}/${m}-%{namedversion}.jar %{buildroot}%{_javadir}/%{name}/${m}.jar
+ install -pm 644 maven/${m}/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-${m}.pom
+ %add_maven_depmap JPP.%{name}-${m}.pom %{name}/${m}.jar
+done
+
+sed -i 's|<version>x-SNAPSHOT</version>|<version>%{namedversion}</version>|' maven/%{name}-core/pom.xml
+sed -i 's|<artifactId>%{name}-core</artifactId>|<artifactId>%{name}-tests</artifactId>|' maven/%{name}-core/pom.xml
+sed -i 's|<name>jMock 1 Core</name>|<name>jMock 2 Tests</name>|' maven/%{name}-core/pom.xml
+install -m 644 build/%{name}-%{namedversion}/%{name}-tests-%{namedversion}.jar \
+ %{buildroot}%{_javadir}/%{name}/%{name}-tests.jar
+install -pm 644 maven/%{name}-core/pom.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-%{name}-tests.pom
+%add_maven_depmap JPP.%{name}-%{name}-tests.pom %{name}/%{name}-tests.jar
+
+mkdir -p %{buildroot}%{_javadocdir}/%{name}
+cp -pr build/%{name}-%{namedversion}/doc/* %{buildroot}%{_javadocdir}/%{name}
+
+%files
+%dir %{_javadir}/%{name}
+%{_javadir}/%{name}/*.jar
+%{_mavenpomdir}/JPP.%{name}-*.pom
+%{_mavendepmapfragdir}/%{name}
+%doc LICENSE.txt README*
+
+%files javadoc
+%{_javadocdir}/%{name}
+%doc LICENSE.txt
+
+%changelog
+* Thu Apr 19 2012 gil cattaneo <puntogil(a)libero.it> 2.5.1-1
+- initial rpm
\ No newline at end of file
diff --git a/sources b/sources
index e69de29..e9122b1 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+6872fad3b778b3cc5a82cd50e2208ecd jmock-2.5.1-clean-src-svn.tar.gz
11 years, 6 months
[maven-parent] Add missing BR/R: apache-parent
by Mikolaj Izdebski
commit 3a4e24eea9f76647ceff4d0af2a44dccd69a8871
Author: Mikolaj Izdebski <mizdebsk(a)redhat.com>
Date: Fri Nov 2 18:25:58 2012 +0100
Add missing BR/R: apache-parent
- Update to current packaging guidelines
maven-parent.spec | 30 +++++++++++++-----------------
1 files changed, 13 insertions(+), 17 deletions(-)
---
diff --git a/maven-parent.spec b/maven-parent.spec
index 0606357..1b7cb45 100644
--- a/maven-parent.spec
+++ b/maven-parent.spec
@@ -1,20 +1,20 @@
Name: maven-parent
Version: 20
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Apache Maven parent POM
Group: Development/Libraries
License: ASL 2.0
URL: http://maven.apache.org
Source0: http://repo1.maven.org/maven2/org/apache/maven/%{name}/%{version}/%{name}...
-
BuildArch: noarch
-BuildRequires: jpackage-utils >= 0:1.7.5-5
+BuildRequires: jpackage-utils
+BuildRequires: maven
+BuildRequires: apache-parent
-Requires: jpackage-utils
-Requires(post): jpackage-utils >= 0:1.7.5-5
-Requires(postun): jpackage-utils >= 0:1.7.5-5
+Requires: jpackage-utils
+Requires: apache-parent
%description
Apache Maven parent POM file used by other Maven projects.
@@ -22,29 +22,25 @@ Apache Maven parent POM file used by other Maven projects.
%prep
%setup -q
-%build
-#nothing to do for the pom
+%check
+mvn-rpmbuild verify
%install
# poms
install -d -m 755 %{buildroot}%{_mavenpomdir}
-install -pm 644 pom.xml \
- %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
-
+install -p -m 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
%add_maven_depmap JPP-%{name}.pom
-%post
-%update_maven_depmap
-
-%postun
-%update_maven_depmap
-
%files
%doc LICENSE NOTICE
%{_mavenpomdir}/JPP-%{name}.pom
%{_mavendepmapfragdir}/%{name}
%changelog
+* Fri Nov 2 2012 Mikolaj Izdebski <mizdebsk(a)redhat.com> - 20-4
+- Add missing BR/R: apache-parent
+- Update to current packaging guidelines
+
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng(a)lists.fedoraproject.org> - 20-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
11 years, 6 months