commit 1ebd207a2d1daa03c707063545ce6972ec6b6f6a Author: Michal Srb msrb@redhat.com Date: Tue Oct 1 15:46:08 2013 +0200
Backport upstream patch. It helps to identify root problem when build fails
...urce-tree-contains-a-compilation-error-it.patch | 42 ++++++++++++++++++++ annotation-indexer.spec | 10 ++++- 2 files changed, 51 insertions(+), 1 deletions(-) --- diff --git a/0001-when-the-source-tree-contains-a-compilation-error-it.patch b/0001-when-the-source-tree-contains-a-compilation-error-it.patch new file mode 100644 index 0000000..8fea497 --- /dev/null +++ b/0001-when-the-source-tree-contains-a-compilation-error-it.patch @@ -0,0 +1,42 @@ +From 72d8ad1ce5d8dc6f301b6acc7602fbba3a0299dc Mon Sep 17 00:00:00 2001 +From: Kohsuke Kawaguchi kk@kohsuke.org +Date: Wed, 27 Mar 2013 16:22:24 -0700 +Subject: [PATCH] when the source tree contains a compilation error, it could + end up here. + +I observed that when there's a compilation error where a constructor has unresolvable annotation like the following, then that ends up in here, masking the root problem. + +class Foo { + @ThereIsNoSuchAnnotation + public Foo() { ... } +} +--- + .../org/jvnet/hudson/annotation_indexer/AnnotationProcessorImpl.java | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/main/java/org/jvnet/hudson/annotation_indexer/AnnotationProcessorImpl.java b/src/main/java/org/jvnet/hudson/annotation_indexer/AnnotationProcessorImpl.java +index 0d64636..ec46fd8 100644 +--- a/src/main/java/org/jvnet/hudson/annotation_indexer/AnnotationProcessorImpl.java ++++ b/src/main/java/org/jvnet/hudson/annotation_indexer/AnnotationProcessorImpl.java +@@ -82,7 +82,8 @@ public class AnnotationProcessorImpl extends AbstractProcessor { + t = (TypeElement) elt.getEnclosingElement(); + break; + default: +- throw new AssertionError(elt.getKind()); ++// throw new AssertionError(elt.getKind()); ++ return; + } + classes.add(getElementUtils().getBinaryName(t).toString()); + } +@@ -138,7 +139,7 @@ public class AnnotationProcessorImpl extends AbstractProcessor { + + @Override + public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) { +- if (roundEnv.processingOver()) ++ if (roundEnv.processingOver() || roundEnv.errorRaised()) + return false; + + // map from indexable annotation names, to actual uses +-- +1.8.3.1 + diff --git a/annotation-indexer.spec b/annotation-indexer.spec index de0ad2e..183fb8f 100644 --- a/annotation-indexer.spec +++ b/annotation-indexer.spec @@ -1,6 +1,6 @@ Name: annotation-indexer Version: 1.4 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Jenkins annotation-indexer library
# License is specified in pom file @@ -9,6 +9,9 @@ URL: https://github.com/jenkinsci/lib-annotation-indexer Source0: https://github.com/jenkinsci/lib-%%7Bname%7D/archive/%%7Bname%7D-%%7Bversion... Source1: https://raw.github.com/jenkinsci/jenkins/jenkins-1.510/LICENSE.txt
+# Backported upstream patch, this can be removed if %%{version} > 1.4 +Patch0: 0001-when-the-source-tree-contains-a-compilation-error-it.patch + BuildArch: noarch
BuildRequires: maven-local @@ -28,6 +31,8 @@ This package contains the API documentation for %{name}. %prep %setup -q -n lib-%{name}-%{name}-%{version}
+%patch0 -p1 + cp %{SOURCE1} LICENSE
# Nothing really interesting in parent @@ -48,6 +53,9 @@ cp %{SOURCE1} LICENSE %doc LICENSE
%changelog +* Tue Oct 01 2013 Michal Srb msrb@redhat.com - 1.4-3 +- Backport upstream patch. It helps to identify root problem when build fails + * Sat Aug 03 2013 Fedora Release Engineering rel-eng@lists.fedoraproject.org - 1.4-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
java-sig-commits@lists.fedoraproject.org