This commit is contained in:
parent
975d95b2bf
commit
7bce6fa6df
@ -1,30 +1,39 @@
|
|||||||
diff --git a/build.xml b/build.xml
|
diff --git a/build.xml b/build.xml
|
||||||
index 1cfd4fb..54d43fe 100644
|
index 1cfd4fb..5a7c740 100644
|
||||||
--- a/build.xml
|
--- a/build.xml
|
||||||
+++ b/build.xml
|
+++ b/build.xml
|
||||||
@@ -14,13 +14,13 @@
|
@@ -14,13 +14,13 @@
|
||||||
<target name="generator" description="Build code generator tool">
|
<target name="generator" description="Build code generator tool">
|
||||||
<java-to-jar srcdir="hamcrest-generator/src/main/java"
|
<java-to-jar srcdir="hamcrest-generator/src/main/java"
|
||||||
modulename="hamcrest-generator-nodeps"
|
modulename="hamcrest-generator-nodeps"
|
||||||
- classpath="lib/generator/qdox-1.12.jar"/>
|
- classpath="lib/generator/qdox-1.12.jar"/>
|
||||||
+ classpath="lib/generator/qdox.jar"/>
|
+ classpath="lib/generator/qdox.jar"/>
|
||||||
|
|
||||||
<!-- Bundle QDox classes in hamcrest-generator.jar using JarJar to place classes under a different package -->
|
<!-- 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-1.3.jar"/>
|
||||||
+ <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="lib/generator/jarjar.jar"/>
|
+ <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="lib/generator/jarjar.jar"/>
|
||||||
<jarjar jarfile="build/hamcrest-generator-${version}.jar">
|
<jarjar jarfile="build/hamcrest-generator-${version}.jar">
|
||||||
<zipfileset src="build/hamcrest-generator-nodeps-${version}.jar"/>
|
<zipfileset src="build/hamcrest-generator-nodeps-${version}.jar"/>
|
||||||
- <zipfileset src="lib/generator/qdox-1.12.jar"/>
|
- <zipfileset src="lib/generator/qdox-1.12.jar"/>
|
||||||
+ <zipfileset src="lib/generator/qdox.jar"/>
|
+ <zipfileset src="lib/generator/qdox.jar"/>
|
||||||
<rule pattern="com.thoughtworks.qdox.**" result="org.hamcrest.generator.qdox.@1"/>
|
<rule pattern="com.thoughtworks.qdox.**" result="org.hamcrest.generator.qdox.@1"/>
|
||||||
</jarjar>
|
</jarjar>
|
||||||
<copy file="build/hamcrest-generator-nodeps-${version}-sources.jar" tofile="build/hamcrest-generator-${version}-sources.jar"/>
|
<copy file="build/hamcrest-generator-nodeps-${version}-sources.jar" tofile="build/hamcrest-generator-${version}-sources.jar"/>
|
||||||
@@ -152,7 +152,7 @@
|
@@ -152,7 +152,8 @@
|
||||||
|
|
||||||
<javadoc packagenames="org.hamcrest.*" defaultexcludes="yes"
|
<javadoc packagenames="org.hamcrest.*" defaultexcludes="yes"
|
||||||
destdir="build/temp/hamcrest-all-${version}-javadoc.jar.contents" author="true" version="true" use="true"
|
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" overview="overview.html">
|
||||||
+ windowtitle="Hamcrest" source="1.6" failonerror="yes">
|
+ windowtitle="Hamcrest" source="1.6" failonerror="yes">
|
||||||
<classpath>
|
+ <arg value="-Xdoclint:none"/>
|
||||||
<fileset dir="lib/integration">
|
<classpath>
|
||||||
<include name="*.jar"/>
|
<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"/>
|
||||||
|
@ -7,16 +7,19 @@ Subject: [PATCH] Fork javac
|
|||||||
build.xml | 2 +-
|
build.xml | 2 +-
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
Index: hamcrest-1.3/build.xml
|
diff --git a/build.xml b/build.xml
|
||||||
===================================================================
|
index 1cfd4fb..69acfe8 100644
|
||||||
--- hamcrest-1.3.orig/build.xml
|
--- a/build.xml
|
||||||
+++ hamcrest-1.3/build.xml
|
+++ b/build.xml
|
||||||
@@ -268,7 +268,7 @@
|
@@ -284,7 +284,7 @@
|
||||||
<attribute name="Built-Date" value="${build.timestamp}"/>
|
<attribute name="Built-Date" value="${build.timestamp}"/>
|
||||||
</manifest>
|
</manifest>
|
||||||
<mkdir dir="build/temp/@{modulename}-${version}.jar.contents"/>
|
<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">
|
||||||
+ <javac srcdir="@{srcdir}" destdir="build/temp/@{modulename}-${version}.jar.contents" debug="${debug}" target="1.6" includeantruntime="false" fork="true">
|
+ <javac srcdir="@{srcdir}" destdir="build/temp/@{modulename}-${version}.jar.contents" debug="${debug}" includeantruntime="false" fork="true">
|
||||||
<classpath>
|
<classpath>
|
||||||
<fileset dir="lib/integration">
|
<fileset dir="lib/integration">
|
||||||
<include name="*.jar"/>
|
<include name="*.jar"/>
|
||||||
|
--
|
||||||
|
2.9.3
|
||||||
|
|
||||||
|
@ -1,20 +1,17 @@
|
|||||||
---
|
diff --git a/build.xml b/build.xml
|
||||||
build.xml | 3 +--
|
index ed57763..a4550cb 100644
|
||||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
--- a/build.xml
|
||||||
|
+++ b/build.xml
|
||||||
Index: hamcrest-1.3/build.xml
|
@@ -135,11 +135,10 @@
|
||||||
===================================================================
|
</target>
|
||||||
--- hamcrest-1.3.orig/build.xml
|
|
||||||
+++ hamcrest-1.3/build.xml
|
<target name="javadoc" description="build javadoc jars">
|
||||||
@@ -133,10 +133,9 @@
|
- <java-to-javadoc-jar modulename="hamcrest-generator-nodeps"/>
|
||||||
</target>
|
+ <java-to-javadoc-jar modulename="hamcrest-generator"/>
|
||||||
|
<java-to-javadoc-jar modulename="hamcrest-core"/>
|
||||||
<target name="javadoc" description="build javadoc jars">
|
<java-to-javadoc-jar modulename="hamcrest-library"/>
|
||||||
- <java-to-javadoc-jar modulename="hamcrest-generator-nodeps"/>
|
<java-to-javadoc-jar modulename="hamcrest-integration"/>
|
||||||
+ <java-to-javadoc-jar modulename="hamcrest-generator"/>
|
- <copy file="build/hamcrest-generator-nodeps-${version}-javadoc.jar" tofile="build/hamcrest-generator-${version}-javadoc.jar"/>
|
||||||
<java-to-javadoc-jar modulename="hamcrest-core"/>
|
|
||||||
<java-to-javadoc-jar modulename="hamcrest-library"/>
|
<javadoc packagenames="org.hamcrest.*" defaultexcludes="yes"
|
||||||
- <copy file="build/hamcrest-generator-nodeps-${version}-javadoc.jar" tofile="build/hamcrest-generator-${version}-javadoc.jar"/>
|
destdir="build/temp/hamcrest-all-${version}-javadoc.jar.contents" author="true" version="true" use="true"
|
||||||
|
|
||||||
<javadoc packagenames="org.hamcrest.*" defaultexcludes="yes"
|
|
||||||
destdir="build/temp/hamcrest-all-${version}-javadoc.jar.contents" author="true" version="true" use="true"
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
--- hamcrest-1.3/build.xml 2012-07-02 21:14:09.000000000 +0200
|
--- hamcrest-1.3/build.xml 2012-07-02 21:14:09.000000000 +0200
|
||||||
+++ hamcrest-1.3/build.xml 2017-12-18 07:46:06.290074242 +0100
|
+++ hamcrest-1.3/build.xml 2017-12-18 07:46:06.290074242 +0100
|
||||||
@@ -165,9 +165,6 @@
|
@@ -165,9 +165,6 @@
|
||||||
|
<group title="Hamcrest API and Utility Classes" packages="org.hamcrest"/>
|
||||||
<group title="Hamcrest API and Utility Classes" packages="org.hamcrest"/>
|
<group title="Matcher Library" packages="org.hamcrest.*"/>
|
||||||
<group title="Matcher Library" packages="org.hamcrest.*"/>
|
<group title="Integration" packages="org.hamcrest.integration, org.hamcrest.integration.*"/>
|
||||||
-
|
-
|
||||||
- <link offline="false" href="http://www.junit.org/junit/javadoc/3.8.1/"/>
|
- <link offline="false" href="http://www.junit.org/junit/javadoc/3.8.1/"/>
|
||||||
- <link offline="false" href="http://kentbeck.github.com/junit/javadoc/latest/"/>
|
- <link offline="false" href="http://kentbeck.github.com/junit/javadoc/latest/"/>
|
||||||
</javadoc>
|
</javadoc>
|
||||||
<jar jarfile="build/hamcrest-all-${version}-javadoc.jar">
|
<jar jarfile="build/hamcrest-all-${version}-javadoc.jar">
|
||||||
<fileset dir="build/temp/hamcrest-all-${version}-javadoc.jar.contents"/>
|
<fileset dir="build/temp/hamcrest-all-${version}-javadoc.jar.contents"/>
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,56 +0,0 @@
|
|||||||
---
|
|
||||||
build.xml | 12 +-----------
|
|
||||||
1 file changed, 1 insertion(+), 11 deletions(-)
|
|
||||||
|
|
||||||
Index: hamcrest-1.3/build.xml
|
|
||||||
===================================================================
|
|
||||||
--- hamcrest-1.3.orig/build.xml
|
|
||||||
+++ hamcrest-1.3/build.xml
|
|
||||||
@@ -110,7 +110,7 @@
|
|
||||||
build/hamcrest-integration-${version}.jar"/>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
- <target name="bigjar" depends="core, library, integration, generator"
|
|
||||||
+ <target name="bigjar" depends="core, library, generator"
|
|
||||||
description="Build a single Jar (hamcrest-all.jar) that contains core, library, generator and integration.">
|
|
||||||
<mkdir dir="build/temp/hamcrest-all-${version}.jar.manifest"/>
|
|
||||||
<manifest file="build/temp/hamcrest-all-${version}.jar.manifest/MANIFEST.MF">
|
|
||||||
@@ -124,13 +124,11 @@
|
|
||||||
<zipfileset src="build/hamcrest-core-${version}.jar"/>
|
|
||||||
<zipfileset src="build/hamcrest-library-${version}.jar"/>
|
|
||||||
<zipfileset src="build/hamcrest-generator-${version}.jar"/>
|
|
||||||
- <zipfileset src="build/hamcrest-integration-${version}.jar"/>
|
|
||||||
</jar>
|
|
||||||
<jar jarfile="build/hamcrest-all-${version}-sources.jar" duplicate="preserve" manifest="build/temp/hamcrest-all-${version}.jar.manifest/MANIFEST.MF">
|
|
||||||
<zipfileset src="build/hamcrest-core-${version}-sources.jar"/>
|
|
||||||
<zipfileset src="build/hamcrest-library-${version}-sources.jar"/>
|
|
||||||
<zipfileset src="build/hamcrest-generator-${version}-sources.jar"/>
|
|
||||||
- <zipfileset src="build/hamcrest-integration-${version}-sources.jar"/>
|
|
||||||
</jar>
|
|
||||||
</target>
|
|
||||||
|
|
||||||
@@ -138,24 +136,16 @@
|
|
||||||
<java-to-javadoc-jar modulename="hamcrest-generator-nodeps"/>
|
|
||||||
<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"
|
|
||||||
windowtitle="Hamcrest" source="1.6" failonerror="yes">
|
|
||||||
- <classpath>
|
|
||||||
- <fileset dir="lib/integration">
|
|
||||||
- <include name="*.jar"/>
|
|
||||||
- </fileset>
|
|
||||||
- </classpath>
|
|
||||||
<packageset dir="build/temp/hamcrest-core-${version}-sources.jar.contents"/>
|
|
||||||
<packageset dir="build/temp/hamcrest-library-${version}-sources.jar.contents" excludes="org/hamcrest/internal"/>
|
|
||||||
- <packageset dir="build/temp/hamcrest-integration-${version}-sources.jar.contents"/>
|
|
||||||
|
|
||||||
<group title="Hamcrest API and Utility Classes" packages="org.hamcrest"/>
|
|
||||||
<group title="Matcher Library" packages="org.hamcrest.*"/>
|
|
||||||
- <group title="Integration" packages="org.hamcrest.integration, org.hamcrest.integration.*"/>
|
|
||||||
|
|
||||||
<link offline="false" href="http://www.junit.org/junit/javadoc/3.8.1/"/>
|
|
||||||
<link offline="false" href="http://kentbeck.github.com/junit/javadoc/latest/"/>
|
|
@ -3,21 +3,21 @@ index 54d43fe..ed57763 100644
|
|||||||
--- a/build.xml
|
--- a/build.xml
|
||||||
+++ b/build.xml
|
+++ b/build.xml
|
||||||
@@ -13,17 +13,8 @@
|
@@ -13,17 +13,8 @@
|
||||||
|
|
||||||
<target name="generator" description="Build code generator tool">
|
<target name="generator" description="Build code generator tool">
|
||||||
<java-to-jar srcdir="hamcrest-generator/src/main/java"
|
<java-to-jar srcdir="hamcrest-generator/src/main/java"
|
||||||
- modulename="hamcrest-generator-nodeps"
|
- modulename="hamcrest-generator-nodeps"
|
||||||
+ modulename="hamcrest-generator"
|
+ modulename="hamcrest-generator"
|
||||||
classpath="lib/generator/qdox.jar"/>
|
classpath="lib/generator/qdox.jar"/>
|
||||||
-
|
-
|
||||||
- <!-- Bundle QDox classes in hamcrest-generator.jar using JarJar to place classes under a different package -->
|
- <!-- 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"/>
|
- <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="lib/generator/jarjar.jar"/>
|
||||||
- <jarjar jarfile="build/hamcrest-generator-${version}.jar">
|
- <jarjar jarfile="build/hamcrest-generator-${version}.jar">
|
||||||
- <zipfileset src="build/hamcrest-generator-nodeps-${version}.jar"/>
|
- <zipfileset src="build/hamcrest-generator-nodeps-${version}.jar"/>
|
||||||
- <zipfileset src="lib/generator/qdox.jar"/>
|
- <zipfileset src="lib/generator/qdox.jar"/>
|
||||||
- <rule pattern="com.thoughtworks.qdox.**" result="org.hamcrest.generator.qdox.@1"/>
|
- <rule pattern="com.thoughtworks.qdox.**" result="org.hamcrest.generator.qdox.@1"/>
|
||||||
- </jarjar>
|
- </jarjar>
|
||||||
- <copy file="build/hamcrest-generator-nodeps-${version}-sources.jar" tofile="build/hamcrest-generator-${version}-sources.jar"/>
|
- <copy file="build/hamcrest-generator-nodeps-${version}-sources.jar" tofile="build/hamcrest-generator-${version}-sources.jar"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="core" depends="generator" description="Build core Hamcrest library">
|
<target name="core" depends="generator" description="Build core Hamcrest library">
|
||||||
|
@ -1,94 +1,105 @@
|
|||||||
diff -urEbwB hamcrest-1.3/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java hamcrest-1.3.new/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java
|
From 6d7da5456a7458a249bed9c4c1e768cc7cc2fe40 Mon Sep 17 00:00:00 2001
|
||||||
--- hamcrest-1.3/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java 2019-01-01 15:27:38.332599832 +0100
|
From: Michael Simacek <msimacek@redhat.com>
|
||||||
+++ hamcrest-1.3.new/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java 2019-01-01 15:29:19.560043471 +0100
|
Date: Wed, 1 Feb 2017 12:57:14 +0100
|
||||||
@@ -4,8 +4,10 @@
|
Subject: [PATCH] Port to qdox 2.0
|
||||||
import com.thoughtworks.qdox.model.JavaClass;
|
|
||||||
import com.thoughtworks.qdox.model.JavaMethod;
|
---
|
||||||
import com.thoughtworks.qdox.model.JavaParameter;
|
.../src/main/java/org/hamcrest/generator/QDox.java | 4 ++--
|
||||||
-import com.thoughtworks.qdox.model.Type;
|
.../org/hamcrest/generator/QDoxFactoryReader.java | 26 ++++++++++++----------
|
||||||
+import com.thoughtworks.qdox.model.JavaType;
|
2 files changed, 16 insertions(+), 14 deletions(-)
|
||||||
+import com.thoughtworks.qdox.model.impl.DefaultJavaClass;
|
|
||||||
|
diff --git a/hamcrest-generator/src/main/java/org/hamcrest/generator/QDox.java b/hamcrest-generator/src/main/java/org/hamcrest/generator/QDox.java
|
||||||
+import java.util.ArrayList;
|
index efaf615..338178d 100644
|
||||||
import java.util.Iterator;
|
--- a/hamcrest-generator/src/main/java/org/hamcrest/generator/QDox.java
|
||||||
import java.util.List;
|
+++ b/hamcrest-generator/src/main/java/org/hamcrest/generator/QDox.java
|
||||||
import java.util.regex.Pattern;
|
|
||||||
@@ -56,15 +58,15 @@
|
|
||||||
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 @@
|
|
||||||
// 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 @@
|
|
||||||
*/
|
|
||||||
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();
|
|
||||||
Only in hamcrest-1.3.new/hamcrest-generator/src/main/java/org/hamcrest/generator: QDoxFactoryReader.java.orig
|
|
||||||
Only in hamcrest-1.3.new/hamcrest-generator/src/main/java/org/hamcrest/generator: QDoxFactoryReader.java.rej
|
|
||||||
diff -urEbwB hamcrest-1.3/hamcrest-generator/src/main/java/org/hamcrest/generator/QDox.java hamcrest-1.3.new/hamcrest-generator/src/main/java/org/hamcrest/generator/QDox.java
|
|
||||||
--- hamcrest-1.3/hamcrest-generator/src/main/java/org/hamcrest/generator/QDox.java 2019-01-01 15:27:38.332599832 +0100
|
|
||||||
+++ hamcrest-1.3.new/hamcrest-generator/src/main/java/org/hamcrest/generator/QDox.java 2019-01-01 15:29:19.556043651 +0100
|
|
||||||
@@ -1,6 +1,6 @@
|
@@ -1,6 +1,6 @@
|
||||||
package org.hamcrest.generator;
|
package org.hamcrest.generator;
|
||||||
|
|
||||||
-import com.thoughtworks.qdox.JavaDocBuilder;
|
-import com.thoughtworks.qdox.JavaDocBuilder;
|
||||||
+import com.thoughtworks.qdox.JavaProjectBuilder;
|
+import com.thoughtworks.qdox.JavaProjectBuilder;
|
||||||
import com.thoughtworks.qdox.model.JavaClass;
|
import com.thoughtworks.qdox.model.JavaClass;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@@ -16,7 +16,7 @@
|
@@ -16,7 +16,7 @@ import java.io.Reader;
|
||||||
*/
|
*/
|
||||||
public class QDox {
|
public class QDox {
|
||||||
|
|
||||||
- private final JavaDocBuilder javaDocBuilder = new JavaDocBuilder();
|
- private final JavaDocBuilder javaDocBuilder = new JavaDocBuilder();
|
||||||
+ private final JavaProjectBuilder javaDocBuilder = new JavaProjectBuilder();
|
+ private final JavaProjectBuilder javaDocBuilder = new JavaProjectBuilder();
|
||||||
|
|
||||||
public void addSourceTree(File sourceDir) {
|
public void addSourceTree(File sourceDir) {
|
||||||
javaDocBuilder.addSourceTree(sourceDir);
|
javaDocBuilder.addSourceTree(sourceDir);
|
||||||
Only in hamcrest-1.3.new/hamcrest-generator/src/main/java/org/hamcrest/generator: QDox.java.orig
|
diff --git a/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java b/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java
|
||||||
Only in hamcrest-1.3.new/hamcrest-generator/src/main/java/org/hamcrest/generator: QDox.java.rej
|
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
|
||||||
|
|
||||||
|
@ -2,41 +2,41 @@ diff -urN hamcrest-1.3.old/build.xml hamcrest-1.3/build.xml
|
|||||||
--- hamcrest-1.3.old/build.xml 2014-06-16 13:00:29.321699344 +0200
|
--- hamcrest-1.3.old/build.xml 2014-06-16 13:00:29.321699344 +0200
|
||||||
+++ hamcrest-1.3/build.xml 2014-06-16 14:24:30.160165471 +0200
|
+++ hamcrest-1.3/build.xml 2014-06-16 14:24:30.160165471 +0200
|
||||||
@@ -27,6 +27,7 @@
|
@@ -27,6 +27,7 @@
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="core" depends="generator" description="Build core Hamcrest library">
|
<target name="core" depends="generator" description="Build core Hamcrest library">
|
||||||
+ <parallel threadcount="1">
|
+ <parallel threadcount="1">
|
||||||
<java-to-jar srcdir="hamcrest-core/src/main/java" modulename="hamcrest-core"/>
|
<java-to-jar srcdir="hamcrest-core/src/main/java" modulename="hamcrest-core"/>
|
||||||
|
|
||||||
<!-- Generate one class with all static imports -->
|
<!-- Generate one class with all static imports -->
|
||||||
@@ -36,7 +37,7 @@
|
@@ -36,7 +37,7 @@
|
||||||
fork="yes"
|
fork="yes"
|
||||||
failonerror="yes"
|
failonerror="yes"
|
||||||
classpath="
|
classpath="
|
||||||
- build/hamcrest-core-${version}.jar;
|
- build/hamcrest-core-${version}.jar;
|
||||||
+ build/temp/hamcrest-core-${version}.jar.contents;
|
+ build/temp/hamcrest-core-${version}.jar.contents;
|
||||||
build/hamcrest-generator-${version}.jar;
|
build/hamcrest-generator-${version}.jar;
|
||||||
">
|
">
|
||||||
<arg value="core-matchers.xml"/>
|
<arg value="core-matchers.xml"/>
|
||||||
@@ -48,11 +49,13 @@
|
@@ -48,11 +49,13 @@
|
||||||
<java-to-jar srcdir="build/temp/hamcrest-core/generated-code"
|
<java-to-jar srcdir="build/temp/hamcrest-core/generated-code"
|
||||||
modulename="hamcrest-core"
|
modulename="hamcrest-core"
|
||||||
classpath="build/hamcrest-core-${version}.jar"/>
|
classpath="build/hamcrest-core-${version}.jar"/>
|
||||||
+ </parallel>
|
+ </parallel>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="library"
|
<target name="library"
|
||||||
depends="core,generator"
|
depends="core,generator"
|
||||||
description="Build library of matchers">
|
description="Build library of matchers">
|
||||||
+ <parallel threadcount="1">
|
+ <parallel threadcount="1">
|
||||||
<mkdir dir="build/temp/hamcrest-library/generated-code"/>
|
<mkdir dir="build/temp/hamcrest-library/generated-code"/>
|
||||||
<java-to-jar srcdir="hamcrest-library/src/main/java"
|
<java-to-jar srcdir="hamcrest-library/src/main/java"
|
||||||
modulename="hamcrest-library"
|
modulename="hamcrest-library"
|
||||||
@@ -75,6 +78,7 @@
|
@@ -75,6 +78,7 @@
|
||||||
<java-to-jar srcdir="build/temp/hamcrest-library/generated-code"
|
<java-to-jar srcdir="build/temp/hamcrest-library/generated-code"
|
||||||
modulename="hamcrest-library"
|
modulename="hamcrest-library"
|
||||||
classpath="build/hamcrest-core-${version}.jar"/>
|
classpath="build/hamcrest-core-${version}.jar"/>
|
||||||
+ </parallel>
|
+ </parallel>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="integration" depends="core, library" description="Build integration with external tools">
|
<target name="integration" depends="core, library" description="Build integration with external tools">
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:c6428e40d069fff3f99780efaae96c35ebdbf7cbfd475504254ebffcc19620c2
|
|
||||||
size 3686096
|
|
@ -1,18 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<parent>
|
|
||||||
<groupId>org.hamcrest</groupId>
|
|
||||||
<artifactId>hamcrest-parent</artifactId>
|
|
||||||
<version>1.3</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>hamcrest-all</artifactId>
|
|
||||||
<packaging>jar</packaging>
|
|
||||||
<name>Hamcrest All</name>
|
|
||||||
<description>
|
|
||||||
A self-contained hamcrest jar containing all of the sub-modules in a single artifact.
|
|
||||||
</description>
|
|
||||||
</project>
|
|
@ -1,18 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<parent>
|
|
||||||
<groupId>org.hamcrest</groupId>
|
|
||||||
<artifactId>hamcrest-parent</artifactId>
|
|
||||||
<version>1.3</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>hamcrest-core</artifactId>
|
|
||||||
<packaging>jar</packaging>
|
|
||||||
<name>Hamcrest Core</name>
|
|
||||||
<description>
|
|
||||||
This is the core API of hamcrest matcher framework to be used by third-party framework providers. This includes the a foundation set of matcher implementations for common operations.
|
|
||||||
</description>
|
|
||||||
</project>
|
|
@ -1,17 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<parent>
|
|
||||||
<groupId>org.hamcrest</groupId>
|
|
||||||
<artifactId>hamcrest-parent</artifactId>
|
|
||||||
<version>1.3</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>hamcrest-generator</artifactId>
|
|
||||||
<name>Hamcrest generator</name>
|
|
||||||
<description>
|
|
||||||
A tool to allow many Matcher implementations to be combined into a single class so users don't have to remember many classes/packages to import. Generates code.
|
|
||||||
</description>
|
|
||||||
</project>
|
|
@ -1,40 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<parent>
|
|
||||||
<groupId>org.hamcrest</groupId>
|
|
||||||
<artifactId>hamcrest-parent</artifactId>
|
|
||||||
<version>1.3</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>hamcrest-integration</artifactId>
|
|
||||||
<packaging>jar</packaging>
|
|
||||||
<name>Hamcrest Integration</name>
|
|
||||||
<description>
|
|
||||||
Provides integration between Hamcrest and other testing tools, including JUnit (3 and 4), TestNG, jMock and EasyMock.
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.hamcrest</groupId>
|
|
||||||
<artifactId>hamcrest-library</artifactId>
|
|
||||||
<version>1.3</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>jmock</groupId>
|
|
||||||
<artifactId>jmock</artifactId>
|
|
||||||
<version>1.1.0</version>
|
|
||||||
<optional>true</optional>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.easymock</groupId>
|
|
||||||
<artifactId>easymock</artifactId>
|
|
||||||
<version>2.2</version>
|
|
||||||
<optional>true</optional>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</project>
|
|
3
hamcrest-java-1.3.tar.gz
Normal file
3
hamcrest-java-1.3.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:6ac31de50c6f3b047a7bd7f62ab7ca3e88b2a8449d22b0978c9f575740d0e085
|
||||||
|
size 2007925
|
@ -1,26 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<parent>
|
|
||||||
<groupId>org.hamcrest</groupId>
|
|
||||||
<artifactId>hamcrest-parent</artifactId>
|
|
||||||
<version>1.3</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<artifactId>hamcrest-library</artifactId>
|
|
||||||
<packaging>jar</packaging>
|
|
||||||
<name>Hamcrest library</name>
|
|
||||||
<description>
|
|
||||||
Hamcrest library of matcher implementations.
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.hamcrest</groupId>
|
|
||||||
<artifactId>hamcrest-core</artifactId>
|
|
||||||
<version>1.3</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
</project>
|
|
@ -1,72 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<groupId>org.hamcrest</groupId>
|
|
||||||
<artifactId>hamcrest-parent</artifactId>
|
|
||||||
<version>1.3</version>
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
|
|
||||||
<name>Hamcrest Maven Parent</name>
|
|
||||||
<url>https://github.com/hamcrest/JavaHamcrest</url>
|
|
||||||
<description>General parent POM for all hamcrest libraries.</description>
|
|
||||||
|
|
||||||
<licenses>
|
|
||||||
<license>
|
|
||||||
<name>New BSD License</name>
|
|
||||||
<url>http://www.opensource.org/licenses/bsd-license.php</url>
|
|
||||||
<distribution>repo</distribution>
|
|
||||||
</license>
|
|
||||||
</licenses>
|
|
||||||
|
|
||||||
<scm>
|
|
||||||
<url>https://github.com/hamcrest/JavaHamcrest</url>
|
|
||||||
<connection>scm:git:git@github.com:hamcrest/JavaHamcrest.git</connection>
|
|
||||||
</scm>
|
|
||||||
|
|
||||||
<developers>
|
|
||||||
<developer>
|
|
||||||
<id>joe.walnes</id>
|
|
||||||
<name>Joe Walnes</name>
|
|
||||||
<roles>
|
|
||||||
<role>Developer</role>
|
|
||||||
</roles>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>nat.pryce</id>
|
|
||||||
<name>Nat Pryce</name>
|
|
||||||
<roles>
|
|
||||||
<role>Developer</role>
|
|
||||||
</roles>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>smgfreeman</id>
|
|
||||||
<name>Steve Freeman</name>
|
|
||||||
<roles>
|
|
||||||
<role>Developer</role>
|
|
||||||
</roles>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>neildunn</id>
|
|
||||||
<name>Neil Dunn</name>
|
|
||||||
<roles>
|
|
||||||
<role>Developer</role>
|
|
||||||
</roles>
|
|
||||||
</developer>
|
|
||||||
<developer>
|
|
||||||
<id>scarytom</id>
|
|
||||||
<name>Tom Denley</name>
|
|
||||||
<roles>
|
|
||||||
<role>Developer</role>
|
|
||||||
</roles>
|
|
||||||
</developer>
|
|
||||||
</developers>
|
|
||||||
|
|
||||||
<modules>
|
|
||||||
<module>hamcrest-core</module>
|
|
||||||
<module>hamcrest-generator</module>
|
|
||||||
<module>hamcrest-library</module>
|
|
||||||
<module>hamcrest-integration</module>
|
|
||||||
</modules>
|
|
||||||
</project>
|
|
@ -1,20 +0,0 @@
|
|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<parent>
|
|
||||||
<groupId>org.hamcrest</groupId>
|
|
||||||
<artifactId>hamcrest-parent</artifactId>
|
|
||||||
<version>1.1</version>
|
|
||||||
</parent>
|
|
||||||
<artifactId>hamcrest-text</artifactId>
|
|
||||||
<packaging>jar</packaging>
|
|
||||||
<name>Hamcrest Text</name>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>${pom.groupId}</groupId>
|
|
||||||
<artifactId>hamcrest-core</artifactId>
|
|
||||||
<version>${pom.version}</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
</project>
|
|
@ -1,14 +0,0 @@
|
|||||||
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.text
|
|
||||||
Require-Bundle: org.hamcrest.core;bundle-version="1.3.0",org.hamcrest.
|
|
||||||
library;bundle-version="1.3.0"
|
|
||||||
Bundle-Version: 1.3.0.v20090501071000
|
|
||||||
Export-Package: org.hamcrest.text.pattern;version="1.3.0",org.hamcrest
|
|
||||||
.text.pattern.internal.ast;version="1.3.0";x-internal:=true,org.hamcr
|
|
||||||
est.text.pattern.internal.naming;version="1.3.0";x-internal:=true
|
|
||||||
Bundle-ManifestVersion: 2
|
|
126
hamcrest.spec
126
hamcrest.spec
@ -22,45 +22,26 @@ Release: 0
|
|||||||
Summary: Library of matchers for building test expressions
|
Summary: Library of matchers for building test expressions
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
Group: Development/Libraries/Java
|
Group: Development/Libraries/Java
|
||||||
Url: https://github.com/hamcrest/JavaHamcrest
|
URL: https://github.com/hamcrest/JavaHamcrest
|
||||||
Source0: http://%{name}.googlecode.com/files/%{name}-%{version}.tgz
|
Source0: https://github.com/hamcrest/JavaHamcrest/archive/hamcrest-java-%{version}.tar.gz
|
||||||
Source1: http://repo1.maven.org/maven2/org/%{name}/%{name}-parent/%{version}/%{name}-parent-%{version}.pom
|
|
||||||
Source2: http://repo1.maven.org/maven2/org/%{name}/%{name}-library/%{version}/%{name}-library-%{version}.pom
|
|
||||||
Source3: http://repo1.maven.org/maven2/org/%{name}/%{name}-integration/%{version}/%{name}-integration-%{version}.pom
|
|
||||||
Source4: http://repo1.maven.org/maven2/org/%{name}/%{name}-generator/%{version}/%{name}-generator-%{version}.pom
|
|
||||||
Source5: http://repo1.maven.org/maven2/org/%{name}/%{name}-core/%{version}/%{name}-core-%{version}.pom
|
|
||||||
Source6: http://repo1.maven.org/maven2/org/%{name}/%{name}-all/%{version}/%{name}-all-%{version}.pom
|
|
||||||
# This file was added by the maintainer for compatibility with maven dep
|
|
||||||
# solving system
|
|
||||||
Source7: %{name}-text-%{version}.pom
|
|
||||||
Source8: hamcrest-core-MANIFEST.MF
|
Source8: hamcrest-core-MANIFEST.MF
|
||||||
Source9: hamcrest-library-MANIFEST.MF
|
Source9: hamcrest-library-MANIFEST.MF
|
||||||
Source10: hamcrest-text-MANIFEST.MF
|
|
||||||
Source11: hamcrest-integration-MANIFEST.MF
|
Source11: hamcrest-integration-MANIFEST.MF
|
||||||
Source12: hamcrest-generator-MANIFEST.MF
|
Source12: hamcrest-generator-MANIFEST.MF
|
||||||
#PATCH-FIX-OPENSUSE: don't use versioned deps, no overview in html
|
|
||||||
Patch0: %{name}-%{version}-build.patch
|
Patch0: %{name}-%{version}-build.patch
|
||||||
#PATCH-FIX-OPENSUSE: don't bundle QDox classes into hamcrest-generator.jar
|
|
||||||
Patch1: %{name}-%{version}-no-jarjar.patch
|
Patch1: %{name}-%{version}-no-jarjar.patch
|
||||||
#PATCH-FIX-OPENSUSE: don't build hamcrest-integration.jar
|
|
||||||
Patch2: %{name}-%{version}-no-integration.patch
|
|
||||||
#PATCH-FIX-OPENSUSE: there is no hamcrest-generator-nodeps
|
|
||||||
Patch3: %{name}-%{version}-javadoc.patch
|
Patch3: %{name}-%{version}-javadoc.patch
|
||||||
#PATCH-FIX-UPSTREAM: random build crash fix
|
Patch4: %{name}-%{version}-qdox-2.0.patch
|
||||||
Patch4: hamcrest-1.3-random-build-crash.patch
|
Patch5: %{name}-%{version}-fork-javac.patch
|
||||||
Patch5: hamcrest-1.3-fork-javac.patch
|
Patch6: %{name}-%{version}-javadoc9.patch
|
||||||
Patch6: hamcrest-1.3-javadoc9.patch
|
Patch7: %{name}-%{version}-javadoc10.patch
|
||||||
Patch7: hamcrest-1.3-javadoc10.patch
|
Patch8: %{name}-%{version}-random-build-crash.patch
|
||||||
Patch8: hamcrest-1.3-qdox-2.0.patch
|
BuildRequires: ant
|
||||||
BuildRequires: ant >= 1.6.5
|
BuildRequires: fdupes
|
||||||
BuildRequires: java-devel >= 1.6.0
|
|
||||||
BuildRequires: javapackages-local
|
BuildRequires: javapackages-local
|
||||||
BuildRequires: javapackages-tools
|
|
||||||
BuildRequires: qdox >= 2.0
|
BuildRequires: qdox >= 2.0
|
||||||
BuildRequires: zip
|
Requires: %{name}-core = %{version}-%{release}
|
||||||
Requires: java >= 1.6.0
|
|
||||||
Requires: qdox >= 2.0
|
Requires: qdox >= 2.0
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -69,6 +50,14 @@ predicates) allowing 'match' rules to be defined declaratively, to be
|
|||||||
used in other frameworks. Typical scenarios include testing frameworks,
|
used in other frameworks. Typical scenarios include testing frameworks,
|
||||||
mocking libraries and UI validation rules.
|
mocking libraries and UI validation rules.
|
||||||
|
|
||||||
|
%package core
|
||||||
|
Summary: Core API of hamcrest matcher framework.
|
||||||
|
Group: Development/Libraries/Java
|
||||||
|
|
||||||
|
%description core
|
||||||
|
The core API of hamcrest matcher framework to be used by third-party framework providers.
|
||||||
|
This includes the a foundation set of matcher implementations for common operations.
|
||||||
|
|
||||||
%package javadoc
|
%package javadoc
|
||||||
Summary: Javadoc for %{name}
|
Summary: Javadoc for %{name}
|
||||||
Group: Documentation/HTML
|
Group: Documentation/HTML
|
||||||
@ -79,23 +68,25 @@ Javadoc for %{name}.
|
|||||||
%package demo
|
%package demo
|
||||||
Summary: Demo files for %{name}
|
Summary: Demo files for %{name}
|
||||||
Group: Development/Libraries/Java
|
Group: Development/Libraries/Java
|
||||||
Requires: %{name} = %{version}
|
Requires: %{name} = %{version}-%{release}
|
||||||
Requires: junit
|
Requires: junit
|
||||||
|
|
||||||
%description demo
|
%description demo
|
||||||
Demo files for %{name}.
|
Demo files for %{name}.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q -n JavaHamcrest-%{name}-java-%{version}
|
||||||
|
|
||||||
find . -type f -name "*.jar" | xargs -t rm
|
find . -type f -name "*.jar" | xargs -t rm
|
||||||
rm -fr hamcrest-integration/src/main/java/org/hamcrest/integration/JMock1Adapter.java
|
rm -fr hamcrest-integration/src/main/java/org/hamcrest/integration/JMock1Adapter.java
|
||||||
rm -fr hamcrest-integration/src/main/java/org/hamcrest/JMock1Matchers.java
|
rm -fr hamcrest-integration/src/main/java/org/hamcrest/JMock1Matchers.java
|
||||||
rm -fr hamcrest-unit-test/src/main/java/org/hamcrest/integration/JMock1AdapterTest.java
|
rm -fr hamcrest-integration/src/main/java/org/hamcrest/integration/EasyMock2Adapter.java
|
||||||
|
rm -fr hamcrest-integration/src/main/java/org/hamcrest/EasyMock2Matchers.java
|
||||||
|
# BUILD/hamcrest-1.1/lib/generator/qdox-1.6.1.jar.no
|
||||||
ln -sf $(build-classpath qdox) lib/generator/
|
ln -sf $(build-classpath qdox) lib/generator/
|
||||||
|
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
%patch5 -p1
|
%patch5 -p1
|
||||||
@ -103,49 +94,51 @@ ln -sf $(build-classpath qdox) lib/generator/
|
|||||||
%patch7 -p1
|
%patch7 -p1
|
||||||
%patch8 -p1
|
%patch8 -p1
|
||||||
|
|
||||||
perl -pi -e 's/\r$//g' LICENSE.txt
|
sed -i 's/\r//' LICENSE.txt
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CLASSPATH=$(build-classpath qdox)
|
export CLASSPATH=$(build-classpath qdox)
|
||||||
ant -Dant.build.javac.source=1.6 -Dversion=%{version} -Dbuild.sysclasspath=last clean core generator library bigjar javadoc
|
ant -Dant.build.javac.source=1.6 -Dant.build.javac.target=1.6 -Dversion=%{version} -Dbuild.sysclasspath=last clean core generator library bigjar javadoc
|
||||||
|
|
||||||
# inject OSGi manifests
|
# inject OSGi manifests
|
||||||
jar ufm build/%{name}-core-%{version}.jar %{SOURCE8}
|
jar ufm build/%{name}-core-%{version}.jar %{SOURCE8}
|
||||||
jar ufm build/%{name}-library-%{version}.jar %{SOURCE9}
|
jar ufm build/%{name}-library-%{version}.jar %{SOURCE9}
|
||||||
jar ufm build/%{name}-text-%{version}.jar %{SOURCE10}
|
|
||||||
jar ufm build/%{name}-integration-%{version}.jar %{SOURCE11}
|
jar ufm build/%{name}-integration-%{version}.jar %{SOURCE11}
|
||||||
jar ufm build/%{name}-generator-%{version}.jar %{SOURCE12}
|
jar ufm build/%{name}-generator-%{version}.jar %{SOURCE12}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
sed -i 's/@VERSION@/%{version}/g' pom/*.pom
|
||||||
|
|
||||||
# jars
|
# jars
|
||||||
install -d -m 755 %{buildroot}%{_javadir}/%{name}
|
install -d -m 755 %{buildroot}%{_javadir}/%{name}
|
||||||
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
install -d -m 755 %{buildroot}%{_mavenpomdir}/%{name}
|
||||||
install -m 644 %{SOURCE1} %{buildroot}%{_mavenpomdir}/JPP.%{name}-parent.pom
|
install -m 644 pom/%{name}-parent.pom %{buildroot}%{_mavenpomdir}/%{name}/parent.pom
|
||||||
%add_maven_depmap JPP.%{name}-parent.pom
|
%add_maven_depmap %{name}/parent.pom -f core
|
||||||
|
|
||||||
install -m 644 build/%{name}-all-%{version}.jar %{buildroot}%{_javadir}/%{name}/all.jar
|
|
||||||
install -m 644 %{SOURCE6} %{buildroot}%{_mavenpomdir}/JPP.%{name}-all.pom
|
|
||||||
%add_maven_depmap JPP.%{name}-all.pom %{name}/all.jar
|
|
||||||
|
|
||||||
install -m 644 build/%{name}-core-%{version}.jar %{buildroot}%{_javadir}/%{name}/core.jar
|
install -m 644 build/%{name}-core-%{version}.jar %{buildroot}%{_javadir}/%{name}/core.jar
|
||||||
install -m 644 %{SOURCE5} %{buildroot}%{_mavenpomdir}/JPP.%{name}-core.pom
|
install -m 644 pom/%{name}-core.pom %{buildroot}%{_mavenpomdir}/%{name}/core.pom
|
||||||
%add_maven_depmap JPP.%{name}-core.pom %{name}/core.jar
|
%add_maven_depmap %{name}/core.pom %{name}/core.jar -f core
|
||||||
|
|
||||||
|
install -m 644 build/%{name}-all-%{version}.jar %{buildroot}%{_javadir}/%{name}/all.jar
|
||||||
|
install -m 644 pom/%{name}-all.pom %{buildroot}%{_mavenpomdir}/%{name}/all.pom
|
||||||
|
%add_maven_depmap %{name}/all.pom %{name}/all.jar
|
||||||
|
|
||||||
install -m 644 build/%{name}-generator-%{version}.jar %{buildroot}%{_javadir}/%{name}/generator.jar
|
install -m 644 build/%{name}-generator-%{version}.jar %{buildroot}%{_javadir}/%{name}/generator.jar
|
||||||
install -m 644 %{SOURCE4} %{buildroot}%{_mavenpomdir}/JPP.%{name}-generator.pom
|
install -m 644 pom/%{name}-generator.pom %{buildroot}%{_mavenpomdir}/%{name}/generator.pom
|
||||||
%add_maven_depmap JPP.%{name}-generator.pom %{name}/generator.jar
|
%add_maven_depmap %{name}/generator.pom %{name}/generator.jar
|
||||||
|
|
||||||
|
install -m 644 build/%{name}-integration-%{version}.jar %{buildroot}%{_javadir}/%{name}/integration.jar
|
||||||
|
install -m 644 pom/%{name}-integration.pom %{buildroot}%{_mavenpomdir}/%{name}/integration.pom
|
||||||
|
%add_maven_depmap %{name}/integration.pom %{name}/integration.jar
|
||||||
|
|
||||||
install -m 644 build/%{name}-library-%{version}.jar %{buildroot}%{_javadir}/%{name}/library.jar
|
install -m 644 build/%{name}-library-%{version}.jar %{buildroot}%{_javadir}/%{name}/library.jar
|
||||||
install -m 644 %{SOURCE2} %{buildroot}%{_mavenpomdir}/JPP.%{name}-library.pom
|
install -m 644 pom/%{name}-library.pom %{buildroot}%{_mavenpomdir}/%{name}/library.pom
|
||||||
%add_maven_depmap JPP.%{name}-library.pom %{name}/library.jar
|
%add_maven_depmap %{name}/library.pom %{name}/library.jar
|
||||||
|
|
||||||
install -m 644 build/%{name}-text-%{version}.jar %{buildroot}%{_javadir}/%{name}/text.jar
|
|
||||||
install -m 644 %{SOURCE7} %{buildroot}%{_mavenpomdir}/JPP.%{name}-text.pom
|
|
||||||
%add_maven_depmap JPP.%{name}-text.pom %{name}/text.jar
|
|
||||||
|
|
||||||
# javadoc
|
# javadoc
|
||||||
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
|
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
|
||||||
cp -pr build/temp/hamcrest-all-1.3-javadoc.jar.contents/* %{buildroot}%{_javadocdir}/%{name}
|
cp -pr build/temp/hamcrest-all-%{version}-javadoc.jar.contents/* %{buildroot}%{_javadocdir}/%{name}
|
||||||
|
%fdupes -s %{buildroot}%{_javadocdir}
|
||||||
|
|
||||||
# demo
|
# demo
|
||||||
install -d -m 755 %{buildroot}%{_datadir}/%{name}
|
install -d -m 755 %{buildroot}%{_datadir}/%{name}
|
||||||
@ -153,22 +146,27 @@ cp -pr %{name}-examples %{buildroot}%{_datadir}/%{name}/
|
|||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(0644,root,root,0755)
|
%defattr(0644,root,root,0755)
|
||||||
%doc LICENSE.txt
|
%license LICENSE.txt
|
||||||
%dir %{_javadir}/%{name}
|
|
||||||
%{_javadir}/%{name}/all.jar
|
%{_javadir}/%{name}/all.jar
|
||||||
%{_javadir}/%{name}/core.jar
|
|
||||||
%{_javadir}/%{name}/generator.jar
|
%{_javadir}/%{name}/generator.jar
|
||||||
%if %with integration
|
|
||||||
%{_javadir}/%{name}/integration.jar
|
%{_javadir}/%{name}/integration.jar
|
||||||
%endif
|
|
||||||
%{_javadir}/%{name}/library.jar
|
%{_javadir}/%{name}/library.jar
|
||||||
%{_javadir}/%{name}/text.jar
|
%{_mavenpomdir}/%{name}/all.pom
|
||||||
%if %with tests
|
%{_mavenpomdir}/%{name}/generator.pom
|
||||||
%{_javadir}/%{name}/unit-test.jar
|
%{_mavenpomdir}/%{name}/integration.pom
|
||||||
%endif
|
%{_mavenpomdir}/%{name}/library.pom
|
||||||
%{_mavenpomdir}/*
|
|
||||||
%{_datadir}/maven-metadata/%{name}.xml*
|
%{_datadir}/maven-metadata/%{name}.xml*
|
||||||
|
|
||||||
|
%files core
|
||||||
|
%defattr(0644,root,root,0755)
|
||||||
|
%license LICENSE.txt
|
||||||
|
%dir %{_javadir}/%{name}
|
||||||
|
%dir %{_mavenpomdir}/%{name}
|
||||||
|
%{_javadir}/%{name}/core.jar
|
||||||
|
%{_mavenpomdir}/%{name}/parent.pom
|
||||||
|
%{_mavenpomdir}/%{name}/core.pom
|
||||||
|
%{_datadir}/maven-metadata/%{name}-core.xml*
|
||||||
|
|
||||||
%files javadoc
|
%files javadoc
|
||||||
%defattr(0644,root,root,0755)
|
%defattr(0644,root,root,0755)
|
||||||
%{_javadocdir}/%{name}
|
%{_javadocdir}/%{name}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user