debian/0000775000000000000000000000000012247132705007173 5ustar debian/maven.cleanIgnoreRules0000664000000000000000000000151712247131171013464 0ustar # Maven ignore rules - ignore some Maven dependencies and plugins # Format of this file is: # [group] [artifact] [type] [version] [classifier] [scope] # where each element can be either # - the exact string, for example org.apache for the group, or 3.1 # for the version. In this case, the element is simply matched # and left as it is # - * (the star character, alone). In this case, anything will # match and be left as it is. For example, using * on the # position of the artifact field will match any artifact id # All elements much match before a rule can be applied # Example rule: match jar with groupid= junit, artifactid= junit # and version starting with 3., this dependency is then removed # from the POM # junit junit jar s/3\\..*/3.x/ org.apache.maven.plugins maven-idea-plugin * * * * org.jvnet.wagon-svn wagon-svn * * * * debian/changelog0000664000000000000000000000365612247132616011060 0ustar maven-stapler-plugin (1.16-5) unstable; urgency=low * Team upload. * Use the maven-compiler-plugin 2.5.1 (Closes: #730886) * debian/control: - Build depend directly on libplexus-compiler-java - Changed the Homepage field to point to the Github project - Updated Standards-Version to 3.9.5 (no changes) - Removed the deprecated DM-Upload-Allowed field - Use canonical URLs for the Vcs-* fields * Marked the Java 7 compatibility patch as forwarded upstream * Switch to debhelper level 9 -- Emmanuel Bourg Mon, 02 Dec 2013 17:29:57 +0100 maven-stapler-plugin (1.16-4) unstable; urgency=low * Fix FTBFS with openjdk-7 (LP: #888980): - d/patches/java7-compat.patch: Add profile to pickup tools.jar for OpenJDK7. * Bumped Standards-Version to 3.9.3: - d/copyright: Reference released version of DEP-5. -- James Page Wed, 20 Jun 2012 19:34:31 +0100 maven-stapler-plugin (1.16-3) unstable; urgency=low * d/control: Fixup missing runtime dependencies due to failure in automatic detection using maven-debian-helper. -- James Page Wed, 08 Feb 2012 13:33:38 +0000 maven-stapler-plugin (1.16-2) unstable; urgency=low [James Page] * d/patches/stapler-compat.patch: Exclude Java 6 annotation processors from build and jar files to avoid annotation processing conflict with libstapler-java >= 1.169. [tony mancill] * Set DMUA flag. -- James Page Tue, 24 Jan 2012 14:17:15 +0000 maven-stapler-plugin (1.16-1) unstable; urgency=low * Initial Debian release (Closes: #631961) * New upstream release * d/copyright: Updated with new copyright/licensing information. -- James Page Wed, 26 Oct 2011 17:11:45 +0100 maven-stapler-plugin (1.15-0ubuntu1) oneiric; urgency=low * Initial release -- James Page Tue, 28 Jun 2011 17:35:14 +0100 debian/maven.publishedRules0000664000000000000000000000164212247131171013214 0ustar # Maven published rules - additional rules to publish, to help # the packaging work of Debian maintainers using mh_make # Format of this file is: # [group] [artifact] [type] [version] [classifier] [scope] # where each element can be either # - the exact string, for example org.apache for the group, or 3.1 # for the version. In this case, the element is simply matched # and left as it is # - * (the star character, alone). In this case, anything will # match and be left as it is. For example, using * on the # position of the artifact field will match any artifact id # - a regular expression of the form s/match/replace/ # in this case, elements that match are transformed using # the regex rule. # All elements much match before a rule can be applied # Example rule: match jar with groupid= junit, artifactid= junit # and version starting with 3., replacing the version with 3.x # junit junit jar s/3\\..*/3.x/ debian/maven.ignoreRules0000664000000000000000000000161512247131171012520 0ustar # Maven ignore rules - ignore some Maven dependencies and plugins # Format of this file is: # [group] [artifact] [type] [version] [classifier] [scope] # where each element can be either # - the exact string, for example org.apache for the group, or 3.1 # for the version. In this case, the element is simply matched # and left as it is # - * (the star character, alone). In this case, anything will # match and be left as it is. For example, using * on the # position of the artifact field will match any artifact id # All elements much match before a rule can be applied # Example rule: match jar with groupid= junit, artifactid= junit # and version starting with 3., this dependency is then removed # from the POM # junit junit jar s/3\\..*/3.x/ org.apache.maven.plugins maven-idea-plugin * * * * org.jvnet.wagon-svn wagon-svn * * * * org.jvnet.maven-jellydoc-plugin maven-jellydoc-plugin * * * * debian/libmaven-stapler-plugin-java.poms0000664000000000000000000000317212247130775015563 0ustar # List of POM files for the package # Format of this file is: # [option]* # where option can be: # --ignore: ignore this POM and its artifact if any # --ignore-pom: don't install the POM. To use on POM files that are created # temporarily for certain artifacts such as Javadoc jars. [mh_install, mh_installpoms] # --no-parent: remove the tag from the POM # --package=: an alternative package to use when installing this POM # and its artifact # --has-package-version: to indicate that the original version of the POM is the same as the upstream part # of the version for the package. # --keep-elements=: a list of XML elements to keep in the POM # during a clean operation with mh_cleanpom or mh_installpom # --artifact=: path to the build artifact associated with this POM, # it will be installed when using the command mh_install. [mh_install] # --java-lib: install the jar into /usr/share/java to comply with Debian # packaging guidelines # --usj-name=: name to use when installing the library in /usr/share/java # --usj-version=: version to use when installing the library in /usr/share/java # --no-usj-versionless: don't install the versionless link in /usr/share/java # --dest-jar=: the destination for the real jar. # It will be installed with mh_install. [mh_install] # --classifier=: Optional, the classifier for the jar. Empty by default. # --site-xml=: Optional, the location for site.xml if it needs to be installed. # Empty by default. [mh_install] # pom.xml --has-package-version debian/README.source0000664000000000000000000000140112246416527011354 0ustar Information about maven-stapler-plugin -------------------------------------- This package was debianized using the mh_make command from the maven-debian-helper package. The build system uses Maven but prevents it from downloading anything from the Internet, making the build compliant with the Debian policy. Notes about building this package --------------------------------- The resulting plugin depends on the maven-compiler plugin; this is correctly mapped to a specific version of the plugin during complication but maven-debian-helper does not find the plugin in the maven-repo during dependency resolution for the resulting .deb package. This does not break the build; the dependency has been added manually to the control file to work around this issue. debian/source/0000775000000000000000000000000012246416527010501 5ustar debian/source/format0000664000000000000000000000001412246416527011707 0ustar 3.0 (quilt) debian/libmaven-stapler-plugin-java-doc.install0000664000000000000000000000010112246416527017004 0ustar target/apidocs/* usr/share/doc/libmaven-stapler-plugin-java/api debian/copyright0000664000000000000000000000376312246416527011145 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0 Upstream-Name: Maven Stapler plugin Source: http://github.com/stapler/maven-stapler-plugin Files: * Copyright: 2004-2010, Kohsuke Kawaguchi License: BSD Files: src/main/java/org/kohsuke/stapler/AbstractCompilerMojo.java src/main/java/org/kohsuke/stapler/TestCompilerMojo.java src/main/java/org/kohsuke/stapler/CompilerMojo.java Copyright: 2001-2005 The Apache Software Foundation License: Apache-2.0 Files: debian/* Copyright: 2011, Canonical Ltd (http://www.canonical.com) License: Apache-2.0 License: Apache-2.0 On Debian GNU/Linux system you can find the complete text of the Apache-2.0 license in '/usr/share/common-licenses/Apache-2.0' License: BSD Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. debian/libmaven-stapler-plugin-java-doc.doc-base.api0000664000000000000000000000056312246416527017577 0ustar Document: libmaven-stapler-plugin-java Title: API Javadoc for Maven Stapler plugin Author: Maven Stapler plugin developers Abstract: This is the API Javadoc provided for the libmaven-stapler-plugin-java library. Section: Programming Format: HTML Index: /usr/share/doc/libmaven-stapler-plugin-java/api/index.html Files: /usr/share/doc/libmaven-stapler-plugin-java/api/* debian/watch0000664000000000000000000000024512246416527010233 0ustar version=3 opts=dversionmangle=s/\.dfsg//,uversionmangle=s/_/./ \ http://githubredir.debian.net/github/stapler/maven-stapler-plugin/ maven-stapler-plugin-(.*).tar.gz debian/maven.rules0000664000000000000000000000224612247131230011351 0ustar # Maven rules - transform Maven dependencies and plugins # Format of this file is: # [group] [artifact] [type] [version] [classifier] [scope] # where each element can be either # - the exact string, for example org.apache for the group, or 3.1 # for the version. In this case, the element is simply matched # and left as it is # - * (the star character, alone). In this case, anything will # match and be left as it is. For example, using * on the # position of the artifact field will match any artifact id # - a regular expression of the form s/match/replace/ # in this case, elements that match are transformed using # the regex rule. # All elements much match before a rule can be applied # Example rule: match jar with groupid= junit, artifactid= junit # and version starting with 3., replacing the version with 3.x # junit junit jar s/3\\..*/3.x/ commons-collections commons-collections * s/3\..*/3.x/ * * s/groovy/org.codehaus.groovy/ groovy * s/.*/debian/ * * asm * * s/2\..*/3.x/ * * s/qdox/com.thoughtworks.qdox/ * * s/.*/debian/ * * s/javax.servlet/javax.servlet.jsp/ jsp-api jar s/2\..*/2.1/ * * org.apache.maven.plugins maven-compiler-plugin * s/2\..*/2.5.1/ * * debian/maven.properties0000664000000000000000000000030312246416527012421 0ustar # Include here properties to pass to Maven during the build. # For example: # maven.test.skip=true maven.compiler.source=1.5 maven.compiler.target=1.5 maven.compiler.excludes=**/*Processor6.java debian/rules0000775000000000000000000000036012246416527010260 0ustar #!/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 debian/compat0000664000000000000000000000000212246416527010377 0ustar 9 debian/control0000664000000000000000000000411612246416527010606 0ustar Source: maven-stapler-plugin Section: java Priority: optional Maintainer: Debian Java Maintainers Uploaders: James Page Build-Depends: cdbs, debhelper (>= 9), default-jdk, maven-debian-helper Build-Depends-Indep: default-jdk-doc, libdom4j-java, libjaxen-java, libjellydoc-java, libmaven-javadoc-plugin-java, libmaven-plugin-tools-java, libmaven2-core-java, libmaven2-core-java-doc, libmetainf-services-java, libplexus-compiler-java, libplexus-utils-java (>= 1.5.15), libplexus-utils-java-doc, libqdox-java, libstapler-java, libstapler-java-doc Standards-Version: 3.9.5 Homepage: http://github.com/stapler/maven-stapler-plugin Vcs-Git: git://anonscm.debian.org/pkg-java/maven-stapler-plugin.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-java/maven-stapler-plugin.git Package: libmaven-stapler-plugin-java Architecture: all Depends: libdom4j-java, libjaxen-java, libjellydoc-java, libmaven-compiler-plugin-java, libmaven2-core-java, libmetainf-services-java, libplexus-compiler-java, ${maven:Depends}, ${misc:Depends} Recommends: ${maven:OptionalDepends} Suggests: libmaven-stapler-plugin-java-doc Description: Maven plugin for developing stapler applications Maven2 plugin for developing web applications using the Stapler HTTP request engine. Package: libmaven-stapler-plugin-java-doc Architecture: all Section: doc Depends: ${maven:DocDepends}, ${misc:Depends} Recommends: ${maven:DocOptionalDepends} Suggests: libmaven-stapler-plugin-java Description: Documentation for libmaven-stapler-plugin-java-doc Maven2 plugin for developing web applications using the Stapler HTTP request engine. . This package provides the API documentation for libmaven-stapler-plugin-java. debian/patches/0000775000000000000000000000000012246416527010630 5ustar debian/patches/series0000664000000000000000000000010512246416527012041 0ustar java7-compat.patch disable-taglibdoc-mojo.patch stapler-compat.patch debian/patches/disable-taglibdoc-mojo.patch0000664000000000000000000002620012246416527016144 0ustar Description: Disables the taglibdoc mojo which makes use of the maven-jellydoc-plugin which is not currently packageable in Debian Author: James Page Forwarded: not-needed Index: maven-stapler-plugin-debian/src/main/java/org/kohsuke/stapler/TaglibDocMojo.java =================================================================== --- maven-stapler-plugin-debian.orig/src/main/java/org/kohsuke/stapler/TaglibDocMojo.java 2011-10-26 17:06:45.376390983 +0100 +++ /dev/null 1970-01-01 00:00:00.000000000 +0000 @@ -1,316 +0,0 @@ -/* - * Copyright (c) 2004-2010, Kohsuke Kawaguchi - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modification, are permitted provided - * that the following conditions are met: - * - * * Redistributions of source code must retain the above copyright notice, this list of - * conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS - * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS - * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, - * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER - * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package org.kohsuke.stapler; - -import com.sun.xml.txw2.TXW; -import com.sun.xml.txw2.output.StreamSerializer; -import org.apache.commons.io.FileUtils; -import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.factory.ArtifactFactory; -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.apache.maven.artifact.resolver.ArtifactResolver; -import org.apache.maven.model.Resource; -import org.apache.maven.plugin.AbstractMojo; -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.plugin.MojoFailureException; -import org.apache.maven.project.MavenProject; -import org.apache.maven.project.MavenProjectHelper; -import org.apache.maven.reporting.MavenReport; -import org.apache.maven.reporting.MavenReportException; -import org.codehaus.doxia.sink.Sink; -import org.dom4j.Document; -import org.dom4j.DocumentException; -import org.dom4j.DocumentFactory; -import org.dom4j.Element; -import org.dom4j.io.SAXReader; -import org.jvnet.maven.jellydoc.Attribute; -import org.jvnet.maven.jellydoc.JellydocMojo; -import org.jvnet.maven.jellydoc.Library; -import org.jvnet.maven.jellydoc.Tag; -import org.jvnet.maven.jellydoc.Tags; - -import java.io.File; -import java.io.FileFilter; -import java.io.FileOutputStream; -import java.io.IOException; -import java.util.HashMap; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.regex.Pattern; - -/** - * Scans Jelly tag libraries from tag files, and generate taglib.xml - * compatible with maven-jellydoc-plugin - * - *

- * For productive debugging of this mojo, run "mvn site:run" with debugger. - * Every request will trigger a whole rendering, and you can do hot-swap of - * byte code for changes. - * - * @author Kohsuke Kawaguchi - * @goal jelly-taglibdoc - * @phase generate-sources - * @requiresDependencyResolution compile - */ -public class TaglibDocMojo extends AbstractMojo implements MavenReport { - /** - * The Maven Project Object - * - * @parameter expression="${project}" - * @required - * @readonly - */ - protected MavenProject project; - - /** - * The plugin dependencies. - * - * @parameter expression="${plugin.artifacts}" - * @required - * @readonly - */ - private List pluginArtifacts; - - /** - * Version of this plugin. - * - * @parameter expression="${plugin.version}" - * @required - * @readonly - */ - private String pluginVersion; - - /** - * Regular expression for taglib URIs. If specified, - * only those taglibs that match these patterns will be generated into - * documentation. - * - * @parameter expression="${patterns}" - */ - private String[] patterns = new String[]{".*"}; - - /** - * Factory for creating artifact objects - * - * @component - */ - private ArtifactFactory factory; - - /** - * Used for resolving artifacts - * - * @component - */ - private ArtifactResolver resolver; - - /** - * The local repository where the artifacts are located. - * - * @parameter expression="${localRepository}" - */ - private ArtifactRepository localRepository; - - /** - * @component - */ - private MavenProjectHelper helper; - - private JellydocMojo jellydoc; - - public void execute() throws MojoExecutionException, MojoFailureException { - writeTaglibXml(); - - getJellydocMojo().generateSchema(); - } - - private JellydocMojo getJellydocMojo() { - if(jellydoc==null) { - jellydoc = new JellydocMojo() { - @Override - public void execute() throws MojoExecutionException, MojoFailureException { - TaglibDocMojo.this.execute(); - } - }; - jellydoc.factory = factory; - jellydoc.helper = helper; - jellydoc.localRepository = localRepository; - jellydoc.project = project; - jellydoc.resolver = resolver; - } - return jellydoc; - } - - private void writeTaglibXml() throws MojoExecutionException { - try { - File taglibsXml = new File(project.getBasedir(), "target/taglib.xml"); - taglibsXml.getParentFile().mkdirs(); - Tags tags = TXW.create(Tags.class,new StreamSerializer(new FileOutputStream(taglibsXml))); - for(Resource res : (List)project.getResources()) - scanTagLibs(new File(res.getDirectory()),"",tags); - tags.commit(); - } catch (IOException e) { - throw new MojoExecutionException("Failed to generate taglibs.xml",e); - } - } - - /** - * Recurisely search for taglibs and call {@link #parseTagLib(File, String, Library)}. - */ - private void scanTagLibs(File dir, String uri, Tags tags) throws IOException { - if(new File(dir,"taglib").exists()) { - boolean match = patterns.length==0; - for (String p : patterns) { - if(Pattern.matches(p,uri)) { - match = true; - break; - } - } - if(match) - parseTagLib(dir,uri,tags.library()); - } - - // scan subdirs - File[] subdirs = dir.listFiles(new FileFilter() { - public boolean accept(File f) { - return f.isDirectory(); - } - }); - if(subdirs==null) return; - for (File subdir : subdirs) - scanTagLibs(subdir,uri+'/'+subdir.getName(), tags); - } - - private void parseTagLib(File dir, String uri, Library lib) throws IOException { - getLog().info("Processing "+dir); - - List markerFile = FileUtils.readLines(new File(dir, "taglib")); - if(markerFile.size()==0) - markerFile.add(uri); - - // write the attributes - lib.name(markerFile.get(0).toString()); - lib.prefix(uri.substring(uri.lastIndexOf('/')+1)).uri(uri); - // doc - lib.doc()._pcdata(join(markerFile)); - - File[] tagFiles = dir.listFiles(new FileFilter() { - public boolean accept(File f) { - return f.getName().endsWith(".jelly"); - } - }); - if(tagFiles==null) return; - for (File tagFile : tagFiles) - parseTagFile(tagFile,lib.tag()); - } - - /** - * Parses a given tag file and writes to {@link Tag}. - */ - private void parseTagFile(File tagFile, Tag tag) throws IOException { - try { - String name = tagFile.getName(); - name = name.substring(0,name.length()-6); // cut off ".jelly" - tag.name(name); - - DocumentFactory f = new DocumentFactory(); - f.setXPathNamespaceURIs(NAMESPACE_MAP); - Document jelly = new SAXReader(f).read(tagFile); - Element doc = (Element) jelly.selectSingleNode(".//s:documentation"); - - // does this tag have a body? - if(jelly.selectSingleNode("//d:invokeBody")==null) - tag.noContent(true); - - if(doc==null) { - tag.doc(""); - } else { - tag.doc(doc.getText()); - for(Element attr : (List)doc.selectNodes("s:attribute")) { - Attribute aw = tag.attribute(); - for (org.dom4j.Attribute a : (List)attr.attributes()) - aw._attribute(a.getName(),a.getValue()); - aw.doc(attr.getText()); - } - } - } catch (DocumentException e) { - IOException x = new IOException("Failed to parse " + tagFile); - x.initCause(e); - throw x; - } - } - - private String join(List list) { - StringBuilder buf = new StringBuilder(); - for (Object item : list) { - if(buf.length()>0) buf.append('\n'); - buf.append(item); - } - return buf.toString(); - } - -// -// MavenReport implementation -// - public void generate(Sink sink, Locale locale) throws MavenReportException { - getJellydocMojo().generate(sink,locale); - } - - public String getOutputName() { - return getJellydocMojo().getOutputName(); - } - - public String getName(Locale locale) { - return getJellydocMojo().getName(locale); - } - - public String getCategoryName() { - return getJellydocMojo().getCategoryName(); - } - - public String getDescription(Locale locale) { - return getJellydocMojo().getDescription(locale); - } - - public void setReportOutputDirectory(File outputDirectory) { - getJellydocMojo().setReportOutputDirectory(outputDirectory); - } - - public File getReportOutputDirectory() { - return getJellydocMojo().getReportOutputDirectory(); - } - - public boolean isExternalReport() { - return getJellydocMojo().isExternalReport(); - } - - public boolean canGenerateReport() { - return getJellydocMojo().canGenerateReport(); - } - - private static final Map NAMESPACE_MAP = new HashMap(); - static { - NAMESPACE_MAP.put("s", "jelly:stapler"); - NAMESPACE_MAP.put("d", "jelly:define"); - } -} debian/patches/stapler-compat.patch0000664000000000000000000003117012246416527014606 0ustar Description: Remove Java 6 annotation processors from stapler plugin as these are now provided by stapler core in stapler >= 1.169. Author: James Page Forwarded: no Index: maven-stapler-plugin/pom.xml =================================================================== --- maven-stapler-plugin.orig/pom.xml 2012-01-10 23:43:48.350334158 +0100 +++ maven-stapler-plugin/pom.xml 2012-01-11 00:02:17.087732693 +0100 @@ -75,7 +75,7 @@ org.kohsuke.stapler stapler - 1.100 + 1.174 org.apache.maven Index: maven-stapler-plugin/src/main/java/org/kohsuke/stapler/ConstructorProcessor6.java =================================================================== --- maven-stapler-plugin.orig/src/main/java/org/kohsuke/stapler/ConstructorProcessor6.java 2012-01-10 13:03:07.575215255 +0100 +++ /dev/null 1970-01-01 00:00:00.000000000 +0000 @@ -1,70 +0,0 @@ -package org.kohsuke.stapler; - -import org.kohsuke.MetaInfServices; - -import javax.annotation.processing.Processor; -import javax.annotation.processing.RoundEnvironment; -import javax.annotation.processing.SupportedAnnotationTypes; -import javax.annotation.processing.SupportedSourceVersion; -import javax.lang.model.SourceVersion; -import javax.lang.model.element.Element; -import javax.lang.model.element.ExecutableElement; -import javax.lang.model.element.TypeElement; -import javax.lang.model.element.VariableElement; -import javax.lang.model.util.ElementScanner6; -import java.io.IOException; -import java.util.Properties; -import java.util.Set; - -/** - * @author Kohsuke Kawaguchi - */ -@SuppressWarnings({"Since15"}) -@SupportedSourceVersion(SourceVersion.RELEASE_6) -@SupportedAnnotationTypes("*") -@MetaInfServices(Processor.class) -public class ConstructorProcessor6 extends AbstractProcessorImpl { - @Override - public boolean process(Set annotations, RoundEnvironment roundEnv) { - ElementScanner6 scanner = new ElementScanner6() { - @Override - public Void visitExecutable(ExecutableElement e, Void aVoid) { - if(e.getAnnotation(DataBoundConstructor.class)!=null) { - write(e); - } else { - String javadoc = getJavadoc(e); - if(javadoc!=null && javadoc.contains("@stapler-constructor")) { - write(e); - } - } - - return super.visitExecutable(e, aVoid); - } - }; - - for( Element e : roundEnv.getRootElements() ) - scanner.scan(e,null); - - return false; - } - - private void write(ExecutableElement c) { - try { - StringBuilder buf = new StringBuilder(); - for( VariableElement p : c.getParameters() ) { - if(buf.length()>0) buf.append(','); - buf.append(p.getSimpleName()); - } - - TypeElement t = (TypeElement) c.getEnclosingElement(); - String name = t.getQualifiedName().toString().replace('.', '/') + ".stapler"; - notice("Generating " + name, c); - - Properties p = new Properties(); - p.put("constructor",buf.toString()); - writePropertyFile(p, name); - } catch (IOException x) { - error(x.toString()); - } - } -} Index: maven-stapler-plugin/src/main/java/org/kohsuke/stapler/ExportedBeanAnnotationProcessor6.java =================================================================== --- maven-stapler-plugin.orig/src/main/java/org/kohsuke/stapler/ExportedBeanAnnotationProcessor6.java 2012-01-10 13:03:07.575215255 +0100 +++ /dev/null 1970-01-01 00:00:00.000000000 +0000 @@ -1,143 +0,0 @@ -package org.kohsuke.stapler; - -import com.google.common.collect.LinkedListMultimap; -import com.google.common.collect.Multimap; -import org.kohsuke.MetaInfServices; -import org.kohsuke.stapler.export.Exported; - -import javax.annotation.processing.Processor; -import javax.annotation.processing.RoundEnvironment; -import javax.annotation.processing.SupportedAnnotationTypes; -import javax.annotation.processing.SupportedSourceVersion; -import javax.lang.model.SourceVersion; -import javax.lang.model.element.Element; -import javax.lang.model.element.TypeElement; -import javax.tools.FileObject; -import java.io.BufferedReader; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; -import java.io.PrintWriter; -import java.util.Collection; -import java.util.Map.Entry; -import java.util.Properties; -import java.util.Set; -import java.util.TreeSet; - -/** - * @author Kohsuke Kawaguchi - */ -@SuppressWarnings({"Since15"}) -@SupportedSourceVersion(SourceVersion.RELEASE_6) -@SupportedAnnotationTypes("*") -@MetaInfServices(Processor.class) -public class ExportedBeanAnnotationProcessor6 extends AbstractProcessorImpl { - @Override - public boolean process(Set annotations, RoundEnvironment roundEnv) { - try { - if (roundEnv.processingOver()) { - return false; - } - - // collect all exposed properties - Multimap props = LinkedListMultimap.create(); - - for (Element exported : roundEnv.getElementsAnnotatedWith(Exported.class)) { - props.put((TypeElement)exported.getEnclosingElement(), exported); - } - - - Set exposedBeanNames = scanExisting(); - - for (Entry> e : props.asMap().entrySet()) { - exposedBeanNames.add(e.getKey().getQualifiedName().toString()); - - final Properties javadocs = new Properties(); - for (Element md : e.getValue()) { - switch (md.getKind()) { - case FIELD: - case METHOD: - String javadoc = getJavadoc(md); - if(javadoc!=null) - javadocs.put(md.getSimpleName().toString(), javadoc); - break; - default: - throw new AssertionError("Unexpected element type: "+md); - } - // TODO: possibly a proper method signature generation, but it's too tedious - // way too tedious. - //private String getSignature(MethodDeclaration m) { - // final StringBuilder buf = new StringBuilder(m.getSimpleName()); - // buf.append('('); - // boolean first=true; - // for (ParameterDeclaration p : m.getParameters()) { - // if(first) first = false; - // else buf.append(','); - // p.getType().accept(new SimpleTypeVisitor() { - // public void visitPrimitiveType(PrimitiveType pt) { - // buf.append(pt.getKind().toString().toLowerCase()); - // } - // public void visitDeclaredType(DeclaredType dt) { - // buf.append(dt.getDeclaration().getQualifiedName()); - // } - // - // public void visitArrayType(ArrayType at) { - // at.getComponentType().accept(this); - // buf.append("[]"); - // } - // - // public void visitTypeVariable(TypeVariable tv) { - // - // // TODO - // super.visitTypeVariable(typeVariable); - // } - // - // public void visitVoidType(VoidType voidType) { - // // TODO - // super.visitVoidType(voidType); - // } - // }); - // } - // buf.append(')'); - // // TODO - // return null; - //} - } - - String javadocFile = e.getKey().getQualifiedName().toString().replace('.', '/') + ".javadoc"; - notice("Generating "+ javadocFile, e.getKey()); - writePropertyFile(javadocs, javadocFile); - } - - FileObject beans = createResource(STAPLER_BEAN_FILE); - PrintWriter w = new PrintWriter(new OutputStreamWriter(beans.openOutputStream(),"UTF-8")); - for (String beanName : exposedBeanNames) - w.println(beanName); - w.close(); - - } catch (IOException x) { - error(x.toString()); - } - return false; - } - - private Set scanExisting() throws IOException { - Set exposedBeanNames = new TreeSet(); - - FileObject beans = getResource(STAPLER_BEAN_FILE); - try { - BufferedReader in = new BufferedReader(new InputStreamReader(beans.openInputStream(),"UTF-8")); - String line; - while((line=in.readLine())!=null) - exposedBeanNames.add(line.trim()); - in.close(); - } catch (FileNotFoundException e) { - // no existing file, which is fine - } - - return exposedBeanNames; - } - - private static final String STAPLER_BEAN_FILE = "META-INF/exposed.stapler-beans"; -} Index: maven-stapler-plugin/src/main/java/org/kohsuke/stapler/QueryParameterAnnotationProcessor6.java =================================================================== --- maven-stapler-plugin.orig/src/main/java/org/kohsuke/stapler/QueryParameterAnnotationProcessor6.java 2012-01-10 13:03:07.575215255 +0100 +++ /dev/null 1970-01-01 00:00:00.000000000 +0000 @@ -1,69 +0,0 @@ -package org.kohsuke.stapler; - -import org.apache.commons.io.IOUtils; -import org.kohsuke.MetaInfServices; - -import javax.annotation.processing.Processor; -import javax.annotation.processing.RoundEnvironment; -import javax.annotation.processing.SupportedAnnotationTypes; -import javax.annotation.processing.SupportedSourceVersion; -import javax.lang.model.SourceVersion; -import javax.lang.model.element.Element; -import javax.lang.model.element.ExecutableElement; -import javax.lang.model.element.TypeElement; -import javax.lang.model.element.VariableElement; -import javax.tools.FileObject; -import java.io.IOException; -import java.io.OutputStream; -import java.util.HashSet; -import java.util.Set; - -/** - * @author Kohsuke Kawaguchi - */ -@SuppressWarnings({"Since15"}) -@SupportedSourceVersion(SourceVersion.RELEASE_6) -@SupportedAnnotationTypes("*") -@MetaInfServices(Processor.class) -public class QueryParameterAnnotationProcessor6 extends AbstractProcessorImpl { - @Override - public boolean process(Set annotations, RoundEnvironment roundEnv) { - try { - Set params = roundEnv.getElementsAnnotatedWith(QueryParameter.class); - Set methods = new HashSet(); - - for (Element p : params) - methods.add((ExecutableElement)p.getEnclosingElement()); - - for (ExecutableElement m : methods) { - write(m); - } - } catch (IOException e) { - error(e.getMessage()); - } - return false; - } - - /** - * @param m - * Method whose parameter has {@link QueryParameter} - */ - private void write(ExecutableElement m) throws IOException { - StringBuffer buf = new StringBuffer(); - for( VariableElement p : m.getParameters() ) { - if(buf.length()>0) buf.append(','); - buf.append(p.getSimpleName()); - } - - TypeElement t = (TypeElement)m.getEnclosingElement(); - FileObject f = createResource(t.getQualifiedName().toString().replace('.', '/') + "/" + m.getSimpleName() + ".stapler"); - notice("Generating " + f, m); - - OutputStream os = f.openOutputStream(); - try { - IOUtils.write(buf, os, "UTF-8"); - } finally { - os.close(); - } - } -} debian/patches/java7-compat.patch0000664000000000000000000000221012246416527014135 0ustar Description: Add profile to pickup tools.jar file when vendor is Oracle Corporation - this ensure compatiblity with OpenJDK7 Author: James Page Bug: https://github.com/stapler/maven-stapler-plugin/pull/1 Index: maven-stapler-plugin/pom.xml =================================================================== --- maven-stapler-plugin.orig/pom.xml 2012-06-19 18:11:12.786411092 +0100 +++ maven-stapler-plugin/pom.xml 2012-06-20 19:34:21.778450559 +0100 @@ -170,5 +170,24 @@ + + + default-tools7.jar + + + java.vendor + Oracle Corporation + + + + + com.sun + tools + 1.7.0 + system + ${java.home}/../lib/tools.jar + + +