[Git][java-team/annotation-indexer][master] 16 commits: Standards-Version updated to 4.1.4
Emmanuel Bourg
gitlab at salsa.debian.org
Wed Jun 6 14:10:19 BST 2018
Emmanuel Bourg pushed to branch master at Debian Java Maintainers / annotation-indexer
Commits:
83b894f5 by Emmanuel Bourg at 2018-06-06T14:18:52+02:00
Standards-Version updated to 4.1.4
- - - - -
a74909f0 by Emmanuel Bourg at 2018-06-06T14:18:58+02:00
Switch to debhelper level 11
- - - - -
3d99ed03 by Emmanuel Bourg at 2018-06-06T14:19:05+02:00
Use salsa.debian.org Vcs-* URLs
- - - - -
cb09e731 by Emmanuel Bourg at 2018-06-06T14:20:04+02:00
Build with the DH sequencer instead of CDBS
- - - - -
8bfbf0c1 by Emmanuel Bourg at 2018-06-06T14:21:04+02:00
Wrap and sort
- - - - -
4a3ffd2b by Emmanuel Bourg at 2018-06-06T14:33:24+02:00
Removed debian/orig-tar.sh
- - - - -
791cfe19 by Emmanuel Bourg at 2018-06-06T14:36:14+02:00
New upstream version 1.10
- - - - -
a613ba41 by Emmanuel Bourg at 2018-06-06T14:36:14+02:00
Update upstream source from tag 'upstream/1.10'
Update to upstream version '1.10'
with Debian dir 7e99e0f6b2e36b405f4430fe2ce750ef8f136e2e
- - - - -
55071460 by Emmanuel Bourg at 2018-06-06T14:36:56+02:00
New upstream version 1.11
- - - - -
736155d1 by Emmanuel Bourg at 2018-06-06T14:36:57+02:00
Update upstream source from tag 'upstream/1.11'
Update to upstream version '1.11'
with Debian dir 7e99e0f6b2e36b405f4430fe2ce750ef8f136e2e
- - - - -
33090e53 by Emmanuel Bourg at 2018-06-06T14:38:10+02:00
New upstream version 1.12
- - - - -
6cc57586 by Emmanuel Bourg at 2018-06-06T14:38:10+02:00
Update upstream source from tag 'upstream/1.12'
Update to upstream version '1.12'
with Debian dir 7e99e0f6b2e36b405f4430fe2ce750ef8f136e2e
- - - - -
938b3c78 by Emmanuel Bourg at 2018-06-06T14:47:59+02:00
New upstream release (1.12)
- - - - -
6d633cec by Emmanuel Bourg at 2018-06-06T14:48:47+02:00
Use secure URLs
- - - - -
fcbdb504 by Emmanuel Bourg at 2018-06-06T14:49:20+02:00
Removed the build dependency on libmaven-enforcer-plugin-java
- - - - -
9babca3b by Emmanuel Bourg at 2018-06-06T15:04:18+02:00
Upload to unstable
- - - - -
14 changed files:
- .gitignore
- debian/changelog
- debian/compat
- debian/control
- debian/copyright
- debian/libannotation-indexer-java-doc.install
- − debian/orig-tar.sh
- debian/rules
- debian/watch
- pom.xml
- src/main/java/org/jvnet/hudson/annotation_indexer/AnnotationProcessorImpl.java
- src/main/java/org/jvnet/hudson/annotation_indexer/Index.java
- src/test/java/org/jvnet/hudson/annotation_indexer/AnnotationProcessorImplTest.java
- src/test/java/org/jvnet/hudson/annotation_indexer/Utils.java
Changes:
=====================================
.gitignore
=====================================
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,3 @@
/target/
+.idea/
+*.iml
=====================================
debian/changelog
=====================================
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,16 @@
+annotation-indexer (1.12-1) unstable; urgency=medium
+
+ * Team upload.
+ * New upstream release
+ * Build with the DH sequencer instead of CDBS
+ * Removed the build dependency on libmaven-enforcer-plugin-java
+ * Standards-Version updated to 4.1.4
+ * Switch to debhelper level 11
+ * Use salsa.debian.org Vcs-* URLs
+ * Removed debian/orig-tar.sh
+
+ -- Emmanuel Bourg <ebourg at apache.org> Wed, 06 Jun 2018 15:03:54 +0200
+
annotation-indexer (1.9-1) unstable; urgency=medium
* Team upload.
@@ -38,6 +51,6 @@ annotation-indexer (1.2-1) unstable; urgency=low
annotation-indexer (1.2-0ubuntu1) oneiric; urgency=low
- * Initial release
+ * Initial release
-- James Page <james.page at canonical.com> Wed, 08 Jun 2011 15:49:59 +0100
=====================================
debian/compat
=====================================
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-9
+11
=====================================
debian/control
=====================================
--- a/debian/control
+++ b/debian/control
@@ -3,19 +3,20 @@ Section: java
Priority: optional
Maintainer: Debian Java Maintainers <pkg-java-maintainers at lists.alioth.debian.org>
Uploaders: James Page <james.page at ubuntu.com>
-Build-Depends: cdbs, debhelper (>= 9), default-jdk, maven-debian-helper
-Build-Depends-Indep:
+Build-Depends:
+ debhelper (>= 11),
+ default-jdk,
default-jdk-doc,
junit4,
libmaven-compiler-plugin-java,
- libmaven-enforcer-plugin-java,
libmaven-javadoc-plugin-java,
libmetainf-services-java,
- libmetainf-services-java-doc
-Standards-Version: 3.9.5
-Vcs-Git: git://anonscm.debian.org/pkg-java/annotation-indexer.git
-Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-java/annotation-indexer.git
-Homepage: http://github.com/jenkinsci/lib-annotation-indexer
+ libmetainf-services-java-doc,
+ maven-debian-helper
+Standards-Version: 4.1.4
+Vcs-Git: https://salsa.debian.org/java-team/annotation-indexer.git
+Vcs-Browser: https://salsa.debian.org/java-team/annotation-indexer
+Homepage: https://github.com/jenkinsci/lib-annotation-indexer
Package: libannotation-indexer-java
Architecture: all
=====================================
debian/copyright
=====================================
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,4 +1,4 @@
-Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0
Upstream-Name: annotation-indexer for jenkins
Source: https://github.com/jenkinsci/lib-annotation-indexer
=====================================
debian/libannotation-indexer-java-doc.install
=====================================
--- a/debian/libannotation-indexer-java-doc.install
+++ b/debian/libannotation-indexer-java-doc.install
@@ -1,2 +1 @@
-
target/apidocs/* usr/share/doc/libannotation-indexer-java/api
=====================================
debian/orig-tar.sh deleted
=====================================
--- a/debian/orig-tar.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh -e
-
-VERSION=$2
-TAR=../annotation-indexer_$VERSION.orig.tar.xz
-DIR=annotation-indexer-$VERSION
-mkdir -p $DIR
-
-# Expand the upstream tarball
-tar -xzf ../$3 -C $DIR --strip-components=1
-rm ../$3
-# Repack excluding stuff we don't need
-XZ_OPT=--best tar -v -c -J -f $TAR \
- --exclude '*.jar' \
- --exclude '*.class' \
- --exclude 'CVS' \
- --exclude '.svn' \
- $DIR
-rm -rf $DIR
=====================================
debian/rules
=====================================
--- a/debian/rules
+++ b/debian/rules
@@ -1,9 +1,4 @@
#!/usr/bin/make -f
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/maven.mk
-
-JAVA_HOME := /usr/lib/jvm/default-java
-
-get-orig-source:
- uscan --download-version $(DEB_UPSTREAM_VERSION) --force-download --rename
+%:
+ dh $@
=====================================
debian/watch
=====================================
--- a/debian/watch
+++ b/debian/watch
@@ -1,3 +1,3 @@
-version=3
-opts=dversionmangle=s/\.dfsg// \
-http://githubredir.debian.net/github/jenkinsci/lib-annotation-indexer/ annotation-indexer-(.+).tar.gz debian debian/orig-tar.sh
+version=4
+opts="repack,compression=xz,dversionmangle=s/\.dfsg//" \
+https://github.com/jenkinsci/lib-annotation-indexer/tags .*/annotation-indexer-(.+).tar.gz
=====================================
pom.xml
=====================================
--- a/pom.xml
+++ b/pom.xml
@@ -4,12 +4,13 @@
<parent>
<groupId>org.jenkins-ci</groupId>
<artifactId>jenkins</artifactId>
- <version>1.32</version>
+ <version>1.37</version>
+ <relativePath />
</parent>
<artifactId>annotation-indexer</artifactId>
<name>Annotation Indexer</name>
- <version>1.9</version>
+ <version>1.12</version>
<description>
Creates index of annotations.
</description>
@@ -18,7 +19,7 @@
<dependency>
<groupId>org.kohsuke.metainf-services</groupId>
<artifactId>metainf-services</artifactId>
- <version>1.5</version>
+ <version>1.7</version>
<optional>true</optional>
</dependency>
<dependency>
@@ -38,6 +39,7 @@
<scm>
<connection>scm:git:git://github.com/jenkinsci/lib-${project.artifactId}.git</connection>
<developerConnection>scm:git:git at github.com:jenkinsci/lib-${project.artifactId}.git</developerConnection>
+ <tag>annotation-indexer-1.12</tag>
</scm>
<licenses>
=====================================
src/main/java/org/jvnet/hudson/annotation_indexer/AnnotationProcessorImpl.java
=====================================
--- a/src/main/java/org/jvnet/hudson/annotation_indexer/AnnotationProcessorImpl.java
+++ b/src/main/java/org/jvnet/hudson/annotation_indexer/AnnotationProcessorImpl.java
@@ -6,8 +6,7 @@ import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.Processor;
import javax.annotation.processing.RoundEnvironment;
import javax.annotation.processing.SupportedAnnotationTypes;
-import javax.annotation.processing.SupportedSourceVersion;
-import static javax.lang.model.SourceVersion.RELEASE_6;
+import javax.lang.model.SourceVersion;
import javax.lang.model.element.AnnotationMirror;
import javax.lang.model.element.Element;
import javax.lang.model.element.TypeElement;
@@ -35,7 +34,6 @@ import java.util.TreeSet;
*
* @author Kohsuke Kawaguchi
*/
- at SupportedSourceVersion(RELEASE_6)
@SupportedAnnotationTypes("*")
@SuppressWarnings({"Since15"})
@MetaInfServices(Processor.class)
@@ -111,6 +109,8 @@ public class AnnotationProcessorImpl extends AbstractProcessor {
}
} catch (FileNotFoundException x) {
// OK, created for the first time
+ } catch (java.nio.file.NoSuchFileException x) {
+ // OK, created for the first time
}
return elements;
}
@@ -141,12 +141,18 @@ public class AnnotationProcessorImpl extends AbstractProcessor {
@Override
public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
if (roundEnv.processingOver() || roundEnv.errorRaised())
+ // TODO we should not write until processingOver
return false;
execute(annotations, roundEnv);
return false;
}
+ @Override
+ public SourceVersion getSupportedSourceVersion() {
+ return SourceVersion.latest();
+ }
+
protected void execute(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
// map from indexable annotation names, to actual uses
Map<String,Use> output = new HashMap<String,Use>();
=====================================
src/main/java/org/jvnet/hudson/annotation_indexer/Index.java
=====================================
--- a/src/main/java/org/jvnet/hudson/annotation_indexer/Index.java
+++ b/src/main/java/org/jvnet/hudson/annotation_indexer/Index.java
@@ -107,6 +107,8 @@ public class Index {
LOGGER.log(Level.FINE, "Failed to load: "+name,e);
} catch (LinkageError x) {
LOGGER.log(Level.WARNING, "Failed to load " + name, x);
+ } catch (RuntimeException x) {
+ LOGGER.log(Level.WARNING, "Failed to load " + name, x);
}
}
}
=====================================
src/test/java/org/jvnet/hudson/annotation_indexer/AnnotationProcessorImplTest.java
=====================================
--- a/src/test/java/org/jvnet/hudson/annotation_indexer/AnnotationProcessorImplTest.java
+++ b/src/test/java/org/jvnet/hudson/annotation_indexer/AnnotationProcessorImplTest.java
@@ -27,8 +27,8 @@ public class AnnotationProcessorImplTest {
addLine("package some.pkg;").
addLine("@some.api.A public class Stuff {}");
compilation.doCompile(null, "-source", "6");
- assertEquals(Collections.emptyList(), Utils.filterSupportedSourceVersionWarnings(compilation.getDiagnostics()));
- assertEquals("some.pkg.Stuff\n", Utils.getGeneratedResource(compilation, "META-INF/annotations/some.api.A"));
+ assertEquals(Collections.emptyList(), Utils.filterObsoleteSourceVersionWarnings(compilation.getDiagnostics()));
+ assertEquals("some.pkg.Stuff" + System.getProperty("line.separator"), Utils.getGeneratedResource(compilation, "META-INF/annotations/some.api.A"));
}
@Indexed @Retention(RetentionPolicy.RUNTIME) public @interface A {}
@@ -38,8 +38,8 @@ public class AnnotationProcessorImplTest {
addLine("package some.pkg;").
addLine("@" + A.class.getCanonicalName() + " public class Stuff {}");
compilation.doCompile(null, "-source", "6");
- assertEquals(Collections.emptyList(), Utils.filterSupportedSourceVersionWarnings(compilation.getDiagnostics()));
- assertEquals("some.pkg.Stuff\n", Utils.getGeneratedResource(compilation, "META-INF/annotations/" + A.class.getName()));
+ assertEquals(Collections.emptyList(), Utils.filterObsoleteSourceVersionWarnings(compilation.getDiagnostics()));
+ assertEquals("some.pkg.Stuff" + System.getProperty("line.separator"), Utils.getGeneratedResource(compilation, "META-INF/annotations/" + A.class.getName()));
}
@Test public void incremental() {
@@ -48,15 +48,15 @@ public class AnnotationProcessorImplTest {
addLine("package some.pkg;").
addLine("@" + A.class.getCanonicalName() + " public class Stuff {}");
compilation.doCompile(null, "-source", "6");
- assertEquals(Collections.emptyList(), Utils.filterSupportedSourceVersionWarnings(compilation.getDiagnostics()));
- assertEquals("some.pkg.Stuff\n", Utils.getGeneratedResource(compilation, "META-INF/annotations/" + A.class.getName()));
+ assertEquals(Collections.emptyList(), Utils.filterObsoleteSourceVersionWarnings(compilation.getDiagnostics()));
+ assertEquals("some.pkg.Stuff" + System.getProperty("line.separator"), Utils.getGeneratedResource(compilation, "META-INF/annotations/" + A.class.getName()));
compilation = new Compilation(compilation);
compilation.addSource("some.pkg.MoreStuff").
addLine("package some.pkg;").
addLine("@" + A.class.getCanonicalName() + " public class MoreStuff {}");
compilation.doCompile(null, "-source", "6");
- assertEquals(Collections.emptyList(), Utils.filterSupportedSourceVersionWarnings(compilation.getDiagnostics()));
- assertEquals("some.pkg.MoreStuff\nsome.pkg.Stuff\n", Utils.getGeneratedResource(compilation, "META-INF/annotations/" + A.class.getName()));
+ assertEquals(Collections.emptyList(), Utils.filterObsoleteSourceVersionWarnings(compilation.getDiagnostics()));
+ assertEquals("some.pkg.MoreStuff" + System.getProperty("line.separator") + "some.pkg.Stuff" + System.getProperty("line.separator"), Utils.getGeneratedResource(compilation, "META-INF/annotations/" + A.class.getName()));
}
@Indexed @Retention(RetentionPolicy.RUNTIME) @Inherited public @interface B {}
@@ -67,7 +67,7 @@ public class AnnotationProcessorImplTest {
addLine("package some.pkg;").
addLine("public class Stuff extends " + Super.class.getCanonicalName() + " {}");
compilation.doCompile(null, "-source", "6");
- assertEquals(Collections.emptyList(), Utils.filterSupportedSourceVersionWarnings(compilation.getDiagnostics()));
+ assertEquals(Collections.emptyList(), Utils.filterObsoleteSourceVersionWarnings(compilation.getDiagnostics()));
/* XXX #7188605 currently broken on JDK 6; perhaps need to use a ElementScanner6 on roundEnv.rootElements whose visitType checks for annotations
assertEquals("some.pkg.Stuff\n", Utils.getGeneratedResource(compilation, "META-INF/annotations/" + B.class.getName()));
*/
=====================================
src/test/java/org/jvnet/hudson/annotation_indexer/Utils.java
=====================================
--- a/src/test/java/org/jvnet/hudson/annotation_indexer/Utils.java
+++ b/src/test/java/org/jvnet/hudson/annotation_indexer/Utils.java
@@ -5,6 +5,7 @@ import java.io.IOException;
import java.io.StringReader;
import java.lang.reflect.Field;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import java.util.Properties;
@@ -20,21 +21,30 @@ import net.java.dev.hickory.testing.Compilation;
// XXX partial copy of class from Stapler; should be pushed up into Hickory ASAP
class Utils {
- /**
- * Filter out warnings about {@link SupportedSourceVersion}.
- * {@code metainf-services-1.1.jar} produces {@code warning: No SupportedSourceVersion annotation found on org.kohsuke.metainf_services.AnnotationProcessorImpl, returning RELEASE_6.} which is irrelevant to us.
- * (Development versions have already fixed this; when released and used here, delete this method.)
- */
- public static List<Diagnostic<? extends JavaFileObject>> filterSupportedSourceVersionWarnings(List<Diagnostic<? extends JavaFileObject>> diagnostics) {
+ // Filter out warnings about source 1.6 is obsolete in java 9
+ // This usually appears with other warnings
+ public static final List<String> IGNORE = Arrays.asList(
+ "source value 1.6 is obsolete and will be removed in a future release", // Filter out warnings about source 1.6 is obsolete in java 9
+ "To suppress warnings about obsolete options" // This usually appears with other warnings
+ );
+
+ public static List<Diagnostic<? extends JavaFileObject>> filterObsoleteSourceVersionWarnings(List<Diagnostic<? extends JavaFileObject>> diagnostics) {
List<Diagnostic<? extends JavaFileObject>> r = new ArrayList<Diagnostic<? extends JavaFileObject>>();
for (Diagnostic<? extends JavaFileObject> d : diagnostics) {
- if (!d.getMessage(Locale.ENGLISH).contains("SupportedSourceVersion")) {
+ if (!isIgnored(d.getMessage(Locale.ENGLISH))) {
r.add(d);
}
}
return r;
}
+ private static boolean isIgnored(String message) {
+ for (String i : IGNORE) {
+ if (message.contains(i)) return true;
+ }
+ return false;
+ }
+
private static JavaFileManager fileManager(Compilation compilation) {
try {
Field f = Compilation.class.getDeclaredField("jfm");
View it on GitLab: https://salsa.debian.org/java-team/annotation-indexer/compare/902df11835c455facc8002d0de0de0bf19516baf...9babca3b50a179a2f29c8bacf1f9bf9068363ddd
--
View it on GitLab: https://salsa.debian.org/java-team/annotation-indexer/compare/902df11835c455facc8002d0de0de0bf19516baf...9babca3b50a179a2f29c8bacf1f9bf9068363ddd
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20180606/c94d9a0f/attachment.html>
More information about the pkg-java-commits
mailing list