Fridrich Strba 2019-01-02 21:29:29 +00:00 committed by Git OBS Bridge
parent 975d95b2bf
commit 7bce6fa6df
20 changed files with 1238 additions and 1501 deletions

View File

@ -1,30 +1,39 @@
diff --git a/build.xml b/build.xml
index 1cfd4fb..54d43fe 100644
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,7 @@
<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">
<classpath>
<fileset dir="lib/integration">
<include name="*.jar"/>
<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"/>

View File

@ -7,16 +7,19 @@ Subject: [PATCH] Fork javac
build.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: hamcrest-1.3/build.xml
===================================================================
--- hamcrest-1.3.orig/build.xml
+++ hamcrest-1.3/build.xml
@@ -268,7 +268,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.6" includeantruntime="false" fork="true">
<classpath>
<fileset dir="lib/integration">
<include name="*.jar"/>
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}" includeantruntime="false" fork="true">
<classpath>
<fileset dir="lib/integration">
<include name="*.jar"/>
--
2.9.3

View File

@ -1,20 +1,17 @@
---
build.xml | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Index: hamcrest-1.3/build.xml
===================================================================
--- hamcrest-1.3.orig/build.xml
+++ hamcrest-1.3/build.xml
@@ -133,10 +133,9 @@
</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"/>
- <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"
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"

View File

@ -1,12 +1,12 @@
--- 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
@@ -165,9 +165,6 @@
<group title="Hamcrest API and Utility Classes" packages="org.hamcrest"/>
<group title="Matcher Library" packages="org.hamcrest.*"/>
-
- <link offline="false" href="http://www.junit.org/junit/javadoc/3.8.1/"/>
- <link offline="false" href="http://kentbeck.github.com/junit/javadoc/latest/"/>
</javadoc>
<jar jarfile="build/hamcrest-all-${version}-javadoc.jar">
<fileset dir="build/temp/hamcrest-all-${version}-javadoc.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/"/>
</javadoc>
<jar jarfile="build/hamcrest-all-${version}-javadoc.jar">
<fileset dir="build/temp/hamcrest-all-${version}-javadoc.jar.contents"/>

File diff suppressed because it is too large Load Diff

View File

@ -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/"/>

View File

@ -3,21 +3,21 @@ 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">
<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">

View File

@ -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
--- hamcrest-1.3/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java 2019-01-01 15:27:38.332599832 +0100
+++ hamcrest-1.3.new/hamcrest-generator/src/main/java/org/hamcrest/generator/QDoxFactoryReader.java 2019-01-01 15:29:19.560043471 +0100
@@ -4,8 +4,10 @@
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 @@
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
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 @@
*/
public class QDox {
- private final JavaDocBuilder javaDocBuilder = new JavaDocBuilder();
+ private final JavaProjectBuilder javaDocBuilder = new JavaProjectBuilder();
public void addSourceTree(File sourceDir) {
javaDocBuilder.addSourceTree(sourceDir);
Only in hamcrest-1.3.new/hamcrest-generator/src/main/java/org/hamcrest/generator: QDox.java.orig
Only in hamcrest-1.3.new/hamcrest-generator/src/main/java/org/hamcrest/generator: QDox.java.rej
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

View File

@ -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/build.xml 2014-06-16 14:24:30.160165471 +0200
@@ -27,6 +27,7 @@
</target>
<target name="core" depends="generator" description="Build core Hamcrest library">
+ <parallel threadcount="1">
<java-to-jar srcdir="hamcrest-core/src/main/java" modulename="hamcrest-core"/>
<!-- Generate one class with all static imports -->
</target>
<target name="core" depends="generator" description="Build core Hamcrest library">
+ <parallel threadcount="1">
<java-to-jar srcdir="hamcrest-core/src/main/java" modulename="hamcrest-core"/>
<!-- Generate one class with all static imports -->
@@ -36,7 +37,7 @@
fork="yes"
failonerror="yes"
classpath="
- build/hamcrest-core-${version}.jar;
+ build/temp/hamcrest-core-${version}.jar.contents;
build/hamcrest-generator-${version}.jar;
">
<arg value="core-matchers.xml"/>
fork="yes"
failonerror="yes"
classpath="
- build/hamcrest-core-${version}.jar;
+ build/temp/hamcrest-core-${version}.jar.contents;
build/hamcrest-generator-${version}.jar;
">
<arg value="core-matchers.xml"/>
@@ -48,11 +49,13 @@
<java-to-jar srcdir="build/temp/hamcrest-core/generated-code"
modulename="hamcrest-core"
classpath="build/hamcrest-core-${version}.jar"/>
+ </parallel>
</target>
<target name="library"
depends="core,generator"
description="Build library of matchers">
+ <parallel threadcount="1">
<mkdir dir="build/temp/hamcrest-library/generated-code"/>
<java-to-jar srcdir="hamcrest-library/src/main/java"
modulename="hamcrest-library"
<java-to-jar srcdir="build/temp/hamcrest-core/generated-code"
modulename="hamcrest-core"
classpath="build/hamcrest-core-${version}.jar"/>
+ </parallel>
</target>
<target name="library"
depends="core,generator"
description="Build library of matchers">
+ <parallel threadcount="1">
<mkdir dir="build/temp/hamcrest-library/generated-code"/>
<java-to-jar srcdir="hamcrest-library/src/main/java"
modulename="hamcrest-library"
@@ -75,6 +78,7 @@
<java-to-jar srcdir="build/temp/hamcrest-library/generated-code"
modulename="hamcrest-library"
classpath="build/hamcrest-core-${version}.jar"/>
+ </parallel>
</target>
<target name="integration" depends="core, library" description="Build integration with external tools">
<java-to-jar srcdir="build/temp/hamcrest-library/generated-code"
modulename="hamcrest-library"
classpath="build/hamcrest-core-${version}.jar"/>
+ </parallel>
</target>
<target name="integration" depends="core, library" description="Build integration with external tools">

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c6428e40d069fff3f99780efaae96c35ebdbf7cbfd475504254ebffcc19620c2
size 3686096

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6ac31de50c6f3b047a7bd7f62ab7ca3e88b2a8449d22b0978c9f575740d0e085
size 2007925

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -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

View File

@ -22,45 +22,26 @@ Release: 0
Summary: Library of matchers for building test expressions
License: BSD-3-Clause
Group: Development/Libraries/Java
Url: https://github.com/hamcrest/JavaHamcrest
Source0: http://%{name}.googlecode.com/files/%{name}-%{version}.tgz
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
URL: https://github.com/hamcrest/JavaHamcrest
Source0: https://github.com/hamcrest/JavaHamcrest/archive/hamcrest-java-%{version}.tar.gz
Source8: hamcrest-core-MANIFEST.MF
Source9: hamcrest-library-MANIFEST.MF
Source10: hamcrest-text-MANIFEST.MF
Source11: hamcrest-integration-MANIFEST.MF
Source12: hamcrest-generator-MANIFEST.MF
#PATCH-FIX-OPENSUSE: don't use versioned deps, no overview in html
Patch0: %{name}-%{version}-build.patch
#PATCH-FIX-OPENSUSE: don't bundle QDox classes into hamcrest-generator.jar
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
#PATCH-FIX-UPSTREAM: random build crash fix
Patch4: hamcrest-1.3-random-build-crash.patch
Patch5: hamcrest-1.3-fork-javac.patch
Patch6: hamcrest-1.3-javadoc9.patch
Patch7: hamcrest-1.3-javadoc10.patch
Patch8: hamcrest-1.3-qdox-2.0.patch
BuildRequires: ant >= 1.6.5
BuildRequires: java-devel >= 1.6.0
Patch4: %{name}-%{version}-qdox-2.0.patch
Patch5: %{name}-%{version}-fork-javac.patch
Patch6: %{name}-%{version}-javadoc9.patch
Patch7: %{name}-%{version}-javadoc10.patch
Patch8: %{name}-%{version}-random-build-crash.patch
BuildRequires: ant
BuildRequires: fdupes
BuildRequires: javapackages-local
BuildRequires: javapackages-tools
BuildRequires: qdox >= 2.0
BuildRequires: zip
Requires: java >= 1.6.0
Requires: %{name}-core = %{version}-%{release}
Requires: qdox >= 2.0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
@ -69,6 +50,14 @@ 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 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
Summary: Javadoc for %{name}
Group: Documentation/HTML
@ -79,23 +68,25 @@ Javadoc for %{name}.
%package demo
Summary: Demo files for %{name}
Group: Development/Libraries/Java
Requires: %{name} = %{version}
Requires: %{name} = %{version}-%{release}
Requires: junit
%description demo
Demo files for %{name}.
%prep
%setup -q
%setup -q -n JavaHamcrest-%{name}-java-%{version}
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/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/
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
@ -103,49 +94,51 @@ ln -sf $(build-classpath qdox) lib/generator/
%patch7 -p1
%patch8 -p1
perl -pi -e 's/\r$//g' LICENSE.txt
sed -i 's/\r//' LICENSE.txt
%build
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
jar ufm build/%{name}-core-%{version}.jar %{SOURCE8}
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}-generator-%{version}.jar %{SOURCE12}
%install
sed -i 's/@VERSION@/%{version}/g' pom/*.pom
# jars
install -d -m 755 %{buildroot}%{_javadir}/%{name}
install -d -m 755 %{buildroot}%{_mavenpomdir}
install -m 644 %{SOURCE1} %{buildroot}%{_mavenpomdir}/JPP.%{name}-parent.pom
%add_maven_depmap JPP.%{name}-parent.pom
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 -d -m 755 %{buildroot}%{_mavenpomdir}/%{name}
install -m 644 pom/%{name}-parent.pom %{buildroot}%{_mavenpomdir}/%{name}/parent.pom
%add_maven_depmap %{name}/parent.pom -f core
install -m 644 build/%{name}-core-%{version}.jar %{buildroot}%{_javadir}/%{name}/core.jar
install -m 644 %{SOURCE5} %{buildroot}%{_mavenpomdir}/JPP.%{name}-core.pom
%add_maven_depmap JPP.%{name}-core.pom %{name}/core.jar
install -m 644 pom/%{name}-core.pom %{buildroot}%{_mavenpomdir}/%{name}/core.pom
%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 %{SOURCE4} %{buildroot}%{_mavenpomdir}/JPP.%{name}-generator.pom
%add_maven_depmap JPP.%{name}-generator.pom %{name}/generator.jar
install -m 644 pom/%{name}-generator.pom %{buildroot}%{_mavenpomdir}/%{name}/generator.pom
%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 %{SOURCE2} %{buildroot}%{_mavenpomdir}/JPP.%{name}-library.pom
%add_maven_depmap JPP.%{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
install -m 644 pom/%{name}-library.pom %{buildroot}%{_mavenpomdir}/%{name}/library.pom
%add_maven_depmap %{name}/library.pom %{name}/library.jar
# javadoc
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
install -d -m 755 %{buildroot}%{_datadir}/%{name}
@ -153,22 +146,27 @@ cp -pr %{name}-examples %{buildroot}%{_datadir}/%{name}/
%files
%defattr(0644,root,root,0755)
%doc LICENSE.txt
%dir %{_javadir}/%{name}
%license LICENSE.txt
%{_javadir}/%{name}/all.jar
%{_javadir}/%{name}/core.jar
%{_javadir}/%{name}/generator.jar
%if %with integration
%{_javadir}/%{name}/integration.jar
%endif
%{_javadir}/%{name}/library.jar
%{_javadir}/%{name}/text.jar
%if %with tests
%{_javadir}/%{name}/unit-test.jar
%endif
%{_mavenpomdir}/*
%{_mavenpomdir}/%{name}/all.pom
%{_mavenpomdir}/%{name}/generator.pom
%{_mavenpomdir}/%{name}/integration.pom
%{_mavenpomdir}/%{name}/library.pom
%{_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
%defattr(0644,root,root,0755)
%{_javadocdir}/%{name}