commit
7f1ea52557
73
getMethods-sort.patch
Normal file
73
getMethods-sort.patch
Normal file
@ -0,0 +1,73 @@
|
||||
From 72d003605170af32c20b72caff4ab35f3a40b254 Mon Sep 17 00:00:00 2001
|
||||
From: fanmenggang <fanmenggang@huawei.com>
|
||||
Date: Wed, 8 May 2019 16:15:56 +0000
|
||||
Subject: [PATCH] hamcrest: eliminate class file differences
|
||||
|
||||
reason: eliminate class file differences
|
||||
|
||||
diff --git a/hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java b/hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java
|
||||
index f51e659..5fa1c8f 100644
|
||||
--- a/hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java
|
||||
+++ b/hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java
|
||||
@@ -42,8 +42,8 @@ public class ReflectiveFactoryReader implements Iterable<FactoryMethod> {
|
||||
return new Iterator<FactoryMethod>() {
|
||||
|
||||
private int currentMethod = -1;
|
||||
- private Method[] allMethods = cls.getMethods();
|
||||
-
|
||||
+ private Method[] tmpMethods = cls.getMethods();
|
||||
+ private Method[] allMethods = sort(tmpMethods,0,tmpMethods.length - 1);
|
||||
@Override
|
||||
public boolean hasNext() {
|
||||
while (true) {
|
||||
@@ -72,6 +72,43 @@ public class ReflectiveFactoryReader implements Iterable<FactoryMethod> {
|
||||
private boolean outsideArrayBounds() {
|
||||
return currentMethod < 0 || allMethods.length <= currentMethod;
|
||||
}
|
||||
+
|
||||
+ private Method[] sort(Method[] method, int low, int high) {
|
||||
+ int start = low;
|
||||
+ int end = high;
|
||||
+ String key = method[low].toString();
|
||||
+
|
||||
+ while(end > start) {
|
||||
+ while(end > start && method[end].toString().compareTo(key) >= 0) {
|
||||
+ end--;
|
||||
+ }
|
||||
+
|
||||
+ if(end > start) {
|
||||
+ Method temp = method[end];
|
||||
+ method[end] = method[start];
|
||||
+ method[start] = temp;
|
||||
+ start++;
|
||||
+ }
|
||||
+
|
||||
+ while(start < end && method[start].toString().compareTo(key) <= 0) {
|
||||
+ start++;
|
||||
+ }
|
||||
+
|
||||
+ if(start < end ) {
|
||||
+ Method temp = method[end];
|
||||
+ method[end] = method[start];
|
||||
+ method[start] = temp;
|
||||
+ end--;
|
||||
+ }
|
||||
+ }
|
||||
+ if(start > low) {
|
||||
+ sort(method,low, start - 1);
|
||||
+ }
|
||||
+ if(end < high) {
|
||||
+ sort(method,start + 1, high);
|
||||
+ }
|
||||
+ return method;
|
||||
+ }
|
||||
};
|
||||
}
|
||||
|
||||
@@ -171,4 +208,4 @@ public class ReflectiveFactoryReader implements Iterable<FactoryMethod> {
|
||||
return name.replace('$', '.');
|
||||
}
|
||||
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
39
hamcrest-1.3-build.patch
Normal file
39
hamcrest-1.3-build.patch
Normal file
@ -0,0 +1,39 @@
|
||||
diff --git a/build.xml b/build.xml
|
||||
index 1cfd4fb..5a7c740 100644
|
||||
--- a/build.xml
|
||||
+++ b/build.xml
|
||||
@@ -14,13 +14,13 @@
|
||||
<target name="generator" description="Build code generator tool">
|
||||
<java-to-jar srcdir="hamcrest-generator/src/main/java"
|
||||
modulename="hamcrest-generator-nodeps"
|
||||
- classpath="lib/generator/qdox-1.12.jar"/>
|
||||
+ classpath="lib/generator/qdox.jar"/>
|
||||
|
||||
<!-- Bundle QDox classes in hamcrest-generator.jar using JarJar to place classes under a different package -->
|
||||
- <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="lib/generator/jarjar-1.3.jar"/>
|
||||
+ <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="lib/generator/jarjar.jar"/>
|
||||
<jarjar jarfile="build/hamcrest-generator-${version}.jar">
|
||||
<zipfileset src="build/hamcrest-generator-nodeps-${version}.jar"/>
|
||||
- <zipfileset src="lib/generator/qdox-1.12.jar"/>
|
||||
+ <zipfileset src="lib/generator/qdox.jar"/>
|
||||
<rule pattern="com.thoughtworks.qdox.**" result="org.hamcrest.generator.qdox.@1"/>
|
||||
</jarjar>
|
||||
<copy file="build/hamcrest-generator-nodeps-${version}-sources.jar" tofile="build/hamcrest-generator-${version}-sources.jar"/>
|
||||
@@ -152,7 +152,8 @@
|
||||
|
||||
<javadoc packagenames="org.hamcrest.*" defaultexcludes="yes"
|
||||
destdir="build/temp/hamcrest-all-${version}-javadoc.jar.contents" author="true" version="true" use="true"
|
||||
- windowtitle="Hamcrest" source="1.6" failonerror="yes" overview="overview.html">
|
||||
+ windowtitle="Hamcrest" source="1.6" failonerror="yes">
|
||||
+ <arg value="-Xdoclint:none"/>
|
||||
<classpath>
|
||||
<fileset dir="lib/integration">
|
||||
<include name="*.jar"/>
|
||||
@@ -313,6 +314,7 @@
|
||||
<javadoc packagenames="org.hamcrest.*" sourcepath="build/temp/@{modulename}-${version}-sources.jar.contents" defaultexcludes="yes"
|
||||
destdir="build/temp/@{modulename}-${version}-javadoc.jar.contents" author="true" version="true" use="true"
|
||||
windowtitle="Hamcrest" source="1.6" failonerror="yes">
|
||||
+ <arg value="-Xdoclint:none"/>
|
||||
<classpath>
|
||||
<fileset dir="lib/integration">
|
||||
<include name="*.jar"/>
|
||||
25
hamcrest-1.3-fork-javac.patch
Normal file
25
hamcrest-1.3-fork-javac.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 54b7ccdd1e16f1d6dd07359eae0fcac8f1883373 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Simacek <msimacek@redhat.com>
|
||||
Date: Mon, 2 Jan 2017 10:31:56 +0100
|
||||
Subject: [PATCH] Fork javac
|
||||
|
||||
---
|
||||
build.xml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/build.xml b/build.xml
|
||||
index 1cfd4fb..69acfe8 100644
|
||||
--- a/build.xml
|
||||
+++ b/build.xml
|
||||
@@ -284,7 +284,7 @@
|
||||
<attribute name="Built-Date" value="${build.timestamp}"/>
|
||||
</manifest>
|
||||
<mkdir dir="build/temp/@{modulename}-${version}.jar.contents"/>
|
||||
- <javac srcdir="@{srcdir}" destdir="build/temp/@{modulename}-${version}.jar.contents" debug="${debug}" target="1.5" includeantruntime="false">
|
||||
+ <javac srcdir="@{srcdir}" destdir="build/temp/@{modulename}-${version}.jar.contents" debug="${debug}" target="1.5" includeantruntime="false" fork="true">
|
||||
<classpath>
|
||||
<fileset dir="lib/integration">
|
||||
<include name="*.jar"/>
|
||||
--
|
||||
2.9.3
|
||||
|
||||
17
hamcrest-1.3-javadoc.patch
Normal file
17
hamcrest-1.3-javadoc.patch
Normal file
@ -0,0 +1,17 @@
|
||||
diff --git a/build.xml b/build.xml
|
||||
index ed57763..a4550cb 100644
|
||||
--- a/build.xml
|
||||
+++ b/build.xml
|
||||
@@ -135,11 +135,10 @@
|
||||
</target>
|
||||
|
||||
<target name="javadoc" description="build javadoc jars">
|
||||
- <java-to-javadoc-jar modulename="hamcrest-generator-nodeps"/>
|
||||
+ <java-to-javadoc-jar modulename="hamcrest-generator"/>
|
||||
<java-to-javadoc-jar modulename="hamcrest-core"/>
|
||||
<java-to-javadoc-jar modulename="hamcrest-library"/>
|
||||
<java-to-javadoc-jar modulename="hamcrest-integration"/>
|
||||
- <copy file="build/hamcrest-generator-nodeps-${version}-javadoc.jar" tofile="build/hamcrest-generator-${version}-javadoc.jar"/>
|
||||
|
||||
<javadoc packagenames="org.hamcrest.*" defaultexcludes="yes"
|
||||
destdir="build/temp/hamcrest-all-${version}-javadoc.jar.contents" author="true" version="true" use="true"
|
||||
23
hamcrest-1.3-no-jarjar.patch
Normal file
23
hamcrest-1.3-no-jarjar.patch
Normal file
@ -0,0 +1,23 @@
|
||||
diff --git a/build.xml b/build.xml
|
||||
index 54d43fe..ed57763 100644
|
||||
--- a/build.xml
|
||||
+++ b/build.xml
|
||||
@@ -13,17 +13,8 @@
|
||||
|
||||
<target name="generator" description="Build code generator tool">
|
||||
<java-to-jar srcdir="hamcrest-generator/src/main/java"
|
||||
- modulename="hamcrest-generator-nodeps"
|
||||
+ modulename="hamcrest-generator"
|
||||
classpath="lib/generator/qdox.jar"/>
|
||||
-
|
||||
- <!-- Bundle QDox classes in hamcrest-generator.jar using JarJar to place classes under a different package -->
|
||||
- <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="lib/generator/jarjar.jar"/>
|
||||
- <jarjar jarfile="build/hamcrest-generator-${version}.jar">
|
||||
- <zipfileset src="build/hamcrest-generator-nodeps-${version}.jar"/>
|
||||
- <zipfileset src="lib/generator/qdox.jar"/>
|
||||
- <rule pattern="com.thoughtworks.qdox.**" result="org.hamcrest.generator.qdox.@1"/>
|
||||
- </jarjar>
|
||||
- <copy file="build/hamcrest-generator-nodeps-${version}-sources.jar" tofile="build/hamcrest-generator-${version}-sources.jar"/>
|
||||
</target>
|
||||
|
||||
<target name="core" depends="generator" description="Build core Hamcrest library">
|
||||
105
hamcrest-1.3-qdox-2.0.patch
Normal file
105
hamcrest-1.3-qdox-2.0.patch
Normal file
@ -0,0 +1,105 @@
|
||||
From 6d7da5456a7458a249bed9c4c1e768cc7cc2fe40 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Simacek <msimacek@redhat.com>
|
||||
Date: Wed, 1 Feb 2017 12:57:14 +0100
|
||||
Subject: [PATCH] Port to qdox 2.0
|
||||
|
||||
---
|
||||
.../src/main/java/org/hamcrest/generator/QDox.java | 4 ++--
|
||||
.../org/hamcrest/generator/QDoxFactoryReader.java | 26 ++++++++++++----------
|
||||
2 files changed, 16 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/hamcrest-generator/src/main/java/org/hamcrest/generator/QDox.java b/hamcrest-generator/src/main/java/org/hamcrest/generator/QDox.java
|
||||
index efaf615..338178d 100644
|
||||
--- a/hamcrest-generator/src/main/java/org/hamcrest/generator/QDox.java
|
||||
+++ b/hamcrest-generator/src/main/java/org/hamcrest/generator/QDox.java
|
||||
@@ -1,6 +1,6 @@
|
||||
package org.hamcrest.generator;
|
||||
|
||||
-import com.thoughtworks.qdox.JavaDocBuilder;
|
||||
+import com.thoughtworks.qdox.JavaProjectBuilder;
|
||||
import com.thoughtworks.qdox.model.JavaClass;
|
||||
|
||||
import java.io.File;
|
||||
@@ -16,7 +16,7 @@ import java.io.Reader;
|
||||
*/
|
||||
public class QDox {
|
||||
|
||||
- private final JavaDocBuilder javaDocBuilder = new JavaDocBuilder();
|
||||
+ private final JavaProjectBuilder javaDocBuilder = new JavaProjectBuilder();
|
||||
|
||||
public void addSourceTree(File sourceDir) {
|
||||
javaDocBuilder.addSourceTree(sourceDir);
|
||||
diff --git a/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java b/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java
|
||||
index 5108140..97fce01 100644
|
||||
--- a/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java
|
||||
+++ b/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java
|
||||
@@ -4,8 +4,10 @@ import com.thoughtworks.qdox.model.DocletTag;
|
||||
import com.thoughtworks.qdox.model.JavaClass;
|
||||
import com.thoughtworks.qdox.model.JavaMethod;
|
||||
import com.thoughtworks.qdox.model.JavaParameter;
|
||||
-import com.thoughtworks.qdox.model.Type;
|
||||
+import com.thoughtworks.qdox.model.JavaType;
|
||||
+import com.thoughtworks.qdox.model.impl.DefaultJavaClass;
|
||||
|
||||
+import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
@@ -56,15 +58,15 @@ public class QDoxFactoryReader implements Iterable<FactoryMethod> {
|
||||
JavaMethod methodSource = findMethodInSource(factoryMethod);
|
||||
if (methodSource != null) {
|
||||
factoryMethod.setJavaDoc(createJavaDocComment(methodSource));
|
||||
- JavaParameter[] parametersFromSource
|
||||
+ List<JavaParameter> parametersFromSource
|
||||
= methodSource.getParameters();
|
||||
List<FactoryMethod.Parameter> parametersFromReflection
|
||||
= factoryMethod.getParameters();
|
||||
|
||||
- if (parametersFromReflection.size() == parametersFromSource.length) {
|
||||
- for (int i = 0; i < parametersFromSource.length; i++) {
|
||||
+ if (parametersFromReflection.size() == parametersFromSource.size()) {
|
||||
+ for (int i = 0; i < parametersFromSource.size(); i++) {
|
||||
parametersFromReflection.get(i).setName(
|
||||
- parametersFromSource[i].getName());
|
||||
+ parametersFromSource.get(i).getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -79,18 +81,18 @@ public class QDoxFactoryReader implements Iterable<FactoryMethod> {
|
||||
// Note, this doesn't always work - it struggles with some kinds of generics.
|
||||
// This seems to cover most cases though.
|
||||
List<FactoryMethod.Parameter> params = factoryMethod.getParameters();
|
||||
- Type[] types = new Type[params.size()];
|
||||
+ List<JavaType> types = new ArrayList<JavaType>(params.size());
|
||||
boolean varArgs = false;
|
||||
- for (int i = 0; i < types.length; i++) {
|
||||
+ for (int i = 0; i < params.size(); i++) {
|
||||
String type = params.get(i).getType();
|
||||
varArgs = VARARGS_REGEX.matcher(type).find();
|
||||
// QDox ignores varargs and generics, so we strip them out to help QDox.
|
||||
type = GENERIC_REGEX.matcher(type).replaceAll("");
|
||||
type = VARARGS_REGEX.matcher(type).replaceAll("");
|
||||
- types[i] = new Type(type);
|
||||
+ types.add(new DefaultJavaClass(type));
|
||||
}
|
||||
- JavaMethod[] methods = classSource.getMethodsBySignature(factoryMethod.getName(), types, false, varArgs);
|
||||
- return methods.length == 1 ? methods[0] : null;
|
||||
+ List<JavaMethod> methods = classSource.getMethodsBySignature(factoryMethod.getName(), types, false, varArgs);
|
||||
+ return methods.size() == 1 ? methods.get(0) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -98,8 +100,8 @@ public class QDoxFactoryReader implements Iterable<FactoryMethod> {
|
||||
*/
|
||||
private static String createJavaDocComment(JavaMethod methodSource) {
|
||||
String comment = methodSource.getComment();
|
||||
- DocletTag[] tags = methodSource.getTags();
|
||||
- if ((comment == null || comment.trim().length() == 0) && tags.length == 0) {
|
||||
+ List<DocletTag> tags = methodSource.getTags();
|
||||
+ if ((comment == null || comment.trim().length() == 0) && tags.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
StringBuilder result = new StringBuilder();
|
||||
--
|
||||
2.9.3
|
||||
|
||||
14
hamcrest-core-MANIFEST.MF
Normal file
14
hamcrest-core-MANIFEST.MF
Normal file
@ -0,0 +1,14 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-Vendor: Fedoraproject.org
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-Localization: plugin
|
||||
Bundle-RequiredExecutionEnvironment: J2SE-1.5
|
||||
Bundle-Name: Hamcrest Core
|
||||
Bundle-SymbolicName: org.hamcrest.core
|
||||
Eclipse-SourceReferences: scm:cvs:pserver:dev.eclipse.org:/cvsroot/too
|
||||
ls:org.eclipse.orbit/org.hamcrest.core;tag=v201303031735
|
||||
Export-Package: org.hamcrest;version="1.3.0";core=split;mandatory:=cor
|
||||
e,org.hamcrest.core;version="1.3.0",org.hamcrest.internal;version="1.
|
||||
3.0";x-internal:=true
|
||||
Bundle-Version: 1.3.0.v201303031735
|
||||
Bundle-ManifestVersion: 2
|
||||
18
hamcrest-generator-MANIFEST.MF
Normal file
18
hamcrest-generator-MANIFEST.MF
Normal file
@ -0,0 +1,18 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-Vendor: %providerName
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-Localization: plugin
|
||||
Bundle-RequiredExecutionEnvironment: J2SE-1.5
|
||||
Bundle-Name: %pluginName
|
||||
Bundle-SymbolicName: org.hamcrest.generator
|
||||
Bundle-Version: 1.3.0.v20090501071000
|
||||
Export-Package: org.hamcrest.generator;version="1.3.0",org.hamcrest.ge
|
||||
nerator.config;version="1.3.0"
|
||||
Bundle-ManifestVersion: 2
|
||||
Import-Package: com.thoughtworks.qdox;version="1.6.3",com.thoughtworks
|
||||
.qdox.ant;version="1.6.3",com.thoughtworks.qdox.directorywalker;versi
|
||||
on="1.6.3",com.thoughtworks.qdox.junit;version="1.6.3",com.thoughtwor
|
||||
ks.qdox.model;version="1.6.3",com.thoughtworks.qdox.model.util;versio
|
||||
n="1.6.3",com.thoughtworks.qdox.parser;version="1.6.3",com.thoughtwor
|
||||
ks.qdox.parser.impl;version="1.6.3",com.thoughtworks.qdox.parser.stru
|
||||
cts;version="1.6.3",com.thoughtworks.qdox.tools;version="1.6.3"
|
||||
14
hamcrest-integration-MANIFEST.MF
Normal file
14
hamcrest-integration-MANIFEST.MF
Normal file
@ -0,0 +1,14 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-Vendor: %providerName
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-Localization: plugin
|
||||
Bundle-RequiredExecutionEnvironment: J2SE-1.5
|
||||
Bundle-Name: %pluginName
|
||||
Bundle-SymbolicName: org.hamcrest.integration
|
||||
Require-Bundle: org.hamcrest.core;bundle-version="1.3.0"
|
||||
Bundle-Version: 1.3.0.v20090501071000
|
||||
Export-Package: org.hamcrest;integration=split;mandatory:=integration;
|
||||
version="1.3.0",org.hamcrest.integration;version="1.3.0"
|
||||
Bundle-ManifestVersion: 2
|
||||
Import-Package: org.easymock;version="2.4.0";resolution:=optional,org.
|
||||
jmock.core;version="1.10";resolution:=optional
|
||||
BIN
hamcrest-java-1.3.tar.gz
Normal file
BIN
hamcrest-java-1.3.tar.gz
Normal file
Binary file not shown.
15
hamcrest-library-MANIFEST.MF
Normal file
15
hamcrest-library-MANIFEST.MF
Normal file
@ -0,0 +1,15 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-Vendor: %providerName
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-Localization: plugin
|
||||
Bundle-RequiredExecutionEnvironment: J2SE-1.5
|
||||
Bundle-Name: %pluginName
|
||||
Bundle-SymbolicName: org.hamcrest.library
|
||||
Require-Bundle: org.hamcrest.core;bundle-version="1.3.0"
|
||||
Bundle-Version: 1.3.0.v20090501071000
|
||||
Export-Package: org.hamcrest;version="1.3.0";library=split;mandatory:=
|
||||
library,org.hamcrest.beans;version="1.3.0",org.hamcrest.collection;ve
|
||||
rsion="1.3.0",org.hamcrest.number;version="1.3.0",org.hamcrest.object
|
||||
;version="1.3.0",org.hamcrest.text;version="1.3.0",org.hamcrest.xml;v
|
||||
ersion="1.3.0"
|
||||
Bundle-ManifestVersion: 2
|
||||
108
hamcrest.spec
Normal file
108
hamcrest.spec
Normal file
@ -0,0 +1,108 @@
|
||||
Name: hamcrest
|
||||
Version: 1.3
|
||||
Release: 25
|
||||
Epoch: 0
|
||||
Summary: Library of matcher objects for building test expressions
|
||||
|
||||
License: BSD
|
||||
URL: https://github.com/hamcrest/JavaHamcrest
|
||||
Source0: https://github.com/hamcrest/JavaHamcrest/archive/hamcrest-java-%{version}.tar.gz
|
||||
Source1: hamcrest-core-MANIFEST.MF
|
||||
Source2: hamcrest-library-MANIFEST.MF
|
||||
Source3: hamcrest-integration-MANIFEST.MF
|
||||
Source4: hamcrest-generator-MANIFEST.MF
|
||||
|
||||
Patch0001: hamcrest-1.3-build.patch
|
||||
Patch0002: hamcrest-1.3-no-jarjar.patch
|
||||
Patch0003: hamcrest-1.3-javadoc.patch
|
||||
Patch0004: hamcrest-1.3-qdox-2.0.patch
|
||||
Patch0005: hamcrest-1.3-fork-javac.patch
|
||||
|
||||
# pacth for openEuler
|
||||
Patch9000: getMethods-sort.patch
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: javapackages-local ant ant-junit easymock junit qdox testng
|
||||
Requires: qdox easymock >= 3.0
|
||||
|
||||
Provides: %{name}-core = %{epoch}:%{version}-%{release}
|
||||
Obsoletes: %{name}-core < %{epoch}:%{version}-%{release}
|
||||
|
||||
%description
|
||||
Provides a library of matcher objects (also known as constraints or
|
||||
predicates) allowing 'match' rules to be defined declaratively, to be
|
||||
used in other frameworks. Typical scenarios include testing frameworks,
|
||||
mocking libraries and UI validation rules.
|
||||
|
||||
%package help
|
||||
Summary: Javadoc for hamcrest package
|
||||
Provides: %{name}-javadoc = %{epoch}:%{version}-%{release}
|
||||
Obsoletes: %{name}-javadoc < %{epoch}:%{version}-%{release}
|
||||
|
||||
%description help
|
||||
Javadoc for hamcrest package.
|
||||
|
||||
%package demo
|
||||
Summary: Demos for hamcrest package
|
||||
Requires: junit testng %{name} = %{epoch}:%{version}-%{release}
|
||||
|
||||
%description demo
|
||||
Demo files for hamcrest package.
|
||||
|
||||
%prep
|
||||
%autosetup -n JavaHamcrest-%{name}-java-%{version} -p1
|
||||
|
||||
find . -type f -name "*.jar" -delete
|
||||
rm -rf hamcrest-integration/src/main/java/org/hamcrest/integration/JMock1Adapter.java
|
||||
rm -rf hamcrest-integration/src/main/java/org/hamcrest/JMock1Matchers.java
|
||||
rm -rf hamcrest-unit-test/src/main/java/org/hamcrest/integration/JMock1AdapterTest.java
|
||||
|
||||
|
||||
ln -sf $(build-classpath qdox) lib/generator/
|
||||
ln -sf $(build-classpath easymock3) lib/integration/
|
||||
ln -sf $(build-classpath jmock) lib/integration/
|
||||
ln -sf $(build-classpath testng-jdk15) lib/integration/
|
||||
|
||||
%build
|
||||
export CLASSPATH=$(build-classpath qdox)
|
||||
export OPT_JAR_LIST="junit ant/ant-junit"
|
||||
ant -Dant.build.javac.source=1.5 -Dversion=%{version} -Dbuild.sysclasspath=last clean core generator library bigjar javadoc
|
||||
|
||||
jar ufm build/hamcrest-core-%{version}.jar %{SOURCE1}
|
||||
jar ufm build/hamcrest-library-%{version}.jar %{SOURCE2}
|
||||
jar ufm build/hamcrest-integration-%{version}.jar %{SOURCE3}
|
||||
jar ufm build/hamcrest-generator-%{version}.jar %{SOURCE4}
|
||||
|
||||
%install
|
||||
sed -i 's/@VERSION@/%{version}/g' pom/*.pom
|
||||
|
||||
%mvn_artifact pom/hamcrest-parent.pom
|
||||
%mvn_artifact pom/hamcrest-all.pom build/hamcrest-all-%{version}.jar
|
||||
%mvn_artifact pom/hamcrest-core.pom build/hamcrest-core-%{version}.jar
|
||||
%mvn_artifact pom/hamcrest-generator.pom build/hamcrest-generator-%{version}.jar
|
||||
%mvn_artifact pom/hamcrest-library.pom build/hamcrest-library-%{version}.jar
|
||||
%mvn_artifact pom/hamcrest-integration.pom build/hamcrest-integration-%{version}.jar
|
||||
|
||||
%mvn_package :hamcrest-parent core
|
||||
%mvn_package :hamcrest-core core
|
||||
|
||||
%mvn_file ':hamcrest-{*}' %{name}/@1
|
||||
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/hamcrest
|
||||
cp -rp hamcrest-examples $RPM_BUILD_ROOT%{_datadir}/hamcrest/
|
||||
|
||||
%mvn_install -J build/temp/hamcrest-all-1.3-javadoc.jar.contents/
|
||||
|
||||
|
||||
%files -f .mfiles -f .mfiles-core
|
||||
%license LICENSE.txt
|
||||
|
||||
%files help -f .mfiles-javadoc
|
||||
|
||||
%files demo
|
||||
%{_datadir}/hamcrest
|
||||
|
||||
%changelog
|
||||
* Tue Dec 03 2019 daiqianwen <daiqianwen@huawei.com> - 0:1.3-25
|
||||
- Package init
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user