diff --git a/.easymock2.metadata b/.easymock2.metadata new file mode 100644 index 0000000..b8f8bf4 --- /dev/null +++ b/.easymock2.metadata @@ -0,0 +1,2 @@ +72edf0c08ee0ff45b97505c0b49f000d4ea9946a SOURCES/build.xml.tar.gz +f43efa2e6d2ee31b0db5cbb5ed830711f378e9ba SOURCES/easymock-2.5.2.tgz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..10b4c36 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +SOURCES/build.xml.tar.gz +SOURCES/easymock-2.5.2.tgz diff --git a/SOURCES/easymock-MANIFEST.MF b/SOURCES/easymock-MANIFEST.MF new file mode 100644 index 0000000..4fb32a1 --- /dev/null +++ b/SOURCES/easymock-MANIFEST.MF @@ -0,0 +1,11 @@ +Manifest-Version: 1.0 +Bundle-Vendor: %bundleVendor +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: J2SE-1.5 +Bundle-Name: %bundleName +Bundle-SymbolicName: org.easymock +Export-Package: org.easymock;version="2.4.0",org.easymock.internal;ver + sion="2.4.0",org.easymock.internal.matchers;version="2.4.0" +Bundle-Version: 2.4.0.v20090202-0900 +Bundle-ManifestVersion: 2 + diff --git a/SOURCES/easymock2-nameClash.patch b/SOURCES/easymock2-nameClash.patch new file mode 100644 index 0000000..d9cc6c8 --- /dev/null +++ b/SOURCES/easymock2-nameClash.patch @@ -0,0 +1,652 @@ +diff -r d382aea89c3d easymock/src/main/java/org/easymock/EasyMock.java +--- a/easymock/src/main/java/org/easymock/EasyMock.java Thu Feb 23 10:32:43 2012 +0100 ++++ b/easymock/src/main/java/org/easymock/EasyMock.java Thu Feb 23 11:25:46 2012 +0100 +@@ -1452,81 +1452,200 @@ + + /** + * Expect any object but captures it for later use. +- * +- * @param Type of the captured object +- * @param captured Where the parameter is captured ++ * ++ * @param ++ * Type of the captured object ++ * @param captured ++ * Where the parameter is captured + * @return null + */ +- public static T capture(Capture captured) { ++ public static T capture(final Capture captured) { + reportMatcher(new Captures(captured)); + return null; + } +- ++ ++ /** ++ * Expect any boolean but captures it for later use. ++ * ++ * @param captured ++ * Where the parameter is captured ++ * @return false ++ */ ++ public static boolean captureBoolean(final Capture captured) { ++ reportMatcher(new Captures(captured)); ++ return false; ++ } ++ ++// /** ++// * Expect any boolean but captures it for later use. ++// * ++// * @param captured ++// * Where the parameter is captured ++// * @return 0 ++// * ++// * @deprecated Because of harder erasure enforcement, doesn't compile in ++// * Java 7 ++// */ ++// @Deprecated ++// public static boolean capture(final Capture captured) { ++// return captureBoolean(captured); ++// } ++ + /** + * Expect any int but captures it for later use. +- * +- * @param captured Where the parameter is captured ++ * ++ * @param captured ++ * Where the parameter is captured + * @return 0 + */ +- public static int capture(Capture captured) { ++ public static int captureInt(final Capture captured) { + reportMatcher(new Captures(captured)); + return 0; + } +- ++// /** ++// * Expect any int but captures it for later use. ++// * ++// * @param captured ++// * Where the parameter is captured ++// * @return 0 ++// * ++// * @deprecated Because of harder erasure enforcement, doesn't compile in ++// * Java 7 ++// */ ++// @Deprecated ++// public static int capture(final Capture captured) { ++// return captureInt(captured); ++// } ++ + /** + * Expect any long but captures it for later use. +- * +- * @param captured Where the parameter is captured ++ * ++ * @param captured ++ * Where the parameter is captured + * @return 0 + */ +- public static long capture(Capture captured) { ++ public static long captureLong(final Capture captured) { + reportMatcher(new Captures(captured)); + return 0; + } +- ++// /** ++// * Expect any long but captures it for later use. ++// * ++// * @param captured ++// * Where the parameter is captured ++// * @return 0 ++// * ++// * @deprecated Because of harder erasure enforcement, doesn't compile in ++// * Java 7 ++// */ ++// @Deprecated ++// public static long capture(final Capture captured) { ++// return captureLong(captured); ++// } ++ + /** + * Expect any float but captures it for later use. +- * +- * @param captured Where the parameter is captured ++ * ++ * @param captured ++ * Where the parameter is captured + * @return 0 + */ +- public static float capture(Capture captured) { ++ public static float captureFloat(final Capture captured) { + reportMatcher(new Captures(captured)); + return 0; + } +- ++// /** ++// * Expect any float but captures it for later use. ++// * ++// * @param captured ++// * Where the parameter is captured ++// * @return 0 ++// * ++// * @deprecated Because of harder erasure enforcement, doesn't compile in ++// * Java 7 ++// */ ++// @Deprecated ++// public static float capture(final Capture captured) { ++// return captureFloat(captured); ++// } ++ + /** + * Expect any double but captures it for later use. +- * +- * @param captured Where the parameter is captured ++ * ++ * @param captured ++ * Where the parameter is captured + * @return 0 + */ +- public static double capture(Capture captured) { ++ public static double captureDouble(final Capture captured) { + reportMatcher(new Captures(captured)); + return 0; + } ++// /** ++// * Expect any double but captures it for later use. ++// * ++// * @param captured ++// * Where the parameter is captured ++// * @return 0 ++// * ++// * @deprecated Because of harder erasure enforcement, doesn't compile in ++// * Java 7 ++// */ ++// @Deprecated ++// public static double capture(final Capture captured) { ++// return captureDouble(captured); ++// } + + /** + * Expect any byte but captures it for later use. +- * +- * @param captured Where the parameter is captured ++ * ++ * @param captured ++ * Where the parameter is captured + * @return 0 + */ +- public static byte capture(Capture captured) { ++ public static byte captureByte(final Capture captured) { + reportMatcher(new Captures(captured)); + return 0; + } +- ++// /** ++// * Expect any byte but captures it for later use. ++// * ++// * @param captured ++// * Where the parameter is captured ++// * @return 0 ++// * ++// * @deprecated Because of harder erasure enforcement, doesn't compile in ++// * Java 7 ++// */ ++// @Deprecated ++// public static byte capture(final Capture captured) { ++// return captureByte(captured); ++// } ++ + /** + * Expect any char but captures it for later use. +- * +- * @param captured Where the parameter is captured ++ * ++ * @param captured ++ * Where the parameter is captured + * @return 0 + */ +- public static char capture(Capture captured) { ++ public static char captureChar(final Capture captured) { + reportMatcher(new Captures(captured)); + return 0; + } ++// /** ++// * Expect any char but captures it for later use. ++// * ++// * @param captured ++// * Where the parameter is captured ++// * @return 0 ++// * ++// * @deprecated Because of harder erasure enforcement, doesn't compile in ++// * Java 7 ++// */ ++// @Deprecated ++// public static char capture(final Capture captured) { ++// return captureChar(captured); ++// } + + /** + * Switches the given mock objects (more exactly: the controls of the mock +diff -r d382aea89c3d easymock/src/test/java/org/easymock/tests2/CaptureTest.java +--- a/easymock/src/test/java/org/easymock/tests2/CaptureTest.java Thu Feb 23 10:32:43 2012 +0100 ++++ b/easymock/src/test/java/org/easymock/tests2/CaptureTest.java Thu Feb 23 11:25:46 2012 +0100 +@@ -1,12 +1,12 @@ +-/* +- * Copyright 2003-2009 OFFIS, Henri Tremblay +- * ++/** ++ * Copyright 2001-2011 the original author or authors. ++ * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at +- * ++ * + * http://www.apache.org/licenses/LICENSE-2.0 +- * ++ * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@@ -27,10 +27,13 @@ + import org.junit.Before; + import org.junit.Test; + ++/** ++ * @author Henri Tremblay ++ */ + public class CaptureTest { + + public static class A { +- public String foo(IMethods methods) { ++ public String foo(final IMethods methods) { + return methods.oneArg(2); + } + } +@@ -42,16 +45,16 @@ + @After + public void tearDown() throws Exception { + } +- +- private Capture testCaptureType(CaptureType type) { +- IMethods mock = createMock(IMethods.class); +- Capture captured = new Capture(type); +- +- expect(mock.oneArg(capture(captured))).andReturn("1"); ++ ++ private Capture testCaptureType(final CaptureType type) { ++ final IMethods mock = createMock(IMethods.class); ++ final Capture captured = new Capture(type); ++ ++ expect(mock.oneArg(captureInt(captured))).andReturn("1"); + expect(mock.oneArg(anyInt())).andReturn("1"); +- expect(mock.oneArg(capture(captured))).andReturn("2").times(2); +- mock.twoArgumentMethod(capture(captured), eq(5)); +- mock.twoArgumentMethod(capture(captured), capture(captured)); ++ expect(mock.oneArg(captureInt(captured))).andReturn("2").times(2); ++ mock.twoArgumentMethod(captureInt(captured), eq(5)); ++ mock.twoArgumentMethod(captureInt(captured), captureInt(captured)); + + replay(mock); + +@@ -66,28 +69,28 @@ + + return captured; + } +- ++ + @Test + public void testCaptureFirst() { +- Capture captured = testCaptureType(CaptureType.FIRST); ++ final Capture captured = testCaptureType(CaptureType.FIRST); + assertEquals(0, (int) captured.getValue()); + } + + @Test + public void testCaptureLast() { +- Capture captured = testCaptureType(CaptureType.LAST); ++ final Capture captured = testCaptureType(CaptureType.LAST); + assertEquals(7, (int) captured.getValue()); + } + + @Test + public void testCaptureAll() { +- Capture captured = testCaptureType(CaptureType.ALL); ++ final Capture captured = testCaptureType(CaptureType.ALL); + assertEquals(Arrays.asList(0, 2, 3, 4, 6, 7), captured.getValues()); + } + + @Test + public void testCaptureNone() { +- Capture captured = testCaptureType(CaptureType.NONE); ++ final Capture captured = testCaptureType(CaptureType.NONE); + assertFalse(captured.hasCaptured()); + } + +@@ -96,11 +99,10 @@ + + @Test + public void testCaptureRightOne() { +- Capture captured = new Capture(); +- IMethods mock = createMock(IMethods.class); ++ final Capture captured = new Capture(); ++ final IMethods mock = createMock(IMethods.class); + +- expect(mock.oneArg(and(eq("test"), capture(captured)))).andReturn( +- "answer1"); ++ expect(mock.oneArg(and(eq("test"), capture(captured)))).andReturn("answer1"); + expect(mock.oneArg("a")).andReturn("answer2"); + + replay(mock); +@@ -114,10 +116,11 @@ + verify(mock); + } + ++ @SuppressWarnings("deprecation") + @Test + public void testPrimitiveVsObject() { +- Capture capture = new Capture(); +- IMethods mock = createMock(IMethods.class); ++ final Capture capture = new Capture(); ++ final IMethods mock = createMock(IMethods.class); + + expect(mock.oneArg(capture(capture))).andReturn("answer"); + expect(mock.oneArg((Integer) capture(capture))).andReturn("answer"); +@@ -135,11 +138,10 @@ + + @Test + public void testAnd() { +- Capture captured = new Capture(); +- IMethods mock = createMock(IMethods.class); ++ final Capture captured = new Capture(); ++ final IMethods mock = createMock(IMethods.class); + +- expect(mock.oneArg(and(capture(captured), eq("test")))).andReturn( +- "answer"); ++ expect(mock.oneArg(and(capture(captured), eq("test")))).andReturn("answer"); + + replay(mock); + +@@ -148,17 +150,19 @@ + + verify(mock); + } +- ++ ++ @SuppressWarnings("deprecation") + @Test +- public void testPrimitive() { +- Capture captureI = new Capture(); +- Capture captureL = new Capture(); +- Capture captureF = new Capture(); +- Capture captureD = new Capture(); +- Capture captureB = new Capture(); +- Capture captureC = new Capture(); ++ public void testPrimitiveDeprecated() { ++ final Capture captureI = new Capture(); ++ final Capture captureL = new Capture(); ++ final Capture captureF = new Capture(); ++ final Capture captureD = new Capture(); ++ final Capture captureB = new Capture(); ++ final Capture captureC = new Capture(); ++ final Capture captureBool = new Capture(); + +- IMethods mock = createMock(IMethods.class); ++ final IMethods mock = createMock(IMethods.class); + + expect(mock.oneArg(capture(captureI))).andReturn("answerI"); + expect(mock.oneArg(capture(captureL))).andReturn("answerL"); +@@ -166,6 +170,7 @@ + expect(mock.oneArg(capture(captureD))).andReturn("answerD"); + expect(mock.oneArg(capture(captureB))).andReturn("answerB"); + expect(mock.oneArg(capture(captureC))).andReturn("answerC"); ++ expect(mock.oneArg(capture(captureBool))).andReturn("answerZ"); + + replay(mock); + +@@ -175,6 +180,7 @@ + assertEquals("answerD", mock.oneArg(4.0)); + assertEquals("answerB", mock.oneArg((byte) 5)); + assertEquals("answerC", mock.oneArg((char) 6)); ++ assertEquals("answerZ", mock.oneArg(true)); + + assertEquals(1, captureI.getValue().intValue()); + assertEquals(2l, captureL.getValue().longValue()); +@@ -182,19 +188,60 @@ + assertEquals(4.0, captureD.getValue().doubleValue(), 0.0); + assertEquals((byte) 5, captureB.getValue().byteValue()); + assertEquals((char) 6, captureC.getValue().charValue()); +- ++ assertEquals(true, captureBool.getValue().booleanValue()); ++ + verify(mock); + } +- ++ ++ @Test ++ public void testPrimitive() { ++ final Capture captureI = new Capture(); ++ final Capture captureL = new Capture(); ++ final Capture captureF = new Capture(); ++ final Capture captureD = new Capture(); ++ final Capture captureB = new Capture(); ++ final Capture captureC = new Capture(); ++ final Capture captureBool = new Capture(); ++ ++ final IMethods mock = createMock(IMethods.class); ++ ++ expect(mock.oneArg(captureInt(captureI))).andReturn("answerI"); ++ expect(mock.oneArg(captureLong(captureL))).andReturn("answerL"); ++ expect(mock.oneArg(captureFloat(captureF))).andReturn("answerF"); ++ expect(mock.oneArg(captureDouble(captureD))).andReturn("answerD"); ++ expect(mock.oneArg(captureByte(captureB))).andReturn("answerB"); ++ expect(mock.oneArg(captureChar(captureC))).andReturn("answerC"); ++ expect(mock.oneArg(captureBoolean(captureBool))).andReturn("answerZ"); ++ ++ replay(mock); ++ ++ assertEquals("answerI", mock.oneArg(1)); ++ assertEquals("answerL", mock.oneArg(2l)); ++ assertEquals("answerF", mock.oneArg(3.0f)); ++ assertEquals("answerD", mock.oneArg(4.0)); ++ assertEquals("answerB", mock.oneArg((byte) 5)); ++ assertEquals("answerC", mock.oneArg((char) 6)); ++ assertEquals("answerZ", mock.oneArg(true)); ++ ++ assertEquals(1, captureI.getValue().intValue()); ++ assertEquals(2l, captureL.getValue().longValue()); ++ assertEquals(3.0f, captureF.getValue().floatValue(), 0.0); ++ assertEquals(4.0, captureD.getValue().doubleValue(), 0.0); ++ assertEquals((byte) 5, captureB.getValue().byteValue()); ++ assertEquals((char) 6, captureC.getValue().charValue()); ++ assertEquals(true, captureBool.getValue().booleanValue()); ++ ++ verify(mock); ++ } ++ + @Test + public void testCapture() { +- Capture capture = new Capture(); ++ final Capture capture = new Capture(); + assertFalse(capture.hasCaptured()); + try { + capture.getValue(); + fail("Should not be allowed"); +- } +- catch(AssertionError e) { ++ } catch (final AssertionError e) { + assertEquals("Nothing captured yet", e.getMessage()); + } + assertEquals("Nothing captured yet", capture.toString()); +@@ -207,29 +254,26 @@ + try { + capture.getValue(); + fail(); +- } +- catch(AssertionError e) { ++ } catch (final AssertionError e) { + assertEquals("Nothing captured yet", e.getMessage()); + } +- ++ + capture.setValue(null); + assertTrue(capture.hasCaptured()); + assertNull(capture.getValue()); + assertEquals("null", capture.toString()); + } +- ++ + @Test + public void testCaptureMultiple() { +- Capture capture = new Capture(CaptureType.ALL); ++ final Capture capture = new Capture(CaptureType.ALL); + capture.setValue("a"); + capture.setValue("b"); + try { + capture.getValue(); + fail(); +- } catch (AssertionError e) { +- assertEquals( +- "More than one value captured: " + capture.getValues(), e +- .getMessage()); ++ } catch (final AssertionError e) { ++ assertEquals("More than one value captured: " + capture.getValues(), e.getMessage()); + } + assertEquals(Arrays.asList("a", "b"), capture.getValues()); + } +@@ -237,30 +281,26 @@ + @Test + public void testCapture_2617107() { + +- IMethods mock = createMock(IMethods.class); ++ final IMethods mock = createMock(IMethods.class); + +- Capture cap1 = new Capture(); +- Capture cap2 = new Capture(); +- Capture cap3 = new Capture(); +- Capture cap4 = new Capture(); ++ final Capture cap1 = new Capture(); ++ final Capture cap2 = new Capture(); ++ final Capture cap3 = new Capture(); ++ final Capture cap4 = new Capture(); + +- mock.simpleMethodWithArgument(and(isA(String.class), +- capture(cap1))); +- mock.simpleMethodWithArgument(and(isA(String.class), +- capture(cap2))); +- mock.simpleMethodWithArgument(and(isA(String.class), +- capture(cap3))); +- mock.simpleMethodWithArgument(and(isA(String.class), +- capture(cap4))); ++ mock.simpleMethodWithArgument(and(isA(String.class), capture(cap1))); ++ mock.simpleMethodWithArgument(and(isA(String.class), capture(cap2))); ++ mock.simpleMethodWithArgument(and(isA(String.class), capture(cap3))); ++ mock.simpleMethodWithArgument(and(isA(String.class), capture(cap4))); + + replay(mock); + + final String[] s = { "one", "two", "three", "four" }; + +- for (int i = 0; i < s.length; i++) { +- mock.simpleMethodWithArgument(s[i]); ++ for (final String element : s) { ++ mock.simpleMethodWithArgument(element); + } +- ++ + assertEquals("one", cap1.getValue()); + assertEquals("two", cap2.getValue()); + assertEquals("three", cap3.getValue()); +@@ -268,7 +308,7 @@ + + verify(mock); + } +- ++ + @Test + public void testCaptureNonStrictControl_2133741() { + testCaptureHelper(createMock(IMethods.class)); +@@ -279,9 +319,9 @@ + testCaptureHelper(createStrictMock(IMethods.class)); + } + +- protected void testCaptureHelper(IMethods mock) { +- Capture capture1 = new Capture(); +- Capture capture2 = new Capture(); ++ protected void testCaptureHelper(final IMethods mock) { ++ final Capture capture1 = new Capture(); ++ final Capture capture2 = new Capture(); + + mock.simpleMethodWithArgument(capture(capture1)); + mock.simpleMethodWithArgument(capture(capture2)); +@@ -294,25 +334,25 @@ + assertTrue(capture1.hasCaptured()); + assertTrue(capture2.hasCaptured()); + assertFalse(capture1.getValue() == capture2.getValue()); +- } +- ++ } ++ + @Test + public void testCapture1_2446744() { +- Capture capture1 = new Capture(); +- Capture capture2 = new Capture(); +- Capture capture3 = new Capture(); +- IMethods mock = createMock(IMethods.class); ++ final Capture capture1 = new Capture(); ++ final Capture capture2 = new Capture(); ++ final Capture capture3 = new Capture(); ++ final IMethods mock = createMock(IMethods.class); + expect(mock.oneArg(capture(capture1))).andReturn("1").once(); + expect(mock.oneArg(capture(capture2))).andReturn("2").once(); + expect(mock.oneArg(capture(capture3))).andReturn("3").once(); +- ++ + replay(mock); +- ++ + for (int i = 0; i < 3; i++) { +- String string = "Run" + (i + 1); ++ final String string = "Run" + (i + 1); + mock.oneArg(string); + } +- ++ + assertEquals("Run3", capture3.getValue()); + assertEquals("Run2", capture2.getValue()); + assertEquals("Run1", capture1.getValue()); +@@ -320,16 +360,16 @@ + + @Test + public void testCapture2_2446744() { +- Capture capture = new Capture(CaptureType.ALL); +- IMethods mock = createMock(IMethods.class); ++ final Capture capture = new Capture(CaptureType.ALL); ++ final IMethods mock = createMock(IMethods.class); + expect(mock.oneArg(capture(capture))).andReturn("1").once(); + expect(mock.oneArg(capture(capture))).andReturn("2").once(); + expect(mock.oneArg(capture(capture))).andReturn("3").once(); +- ++ + replay(mock); +- ++ + for (int i = 0; i < 3; i++) { +- String string = "Run" + (i + 1); ++ final String string = "Run" + (i + 1); + mock.oneArg(string); + } + +@@ -338,8 +378,8 @@ + + @Test + public void testCaptureFromStub() { +- Capture capture = new Capture(CaptureType.ALL); +- IMethods mock = createMock(IMethods.class); ++ final Capture capture = new Capture(CaptureType.ALL); ++ final IMethods mock = createMock(IMethods.class); + expect(mock.oneArg(capture(capture))).andStubReturn("1"); + + replay(mock); diff --git a/SOURCES/fetch-easymock.sh b/SOURCES/fetch-easymock.sh new file mode 100644 index 0000000..92bc93a --- /dev/null +++ b/SOURCES/fetch-easymock.sh @@ -0,0 +1,4 @@ +#!/bin/sh +VERSION=2.5.2 +svn export https://easymock.svn.sourceforge.net/svnroot/easymock/tags/easymock-$VERSION/ easymock +tar -czf easymock-$VERSION.tgz easymock \ No newline at end of file diff --git a/SPECS/easymock2.spec b/SPECS/easymock2.spec new file mode 100644 index 0000000..41b4bd8 --- /dev/null +++ b/SPECS/easymock2.spec @@ -0,0 +1,147 @@ +Name: easymock2 +Version: 2.5.2 +Release: 12%{?dist} +Summary: Easy mock objects +License: ASL 2.0 +Group: Development/Languages +URL: http://easymock.org/ +# generated by sh fetch-easymock.sh +Source0: easymock-%{version}.tgz +# extracted from http://download.eclipse.org/tools/orbit/downloads/drops/R20090529135407/bundles/org.easymock_2.4.0.v20090202-0900.jar#META-INF/MANIFEST.MF +Source1: easymock-MANIFEST.MF +# generated by mvn ant:ant +Source2: build.xml.tar.gz +Source3: fetch-easymock.sh +Patch0: easymock2-nameClash.patch + +BuildRequires: jpackage-utils >= 0:1.7.2 +BuildRequires: ant >= 0:1.6 +BuildRequires: junit >= 3.8.1 +BuildRequires: java-javadoc +BuildRequires: zip +Requires: java +BuildArch: noarch +Requires: jpackage-utils >= 0:1.7.2 + +%description +EasyMock provides Mock Objects for interfaces in JUnit tests by generating +them on the fly using Java's proxy mechanism. Due to EasyMock's unique style +of recording expectations, most refactorings will not affect the Mock Objects. +So EasyMock is a perfect fit for Test-Driven Development. + +%package javadoc +Summary: Javadoc for %{name} +Group: Documentation + +%description javadoc +Javadoc for %{name}. + +%prep +%setup -q -n easymock +%patch0 -p2 +mkdir -p .m2/repository/JPP/maven2/default_poms +tar xzf %{SOURCE2} + +# remove all binary libs +find . -name "*.jar" -exec rm -f {} \; + +%build +ant -Dmaven.mode.offline=true -Dmaven.repo.local=.m2 -Dmaven.test.skip=true package javadoc +mv target/easymock-2.5.jar target/%{name}-%{version}.jar + +# inject OSGi manifests +mkdir -p META-INF +cp -p %{SOURCE1} META-INF/MANIFEST.MF +touch META-INF/MANIFEST.MF +zip -u target/%{name}-%{version}.jar META-INF/MANIFEST.MF + +%install +# jars +install -d -m 755 %{buildroot}%{_javadir} + +install -m 644 target/%{name}-%{version}.jar \ + %{buildroot}%{_javadir}/%{name}.jar + +# pom +install -d -m 755 %{buildroot}%{_mavenpomdir} +install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom +%add_maven_depmap -v 2.4 + +# javadoc +install -d -m 755 %{buildroot}%{_javadocdir}/%{name}-%{version} +cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}-%{version} +ln -s %{name}-%{version} %{buildroot}%{_javadocdir}/%{name} +rm -rf target/site/apidocs + +%files +%doc LICENSE.txt +%{_javadir}/%{name}-*.jar +%{_mavenpomdir}/JPP-%{name}-*.pom +%{_mavendepmapfragdir}/%{name} + +%files javadoc +%doc LICENSE.txt +%doc %{_javadocdir}/* + +%changelog +* Fri Dec 27 2013 Daniel Mach - 2.5.2-12 +- Mass rebuild 2013-12-27 + +* Fri Jun 28 2013 Mikolaj Izdebski - 2.5.2-11 +- Rebuild to regenerate API documentation +- Resolves: CVE-2013-1571 + +* Fri May 31 2013 Mikolaj Izdebski - 2.5.2-10 +- Convert to a compat package +- Resolves: rhbz#969376 + +* Wed Feb 13 2013 Fedora Release Engineering - 2.5.2-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Aug 16 2012 Mikolaj Izdebski - 2.5.2-8 +- Install LICENSE with javadoc package +- Don't own _mavendepmapfragdir +- Install POM in _mavenpomdir instead of _datadir/maven2/poms +- Update to current packaging guidelines + +* Wed Jul 18 2012 Fedora Release Engineering - 2.5.2-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Thu Feb 23 2012 Jiri Vanek - 2.5.2-6 +- Fixed for JDK7 - https://fedoraproject.org/wiki/Java7_Package_Rebuild_Status +- Added and aplied patch0, easymock2-nameClash.patch. + This patch is removing (in easymock3 deprecated) methods, and is keeping new + easymock3 api in EasyMock.java for capture set of methods. + Old methods cant be kept as deprecated as JDK7 can not compile them. + Test was derived from easymock3' one too. + +* Fri Jan 13 2012 Fedora Release Engineering - 2.5.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Feb 08 2011 Fedora Release Engineering - 2.5.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed Dec 8 2010 Alexander Kurtakov 2.5.2-3 +- BR zip. +- Don't install versioned jar. +- Use standard file permissions. + +* Wed Jul 21 2010 Alexander Kurtakov 2.5.2-2 +- Fix maven depmap. + +* Fri Jan 15 2010 Alexander Kurtakov 2.5.2-1 +- Update to upstream 2.5.2. +- Now under ASL 2.0 license. + +* Wed Oct 21 2009 Alexander Kurtakov 2.5-4 +- Fix empty jar. Bug #530110. + +* Mon Aug 17 2009 Alexander Kurtakov 2.5-3 +- Renamed to easymock2. + +* Mon Aug 17 2009 Alexander Kurtakov 2.5-2 +- Use %%{buildroot} instead of $RPM_BUILD_ROOT. +- Add comment for MANIFEST.MF origin. + +* Fri Aug 14 2009 Alexander Kurtakov 2.5-1 +- Initial package.