maven-repo-helper-1.8.5/0000755000000000000000000000000012247273474011755 5ustar maven-repo-helper-1.8.5/src/0000755000000000000000000000000012247273474012544 5ustar maven-repo-helper-1.8.5/src/main/0000755000000000000000000000000012247273474013470 5ustar maven-repo-helper-1.8.5/src/main/share/0000755000000000000000000000000012247273474014572 5ustar maven-repo-helper-1.8.5/src/main/share/jh_maven_repo_helper.pm0000644000000000000000000000071112247273474021302 0ustar #!/usr/bin/perl use warnings; use strict; use Debian::Debhelper::Dh_Lib; # To use with javahelper # dh $@ --with javahelper --with jh_mavenrepohelper insert_after("jh_depends", "mh_installpoms"); insert_after("mh_installpoms", "mh_linkjars"); add_command_options("mh_linkjars", "--skip-clean-poms"); insert_before("dh_clean", "mh_clean"); 1; maven-repo-helper-1.8.5/src/main/share/maven_repo_helper.pm0000644000000000000000000000046312247273474020625 0ustar #!/usr/bin/perl use warnings; use strict; use Debian::Debhelper::Dh_Lib; # dh $@ --with maven_repo_helper insert_before("dh_compress", "mh_install"); insert_before("dh_clean", "mh_clean"); 1; maven-repo-helper-1.8.5/src/main/share/mh_lib.sh0000644000000000000000000000555112247273474016366 0ustar # This is included by mh_* and contains common functions # # - argument parsing # - package selection # MH_VERSION=${MH_VERSION:-1.7.1} CLASSPATH=/usr/share/java/stax-api.jar:/usr/share/java/stax.jar:/usr/share/java/xml-apis.jar:/usr/share/java/maven-repo-helper.jar JAVA_OPTIONS="-Djavax.xml.stream.XMLOutputFactory=com.bea.xml.stream.XMLOutputFactoryBase -Djavax.xml.stream.XMLInputFactory=com.bea.xml.stream.MXParserFactory" parseargs() { # clean arguments from a previous run unset "${!opt_@}" ARGC=0 ARGV=() while [ -n "$1" ]; do if [ "-V" = "$1" ] || [ "--version" = "$1" ]; then echo "Maven Repo Helper version $MH_VERSION" exit 0 elif [ "-h" = "$1" ] || [ "--help" = "$1" ]; then syntax elif [ "-" = "${1:1:1}" ]; then # long opt optn=$(echo "$1" | sed -n 's/^--\([^=]*\)\(=.*\)*$/\1/p' | sed 's/-/_/g') if [ -z "$optn" ] || ! echo $ARGS | sed 's/-/_/g' | grep $optn >/dev/null; then echo "Invalid option: $optn" syntax fi optv=$(echo "$1" | sed -n 's/^[^=]*=\(.*\)$/\1/p') if [ -z "$optv" ]; then optv=true fi export -a opt_$optn eval opt_$optn'+=("$optv")' elif [ "-" = "${1:0:1}" ]; then # short opt optn="${1:1:1}" if [ "$optn" = "O" ]; then : # skip -O options passed by dh 7 elif [ -z "$optn" ] || ! echo $ARGS | sed 's/-/_/g' | grep $optn >/dev/null; then echo "Invalid option: $optn" syntax else optv="${1:2}" if [ -z "$optv" ]; then optv=true fi export -a opt_$optn eval opt_$optn'+=("$optv")' fi else # not-opt arg ARGV[$ARGC]="$1" ARGC=$(( $ARGC + 1 )) fi shift done export ARGC export ARGV } getarg() { while [ -n "$1" ]; do optn=$(echo "opt_$1" | sed 's/-/_/g') if [ -n "${!optn[0]}" ]; then echo ${!optn[0]} return fi shift done } getargs() { echo -n '(' while [ -n "$1" ]; do optn=$(echo "opt_$1" | sed 's/-/_/g') if [ -n "${!optn[0]}" ]; then echo -n '"${'$optn'[@]}" ' fi shift done echo ')' } findpackages() { if [ -n "$opt_p" ]; then echo $opt_p elif [ -n "$opt_package" ]; then echo $opt_package elif [ -n "$opt_i" ] || [ -n "$opt_indep" ]; then egrep '^(Package|Architecture)' debian/control | grep -B1 'Architecture: all'|sed -n '/^Package:/s/^[^:]*: *//p' elif [ -n "$opt_a" ] || [ -n "$opt_arch" ]; then egrep '^(Package|Architecture)' debian/control | grep -v 'Architecture: all' | grep -B1 Architecture|sed -n '/^Package:/s/^[^:]*: *//p' else sed -n '/^Package:/s/^[^:]*: *//p' debian/control fi } firstpackage() { findpackages | head -n1 } maven-repo-helper-1.8.5/src/main/resources/0000755000000000000000000000000012247273474015502 5ustar maven-repo-helper-1.8.5/src/main/resources/META-INF/0000755000000000000000000000000012247273474016642 5ustar maven-repo-helper-1.8.5/src/main/resources/META-INF/MANIFEST.MF0000644000000000000000000000005712247273474020276 0ustar Manifest-Version: 1.0 Class-Path: stax.jar maven-repo-helper-1.8.5/src/main/java/0000755000000000000000000000000012247273474014411 5ustar maven-repo-helper-1.8.5/src/main/java/org/0000755000000000000000000000000012247273474015200 5ustar maven-repo-helper-1.8.5/src/main/java/org/debian/0000755000000000000000000000000012247273474016422 5ustar maven-repo-helper-1.8.5/src/main/java/org/debian/maven/0000755000000000000000000000000012247273474017530 5ustar maven-repo-helper-1.8.5/src/main/java/org/debian/maven/repo/0000755000000000000000000000000012247273474020475 5ustar maven-repo-helper-1.8.5/src/main/java/org/debian/maven/repo/RepositoryReportHTMLWriter.java0000644000000000000000000000410712247273474026577 0ustar /* * Copyright 2011 Damien Raude-Morvan. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.debian.maven.repo; /** * @author Damien Raude-Morvan */ public class RepositoryReportHTMLWriter implements RepositoryReportWriter { /** * Current level of item */ private int itemLevel = 1; public void printSectionStart(String string) { String display = string + ":"; System.out.println("

"); System.out.println(display); System.out.println("

"); System.out.println(""); } public void printItem(String string) { if (itemLevel > 1) { System.out.print(""); } } public void printStart() { System.out.println(""); System.out.println("
"); System.out.println("Debian Maven repository QA"); System.out.println(""); System.out.println("
"); System.out.println(""); System.out.println("

Debian Maven repository QA

"); } public void printEnd() { System.out.println(""); System.out.println(""); } } maven-repo-helper-1.8.5/src/main/java/org/debian/maven/repo/ListOfPOMs.java0000644000000000000000000004142512247273474023305 0ustar /* * Copyright 2009 Ludovic Claude. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.debian.maven.repo; import java.io.*; import java.util.*; import java.util.logging.Level; import java.util.logging.Logger; /** * List of POM files used in the package. * * @author Ludovic Claude */ public class ListOfPOMs { private static final Logger log = Logger.getLogger(ListOfPOMs.class.getName()); private boolean verbose; /** The base directory */ private File baseDir = new File("."); /** The debian/<package>.poms file listing the pom files used in the package and their options */ private File poms; /** The options associated with each pom file. The pom file is specified as a path relative to the base directory */ private Map pomOptions; public ListOfPOMs() { } public ListOfPOMs(File poms) { this.poms = poms; } public void setVerbose(boolean verbose) { this.verbose = verbose; } public void setBaseDir(File baseDir) { this.baseDir = baseDir; } public void setListOfPOMsFile(File poms) { this.poms = poms; } /** * Returns the path of the first pom file defined. * * @return the path of the first pom, or null if not found */ public String getFirstPOM() { if (pomOptions == null) { readPomsFile(); } if (!pomOptions.isEmpty()) { return pomOptions.keySet().iterator().next(); } return null; } /** * Process the pom files with the specified handler. */ public void foreachPoms(POMHandler handler) { if (pomOptions == null) { readPomsFile(); } // process the ignored pom files for (String pomPath: pomOptions.keySet()) { POMOptions options = getPOMOptions(pomPath); if (options.isIgnore()) { File pom = new File(baseDir, pomPath); try { handler.ignorePOM(pom); } catch (Exception e) { log.log(Level.SEVERE, "An error occured when processing the ignored pom file " + pom, e); } } } // process the included pom files for (String pomPath: pomOptions.keySet()) { POMOptions options = getPOMOptions(pomPath); if (!options.isIgnore()) { File pom = new File(baseDir, pomPath); try { handler.handlePOM(pom, options.isNoParent(), options.getHasPackageVersion()); } catch (Exception e) { log.log(Level.SEVERE, "An error occured when processing the pom file " + pom, e); } } } } /** * Returns the options associated to the specified pom file, or null if none exist. */ public POMOptions getPOMOptions(File pom) { String pomRelPath = relativePath(pom); return getPOMOptions(pomRelPath); } /** * Returns the path of the specified file relatively to the base directory. */ private String relativePath(File pom) { return pom.getAbsolutePath().substring(baseDir.getAbsolutePath().length() + 1); } /** * Returns the options associated to the specified pom file, or null if none exist. */ public POMOptions getPOMOptions(String pomPath) { return getPomOptions().get(pomPath); } /** * Returns the options associated to the specified pom file. * The file is added to the list if not already present. */ public POMOptions getOrCreatePOMOptions(File pom) { String pomRelPath = relativePath(pom); return getOrCreatePOMOptions(pomRelPath); } /** * Returns the options associated to the specified pom file. * The file is added to the list if not already present. */ public POMOptions getOrCreatePOMOptions(String pomPath) { POMOptions options = getPOMOptions(pomPath); if (options == null) { options = addPOM(pomPath); } return options; } public Map getPomOptions() { if (pomOptions == null) { readPomsFile(); } return pomOptions; } /** * Add a pom file to the list. * * @param pom the pom file to add * @return the default options associated to the pom */ public POMOptions addPOM(File pom) { String pomRelPath = relativePath(pom); return addPOM(pomRelPath); } /** * Add a pom file to the list. * * @param pomPath the path of the pom to add * @return the default options associated to the pom */ public POMOptions addPOM(String pomPath) { if (pomOptions == null) { readPomsFile(); } POMOptions options = new POMOptions(); pomOptions.put(pomPath, options); return options; } /** * Tells if this list of poms contains the specified pom file. */ public boolean contains(File pomFile) { return pomFile.getAbsolutePath().startsWith(baseDir.getAbsolutePath()) && getPOMOptions(pomFile) != null; } /** * Parses the file containing the list of pom files. */ private void readPomsFile() { if (pomOptions == null) { pomOptions = new LinkedHashMap(); } if (poms == null || !poms.exists()) { return; } try { if (verbose) { System.out.println("Read list of poms from " + poms.getAbsolutePath()); } BufferedReader reader = new BufferedReader(new FileReader(poms)); String line; while ((line = reader.readLine()) != null) { line = line.trim(); StringTokenizer st = new StringTokenizer(line, " \t"); if (!st.hasMoreTokens() || line.startsWith("#")) { continue; } String pomPath = st.nextToken(); POMOptions options = addPOM(pomPath); // parse the options while (st.hasMoreTokens()) { String option = st.nextToken().trim(); if ("--ignore".equals(option)) { options.setIgnore(true); break; } else if ("--no-parent".equals(option)) { options.setNoParent(true); } else if (option.startsWith("--package=")) { options.setDestPackage(option.substring("--package=".length())); } else if ("--has-package-version".equals(option)) { options.setHasPackageVersion(true); } else if (option.startsWith("--keep-elements=")) { options.setKeepElements(option.substring("--keep-elements=".length())); } else if (option.startsWith("--artifact=")) { options.setArtifact(option.substring("--artifact=".length())); } else if ("--java-lib".equals(option)) { options.setJavaLib(true); } else if (option.startsWith("--usj-name=")) { options.setUsjName(option.substring("--usj-name=".length())); } else if (option.startsWith("--usj-version=")) { options.setUsjVersion(option.substring("--usj-version=".length())); } else if ("--no-usj-versionless".equals(option)) { options.setNoUsjVersionless(true); } else if (option.startsWith("--dest-jar=")) { options.setDestJar(option.substring("--dest-jar=".length())); } else if (option.startsWith("--classifier=")) { options.setClassifier(option.substring("--classifier=".length())); } else if (option.startsWith("--site-xml=")) { options.setSiteXml(option.substring("--site-xml=".length())); } else if ("--ignore-pom".equals(option)) { options.setIgnorePOM(true); } } if (verbose) { System.out.println(pomPath + options); } } reader.close(); } catch (IOException e) { log.log(Level.SEVERE, "Unable to read the list of poms from " + poms, e); } } /** * Writes the file containing the list of pom files. */ public void save() { if (poms != null) { try { if (pomOptions == null) { readPomsFile(); } PrintWriter out = new PrintWriter(new FileWriter(poms)); out.println("# List of POM files for the package"); out.println("# Format of this file is:"); out.println("# [option]*"); out.println("# where option can be:"); out.println("# --ignore: ignore this POM and its artifact if any"); out.println("# --ignore-pom: don't install the POM. To use on POM files that are created"); out.println("# temporarily for certain artifacts such as Javadoc jars. [mh_install, mh_installpoms]"); out.println("# --no-parent: remove the tag from the POM"); out.println("# --package=: an alternative package to use when installing this POM"); out.println("# and its artifact"); out.println("# --has-package-version: to indicate that the original version of the POM is the same as the upstream part"); out.println("# of the version for the package."); out.println("# --keep-elements=: a list of XML elements to keep in the POM"); out.println("# during a clean operation with mh_cleanpom or mh_installpom"); out.println("# --artifact=: path to the build artifact associated with this POM,"); out.println("# it will be installed when using the command mh_install. [mh_install]"); out.println("# --java-lib: install the jar into /usr/share/java to comply with Debian"); out.println("# packaging guidelines"); out.println("# --usj-name=: name to use when installing the library in /usr/share/java"); out.println("# --usj-version=: version to use when installing the library in /usr/share/java"); out.println("# --no-usj-versionless: don't install the versionless link in /usr/share/java"); out.println("# --dest-jar=: the destination for the real jar."); out.println("# It will be installed with mh_install. [mh_install]"); out.println("# --classifier=: Optional, the classifier for the jar. Empty by default."); out.println("# --site-xml=: Optional, the location for site.xml if it needs to be installed."); out.println("# Empty by default. [mh_install]"); out.println("#"); for (String pomPath: pomOptions.keySet()) { out.println(pomPath + getPOMOptions(pomPath)); } out.flush(); out.close(); } catch (Exception e) { log.log(Level.SEVERE, "Unable to write the list of poms " + poms, e); } } } /** * The options associated to a pom file. */ public static class POMOptions { private boolean ignore; private boolean ignorePOM; private boolean noParent; private boolean hasPackageVersion; private String destPackage; private String keepElements; private String artifact; private boolean javaLib; private String usjName; private String usjVersion; private String destJar; private boolean noUsjVersionless; private String classifier; private String siteXml; public boolean isIgnore() { return ignore; } public void setIgnore(boolean ignore) { this.ignore = ignore; } public boolean isIgnorePOM() { return ignorePOM; } public void setIgnorePOM(boolean ignorePOM) { this.ignorePOM = ignorePOM; } public boolean isNoParent() { return noParent; } public void setNoParent(boolean noParent) { this.noParent = noParent; } public String getDestPackage() { return destPackage; } public void setDestPackage(String destPackage) { this.destPackage = destPackage; } public boolean getHasPackageVersion() { return hasPackageVersion; } public void setHasPackageVersion(boolean hasPackageVersion) { this.hasPackageVersion = hasPackageVersion; } public String getKeepElements() { return keepElements; } public void setKeepElements(String keepElements) { this.keepElements = keepElements; } public String getArtifact() { return artifact; } public void setArtifact(String artifact) { this.artifact = artifact; } public boolean isJavaLib() { return javaLib; } public void setJavaLib(boolean javaLib) { this.javaLib = javaLib; } public String getUsjName() { return usjName; } public void setUsjName(String usjName) { this.usjName = usjName; } public String getUsjVersion() { return usjVersion; } public void setUsjVersion(String usjVersion) { this.usjVersion = usjVersion; } public String getDestJar() { return destJar; } public void setDestJar(String destJar) { this.destJar = destJar; } public boolean isNoUsjVersionless() { return noUsjVersionless; } public void setNoUsjVersionless(boolean noUsjVersionless) { this.noUsjVersionless = noUsjVersionless; } public String getClassifier() { return classifier; } public void setClassifier(String classifier) { this.classifier = classifier; } public String getSiteXml() { return siteXml; } public void setSiteXml(String siteXml) { this.siteXml = siteXml; } public String toString() { if (ignore) { return " --ignore"; } String options = ""; if (noParent) { options += " --no-parent"; } if (hasPackageVersion) { options += " --has-package-version"; } if (destPackage != null) { options += " --package=" + destPackage; } if (keepElements != null) { options += " --keep-elements=" + keepElements; } if (artifact != null) { options += " --artifact=" + artifact; } if (javaLib) { options += " --java-lib"; } if (usjName != null) { options += " --usj-name=" + usjName; } if (usjVersion != null) { options += " --usj-version=" + usjVersion; } if (destJar != null) { options += " --dest-jar=" + destJar; } if (noUsjVersionless) { options += " --no-usj-versionless"; } if (classifier != null) { options += " --classifier=" + classifier; } if (siteXml != null) { options += " --site-xml=" + siteXml; } if (ignorePOM) { options += " --ignore-pom"; } return options; } } } maven-repo-helper-1.8.5/src/main/java/org/debian/maven/repo/RepositoryReportTextWriter.java0000644000000000000000000000311512247273474026755 0ustar /* * Copyright 2011 Damien Raude-Morvan. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.debian.maven.repo; /** * @author Damien Raude-Morvan */ public class RepositoryReportTextWriter implements RepositoryReportWriter { /** * Current level of item */ private int itemLevel = 1; public void printSectionStart(String string) { String display = string + ":"; System.out.println(display.replaceAll(".", "=")); System.out.println(display); System.out.println(display.replaceAll(".", "=")); } public void printSectionEnd() { System.out.println(); } public void printItem(String string) { System.out.print("\t"); if (itemLevel > 1) { System.out.print("\t"); } System.out.println(string); itemLevel++; } public void endItem() { itemLevel--; } public void printStart() { System.out.println("Scanning repository..."); } public void printEnd() { System.out.println("Done."); } } maven-repo-helper-1.8.5/src/main/java/org/debian/maven/repo/DependencyRule.java0000644000000000000000000002104612247273474024251 0ustar /* * Copyright 2009 Ludovic Claude. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.debian.maven.repo; import java.util.StringTokenizer; /** * * @author Ludovic Claude */ public class DependencyRule implements Comparable { private static final Rule STAR_RULE = new Rule("*"); private static final Rule DEBIAN_RULE = new Rule("s/.*/debian/"); private final Rule groupRule; private final Rule artifactRule; private final Rule typeRule; private final Rule versionRule; private final Rule scopeRule; private final Rule classifierRule; public DependencyRule(String def) { StringTokenizer st = new StringTokenizer(def, " \t", false); groupRule = maybeParseRule(st); artifactRule = maybeParseRule(st); typeRule = maybeParseRule(st); versionRule = maybeParseRule(st, DEBIAN_RULE); classifierRule = maybeParseRule(st); scopeRule = maybeParseRule(st); } public DependencyRule(String group, String artifact, String type, String version, String classifier, String scope) { groupRule = new Rule(group); artifactRule = new Rule(artifact); typeRule = new Rule(type); versionRule = new Rule(version); classifierRule = new Rule(classifier); scopeRule = new Rule(scope); } public DependencyRule(String group, String artifact, String type, String version) { this(group, artifact, type, version, STAR_RULE.toString(), STAR_RULE.toString()); } public static DependencyRule newToMatch(Dependency dependency) { return new DependencyRule( dependency.getGroupId(), dependency.getArtifactId(), dependency.getType() == null ? "*" : dependency.getType(), "*" ); } private static Rule maybeParseRule(StringTokenizer st, Rule defaultRule) { if (st.hasMoreTokens()) { return new Rule(st.nextToken()); } else { return defaultRule; } } private static Rule maybeParseRule(StringTokenizer st) { return maybeParseRule(st, STAR_RULE); } public Rule getArtifactRule() { return artifactRule; } public Rule getGroupRule() { return groupRule; } public Rule getScopeRule() { return scopeRule; } public Rule getTypeRule() { return typeRule; } public Rule getVersionRule() { return versionRule; } public Rule getClassifierRule() { return classifierRule; } public boolean matches(Dependency dependency) { return groupRule.match(dependency.getGroupId()) && artifactRule.match(dependency.getArtifactId()) && typeRule.match(dependency.getType()) && versionRule.match(dependency.getVersion()) && scopeRule.match(dependency.getScope()) && classifierRule.match(dependency.getClassifier()); } public Dependency apply(Dependency dependency) { return new Dependency(groupRule.apply(dependency.getGroupId()), artifactRule.apply(dependency.getArtifactId()), typeRule.apply(dependency.getType()), versionRule.apply(dependency.getVersion()), scopeRule.apply(dependency.getScope()), dependency.isOptional(), classifierRule.apply(dependency.getClassifier()), dependency.getRelativePath()); } public boolean matchesAndPreservesGroupArtifactAndType(Dependency dependency) { if (!matches(dependency)) { return false; } Dependency transformed = apply(dependency); return transformed.getGroupId().equals(dependency.getGroupId()) && transformed.getArtifactId().equals(dependency.getArtifactId()) && transformed.getType().equals(dependency.getType()); } public boolean explicitlyMentions(Dependency dependency) { return !this.equals(DependencyRuleSet.TO_DEBIAN_VERSION_RULE) && !this.equals(DependencyRuleSet.MAVEN_PLUGINS_KEEP_VERSION_RULE) && this.matches(dependency); } /** * Natural sort order: from the most specific rules to the most generic rules, * a rule is more generic if a generic match appears on the group rule, then * artifact rule, then type rule, then version rule. * If 2 rules have the same order of genericness, then use an alphabetical * sorting of the pattern strings. */ public int compareTo(DependencyRule other) { if (groupRule.isGeneric() && !other.groupRule.isGeneric()) { return 1; } if (!groupRule.isGeneric() && other.groupRule.isGeneric()) { return -1; } if (artifactRule.isGeneric() && !other.artifactRule.isGeneric()) { return 1; } if (!artifactRule.isGeneric() && other.artifactRule.isGeneric()) { return -1; } if (typeRule.isGeneric() && !other.typeRule.isGeneric()) { return 1; } if (!typeRule.isGeneric() && other.typeRule.isGeneric()) { return -1; } if (versionRule.isGeneric() && !other.versionRule.isGeneric()) { return 1; } if (!versionRule.isGeneric() && other.versionRule.isGeneric()) { return -1; } if (classifierRule.isGeneric() && !other.classifierRule.isGeneric()) { return 1; } if (!classifierRule.isGeneric() && other.classifierRule.isGeneric()) { return -1; } if (scopeRule.isGeneric() && !other.scopeRule.isGeneric()) { return 1; } if (!scopeRule.isGeneric() && other.scopeRule.isGeneric()) { return -1; } return this.toPatternString().compareTo(other.toPatternString()); } public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final DependencyRule other = (DependencyRule) obj; if (this.groupRule != other.groupRule && (this.groupRule == null || !this.groupRule.equals(other.groupRule))) { return false; } if (this.artifactRule != other.artifactRule && (this.artifactRule == null || !this.artifactRule.equals(other.artifactRule))) { return false; } if (this.typeRule != other.typeRule && (this.typeRule == null || !this.typeRule.equals(other.typeRule))) { return false; } if (this.versionRule != other.versionRule && (this.versionRule == null || !this.versionRule.equals(other.versionRule))) { return false; } if (this.classifierRule != other.classifierRule && (this.classifierRule == null || !this.classifierRule.equals(other.classifierRule))) { return false; } return !(this.scopeRule != other.scopeRule && (this.scopeRule == null || !this.scopeRule.equals(other.scopeRule))); } public int hashCode() { int hash = 7; hash = 73 * hash + (this.groupRule != null ? this.groupRule.hashCode() : 0); hash = 73 * hash + (this.artifactRule != null ? this.artifactRule.hashCode() : 0); hash = 73 * hash + (this.typeRule != null ? this.typeRule.hashCode() : 0); hash = 73 * hash + (this.versionRule != null ? this.versionRule.hashCode() : 0); hash = 73 * hash + (this.classifierRule != null ? this.classifierRule.hashCode() : 0); hash = 73 * hash + (this.scopeRule != null ? this.scopeRule.hashCode() : 0); return hash; } public String toPatternString() { return groupRule.getPattern() + ":" + artifactRule.getPattern() + ":" + typeRule.getPattern() + ":" + versionRule.getPattern() + ":" + classifierRule.getPattern() + ":" + scopeRule.getPattern(); } public String toString() { return groupRule + " " + artifactRule + " " + typeRule + " " + versionRule + " " + classifierRule + " " + scopeRule; } } maven-repo-helper-1.8.5/src/main/java/org/debian/maven/repo/DependencyRuleSetFiles.java0000644000000000000000000000740112247273474025707 0ustar package org.debian.maven.repo; import java.io.File; import java.util.EnumMap; import java.util.List; import java.util.logging.Logger; import org.debian.maven.cliargs.ArgumentsMap; import static org.debian.maven.repo.DependencyRuleSet.*; public class DependencyRuleSetFiles { private static final Logger log = Logger.getLogger(DependencyRuleSetFiles.class.getName()); // publishedRules.setDontDuplicate(rules); private final EnumMap files; public void addDefaultRules() { files.get(RulesType.RULES).add(TO_DEBIAN_VERSION_RULE); files.get(RulesType.RULES).add(MAVEN_PLUGINS_KEEP_VERSION_RULE); } public DependencyRuleSetFiles(EnumMap files) { this.files = files; } public DependencyRuleSetFiles() { this(new EnumMap(RulesType.class)); for (RulesType type : RulesType.values()) { files.put(type, new DependencyRuleSet()); } } public DependencyRuleSet get(RulesType type) { return files.get(type); } public static DependencyRuleSetFiles fromCLIArguments(ArgumentsMap argsMap, boolean verbose) { DependencyRuleSetFiles depFiles = new DependencyRuleSetFiles(); for (RulesType type : RulesType.values()) { CLIArgs args = type.cliArgs; if (args == null) { continue; } File rulesFile = argsMap.getFile(args.fileLong, args.fileShort, null); List rulesExtra = argsMap.getValueList(args.extraLong, args.extraShort); DependencyRuleSet ruleSet = DependencyRuleSet.readRules(rulesFile, "", verbose, false); ruleSet.addAll(rulesExtra); depFiles.get(type).addAll(ruleSet); } return depFiles; } public void save(File outputDirectory) { for (RulesType type : RulesType.values()) { save(outputDirectory, type); } } public void save(File outputDirectory, RulesType type) { if(type.filename == null) return; File file = new File(outputDirectory, type.filename); switch(type) { case CLEAN: files.get(type).saveToFile(file, files.get(RulesType.IGNORE)); break; default: files.get(type).saveToFile(file, null); break; } } public enum RulesType { RULES("Rules", "rules", new CLIArgs("rules", "r", "extra-rule", "R")), AUTOMATIC("Automatic rules", null, null), PUBLISHED("Published rules", "publishedRules", new CLIArgs("published-rules", null, "extra-published-rule", "U")), IGNORE("Ignore rules", "ignoreRules", new CLIArgs("ignore-rules", "i", "extra-ignore-rule", "I")), CLEAN("cleanIgnore", "cleanIgnoreRules", null); public final String name; public final String filename; public final String descriptionResource; public final CLIArgs cliArgs; RulesType(String name, String identifier, CLIArgs cliArgs) { this.name = name; this.filename = identifier != null ? "maven." + identifier : null; this.descriptionResource = identifier != null ? filename + ".description" : null; this.cliArgs = cliArgs; } } public static class CLIArgs { public final String fileLong; public final String fileShort; public final String extraLong; public final String extraShort; public CLIArgs(String fileLong, String fileShort, String extraLong, String extraShort) { this.fileLong = fileLong; this.fileShort = fileShort; this.extraLong = extraLong; this.extraShort = extraShort; } } } maven-repo-helper-1.8.5/src/main/java/org/debian/maven/repo/Dependency.java0000644000000000000000000003365312247273474023430 0ustar /* * Copyright 2009 Ludovic Claude. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.debian.maven.repo; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * Represents a Maven dependency of any type (dependency, plugin, parent POM) * * @author Ludovic Claude */ public class Dependency implements Comparable, Cloneable { public static final Dependency PROTO_JAR = new Dependency(null, null, "jar", null); public static final Dependency PROTO_PLUGIN = new Dependency("org.apache.maven.plugins", null, "maven-plugin", null); private static final Pattern COMPACT_DEPENDENCY_NOTATION_MATCHER = Pattern.compile("(\\w[a-zA-Z0-9\\-_\\.]*):(\\w[a-zA-Z0-9\\-_]*):(\\d[a-zA-Z0-9\\-_\\.]*)"); private String groupId; private String artifactId; private String type; private String version; private boolean optional; private String scope; private String classifier; private String relativePath; private boolean superPom; public Dependency(String groupId, String artifactId, String type, String version) { this.groupId = groupId; this.artifactId = artifactId; this.type = type; this.version = version; this.classifier = ""; } public Dependency(String groupId, String artifactId, String type, String version, String scope, boolean optional, String classifier, String relativePath) { this.groupId = groupId; this.artifactId = artifactId; this.type = type; this.version = version; this.scope = scope; this.optional = optional; this.classifier = (classifier == null) ? "" : classifier; this.relativePath = relativePath; } public Dependency(Dependency dependency) { this.groupId = dependency.groupId; this.artifactId = dependency.artifactId; this.type = dependency.type; this.version = dependency.version; this.scope = dependency.scope; this.optional = dependency.optional; this.classifier = dependency.classifier; this.relativePath = dependency.relativePath; this.superPom = dependency.superPom; } public Dependency(Builder builder) { this.groupId = builder.groupId; this.artifactId = builder.artifactId; this.type = builder.type; this.version = builder.version; this.scope = builder.scope; this.optional = builder.optional; this.classifier = builder.classifier; this.relativePath = builder.relativePath; this.superPom = builder.superPom; } public String getArtifactId() { return artifactId; } @Deprecated public void setArtifactId(String artifactId) { this.artifactId = artifactId; } public String getGroupId() { return groupId; } @Deprecated public void setGroupId(String groupId) { this.groupId = groupId; } public String getType() { return type; } @Deprecated public void setType(String type) { this.type = type; } public String getVersion() { return version; } @Deprecated public void setVersion(String version) { this.version = version; } public boolean isOptional() { return optional; } @Deprecated public void setOptional(boolean optional) { this.optional = optional; } public boolean isScopeDefined() { return (scope != null); } public String getScope() { return scope == null ? "runtime" : scope; } @Deprecated public void setScope(String scope) { this.scope = scope; } public String getClassifier() { return classifier; } @Deprecated public void setClassifier(String classifier) { this.classifier = (classifier == null) ? "" : classifier; } public String getRelativePath() { return relativePath; } @Deprecated public void setRelativePath(String relativePath) { this.relativePath = relativePath; } @Deprecated public void setSuperPom(boolean superPom) { this.superPom = superPom; } public boolean isSuperPom() { return superPom; } /** * Tells if this artifact is a pom. */ public boolean isPom() { return "pom".equals(type); } /** * Tells if this artifact is a jar. */ public boolean isJar() { return "jar".equals(type); } /** * Tells if this artifact is a Maven plugin. */ public boolean isPlugin() { return "maven-plugin".equals(type); } /** * Tells if this artifact is an OSGi bundle. */ public boolean isBundle() { return "bundle".equals(type); } public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final Dependency other = (Dependency) obj; if ((this.groupId == null) ? (other.groupId != null) : !this.groupId.equals(other.groupId)) { return false; } if ((this.artifactId == null) ? (other.artifactId != null) : !this.artifactId.equals(other.artifactId)) { return false; } if (!isTypeEquals(this.type, other.type)) { return false; } if ((this.version == null) ? (other.version != null) : !this.version.equals(other.version)) { return false; } // Ignore scope and optional as they are content-free and indicate more the context return !((this.classifier == null) ? (other.classifier != null) : !this.classifier.equals(other.classifier)); } public boolean equalsIgnoreVersion(Dependency other) { if (other == null) { return false; } if (getClass() != other.getClass()) { return false; } if ((this.groupId == null) ? (other.groupId != null) : !this.groupId.equals(other.groupId)) { return false; } if ((this.artifactId == null) ? (other.artifactId != null) : !this.artifactId.equals(other.artifactId)) { return false; } if (!isTypeEquals(this.type, other.type)) { return false; } // Classifier is still important here as it can influence greatly the contents of the artifact (a source artifact is very different from a normal artifact) return !((this.classifier == null) ? (other.classifier != null) : !this.classifier.equals(other.classifier)); } public int hashCode() { int hash = 7; hash = 31 * hash + (this.groupId != null ? this.groupId.hashCode() : 0); hash = 31 * hash + (this.artifactId != null ? this.artifactId.hashCode() : 0); // ignore type hash = 31 * hash + (this.version != null ? this.version.hashCode() : 0); return hash; } public String toString() { return groupId + ":" + artifactId + ":" + type + ":" + version; } public int compareTo(Dependency dependency) { if (this.groupId != dependency.groupId) { if (this.groupId == null) return -1; if (! this.groupId.equals(dependency.groupId)) { return this.groupId.compareTo(dependency.groupId); } } if (this.artifactId != dependency.artifactId) { if (this.artifactId == null) return -1; if (! this.artifactId.equals(dependency.artifactId)) { return this.artifactId.compareTo(dependency.artifactId); } } // ignore type if (this.version != dependency.version) { if (this.version == null) return -1; if (! this.version.equals(dependency.version)) { return this.version.compareTo(dependency.version); } } return 0; } public Object clone() throws CloneNotSupportedException { try { return super.clone(); } catch (CloneNotSupportedException e) { e.printStackTrace(); return null; } } public Dependency applyRules(Collection rules) { for (DependencyRule rule: rules) { if (rule.matches(this)) { return rule.apply(this); } } return new Dependency(this); } public DependencyRule findMatchingRule(Collection rules) { for (DependencyRule rule: rules) { if (rule.matches(this)) { return rule; } } return null; } public static List applyRules(List dependencies, Collection rules) { if (dependencies == null) { return null; } List result = new ArrayList(); for (Dependency dependency: dependencies) { result.add(dependency.applyRules(rules)); } return result; } public static List applyIgnoreRules(List dependencies, Set ignoreRules) { if (dependencies == null) { return null; } List result = new ArrayList(); for (Dependency dependency: dependencies) { if (dependency.findMatchingRule(ignoreRules) == null) { result.add(new Dependency(dependency)); } } return result; } public static boolean isTypeEquals(String type1, String type2) { if (type1 != null && ("jar".equals(type1) || "bundle".equals(type1))) { return ("jar".equals(type2) || "bundle".equals(type2)); } if (type1 != null) { return type1.equals(type2); } return type2 == null; } public static Dependency fromCompactNotation(String depNotation) { Matcher dependencyMatcher = COMPACT_DEPENDENCY_NOTATION_MATCHER.matcher(depNotation); if (dependencyMatcher.matches()) { return new Dependency(dependencyMatcher.group(1), dependencyMatcher.group(2), "jar", dependencyMatcher.group(3)); } return null; } public String formatCompactNotation() { return getGroupId() + ":" + getArtifactId() + ":" + getVersion(); } public Builder builder() { Builder builder = new Builder(); builder.groupId = groupId; builder.artifactId = artifactId; builder.type = type; builder.version = version; builder.optional = optional; builder.scope = scope; builder.classifier = classifier; builder.relativePath = relativePath; builder.superPom = superPom; return builder; } public static class Builder { private String groupId; private String artifactId; private String type; private String version; private boolean optional; private String scope; private String classifier; private String relativePath; private boolean superPom; public Builder setGroupId(String groupId) { this.groupId = groupId; return this; } public Builder setArtifactId(String artifactId) { this.artifactId = artifactId; return this; } public Builder setType(String type) { this.type = type; return this; } public Builder setVersion(String version) { this.version = version; return this; } public Builder setOptional(boolean optional) { this.optional = optional; return this; } public Builder setScope(String scope) { this.scope = scope; return this; } public Builder setClassifier(String classifier) { this.classifier = classifier; return this; } public Builder setRelativePath(String relativePath) { this.relativePath = relativePath; return this; } public Builder setSuperPom(boolean superPom) { this.superPom = superPom; return this; } public Builder set(Field field, String value) { switch (field) { case GROUPID: setGroupId(value); return this; case ARTIFACTID: setArtifactId(value); return this; case CLASSIFIER: setClassifier(value); return this; case OPTIONAL: setOptional("true".equals(value)); return this; case RELATIVEPATH: setRelativePath(value); return this; case SCOPE: setScope(value); return this; case TYPE: setType(value); return this; case VERSION: setVersion(value); return this; } return this; } public Dependency build() { return new Dependency(this); } } public enum Field { GROUPID("groupId"), ARTIFACTID("artifactId"), TYPE("type"), VERSION("version"), OPTIONAL("optional"), SCOPE("scope"), CLASSIFIER("classifier"), RELATIVEPATH("relativePath"); public final static Map map; static { map = new HashMap(); for(Field field : Field.values()) { map.put(field.TAG, field); } } public final String TAG; Field(String tag) { TAG = tag; } public static Field get(String tag) { return map.get(tag); } } } maven-repo-helper-1.8.5/src/main/java/org/debian/maven/repo/Rule.java0000644000000000000000000001012712247273474022250 0ustar /* * Copyright 2009 Ludovic Claude. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.debian.maven.repo; import java.util.StringTokenizer; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * @author Ludovic Claude */ public class Rule { private static Pattern generic = Pattern.compile("([\\[\\?\\+\\*\\|])|([^\\\\]\\.)"); private final Pattern pattern; private final String replace; private final String rule; private final String description; public Rule(String rule) { this(rule, ""); } public Rule(String rule, String description) { this.rule = rule; this.description = description; if (rule.startsWith("s/")) { StringTokenizer st = new StringTokenizer(rule, "/"); st.nextToken(); pattern = Pattern.compile(st.nextToken()); replace = st.nextToken(); } else { String pat = escapeParameters(rule.replace(".", "\\.").replace("*", "(.*)")); pattern = Pattern.compile(pat); replace = escapeGroupMatch(rule).replace("*", "$1"); } } public boolean match(String s) { if (s == null) { return matchesNull(); } return pattern.matcher(s).matches(); } public String apply(String s) { if (s == null) { if (matchesNull()) { if (!replace.contains("$1")) { return replace; } } return null; } Matcher m = pattern.matcher(s); StringBuffer sb = new StringBuffer(); while (m.find()) { if (m.start() < m.end()) { m.appendReplacement(sb, replace); } } return sb.toString(); } public boolean isGeneric() { return matchesNull() || generic.matcher(pattern.pattern()).find(); } public boolean matchesNull() { String patternString = pattern.pattern(); return ".*".equals(patternString) || "(.*)".equals(patternString); } public String getPattern() { return pattern.pattern(); } public String getDescription() { return description; } public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final Rule other = (Rule) obj; if (this.pattern != other.pattern && (this.pattern == null || !this.pattern.pattern().equals(other.pattern.pattern()))) { return false; } return !((this.replace == null) ? (other.replace != null) : !this.replace.equals(other.replace)); } public int hashCode() { int hash = 7; hash = 89 * hash + (this.pattern != null ? this.pattern.pattern().hashCode() : 0); hash = 89 * hash + (this.replace != null ? this.replace.hashCode() : 0); return hash; } public String toString() { return rule; } /** * Escape (ie. preprend \\) characters which can be specials chars for regexp. * * @param value Input chars * @return Escaped output chars */ private String escapeParameters(String value) { return escapeGroupMatch(value).replace("{", "\\{").replace("}", "\\}"); } /** * Escape (ie. preprend \\) characters which can be group identifiers for replace * * @param value Input chars * @return Escaped output chars */ private String escapeGroupMatch(String value) { return value.replace("$", "\\$"); } } maven-repo-helper-1.8.5/src/main/java/org/debian/maven/repo/Substvars.java0000644000000000000000000000341512247273474023337 0ustar package org.debian.maven.repo; import java.io.BufferedWriter; import java.io.File; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.util.Properties; import java.util.logging.Level; import java.util.logging.Logger; import org.debian.maven.util.Strings; public class Substvars { private static final Logger log = Logger.getLogger(Substvars.class.getName()); private static File substvarsFile(File outputDirectory, String packageName) { return new File(outputDirectory, packageName + ".substvars"); } public static Properties loadSubstvars(File outputDirectory, String packageName) { File substvarsFile = Substvars.substvarsFile(outputDirectory, packageName); Properties depVars = new Properties(); if (substvarsFile.exists()) { try { depVars.load(new FileReader(substvarsFile)); } catch (IOException ex) { log.log(Level.SEVERE, "Error while reading file " + substvarsFile, ex); } } return depVars; } public static void write(File outputDirectory, String packageName, Properties substvars) { File substvarsFile = substvarsFile(outputDirectory, packageName); try { BufferedWriter out = new BufferedWriter(new FileWriter(substvarsFile)); out.write("#List of dependencies for " + packageName + ", generated for use by debian/control\n"); for (String propName : substvars.stringPropertyNames()) { out.write(Strings.propertyLine(propName, substvars.get(propName).toString())); } out.close(); } catch (IOException ex) { log.log(Level.SEVERE, "Error while saving file " + substvarsFile, ex); } } } maven-repo-helper-1.8.5/src/main/java/org/debian/maven/repo/Repository.java0000644000000000000000000004370512247273474023530 0ustar /* * Copyright 2009 Ludovic Claude. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.debian.maven.repo; import java.io.File; import java.io.InputStream; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; import java.util.TreeMap; import java.util.TreeSet; import java.util.logging.Level; import java.util.logging.Logger; import javax.xml.stream.XMLStreamException; import org.debian.maven.repo.POMInfo.DependencyType; import static org.debian.maven.repo.DependencyRuleSet.*; /** * @author Ludovic Claude */ public class Repository { private static final Logger log = Logger.getLogger(Repository.class.getName()); private File baseDir; private Map unresolvedPoms = new HashMap(); private Map dep2info = new HashMap(); private Map pomsWithMissingParent = new HashMap(); private Map pomsWithMissingVersions = new HashMap(); private Map resolvedPoms = new HashMap(); private POMInfo superPom; private POMReader pomReader = new POMReader(); private boolean scanned = false; public Repository(File baseDir) { this.baseDir = baseDir; try { InputStream superPomSource = getClass().getResourceAsStream("/org/apache/maven/project/pom-4.0.0.xml"); // The maven2 jars may not always be present in the classpath if (superPomSource != null) { superPom = pomReader.readPom(new InputStreamReader(superPomSource)); superPom.getThisPom().setGroupId("__super__"); superPom.getThisPom().setArtifactId("__pom__"); superPom.getThisPom().setType("pom"); superPom.getThisPom().setSuperPom(true); } } catch (XMLStreamException ex) { log.log(Level.SEVERE, null, ex); } } public File getBaseDir() { return baseDir; } public POMInfo getSuperPOM() { return superPom; } public POMInfo getPOM(Dependency dependency) { return dep2info.get(dependency); } protected Map getUnresolvedPoms() { return unresolvedPoms; } protected Map getPomsWithMissingParent() { return pomsWithMissingParent; } protected Map getPomsWithMissingVersions() { return pomsWithMissingVersions; } protected Map getResolvedPoms() { return resolvedPoms; } protected List getAllPoms() { List allPoms = new ArrayList(resolvedPoms.values()); allPoms.addAll(unresolvedPoms.values()); return allPoms; } /** * Search the best match for a dependency * * @param dependency * @return */ public POMInfo searchMatchingPOM(Dependency dependency) { if (dependency == null) { return null; } POMInfo pom = getPOM(dependency); if (pom != null) { return pom; } // Map Map potentialMatches = new TreeMap(); for (POMInfo testPom : getAllPoms()) { Set rules = testPom.getPublishedRules(); rules.add(MAVEN_PLUGINS_KEEP_VERSION_RULE); rules.add(TO_DEBIAN_VERSION_RULE); for (DependencyRule rule : rules) { if (rule.matches(dependency) && rule.apply(dependency).equals(testPom.getThisPom())) { potentialMatches.put(rule, testPom); } } } if (!potentialMatches.isEmpty()) { // Return the best match return potentialMatches.values().iterator().next(); } return null; } public List searchMatchingPOMsIgnoreVersion(Dependency dependency) { List result = new ArrayList(); POMInfo pom = searchMatchingPOM(dependency); if (pom != null) { result.add(pom); return result; } for (POMInfo testPom : resolvedPoms.values()) { if (testPom.getThisPom().equalsIgnoreVersion(dependency)) { result.add(testPom); } } return result; } public void scanOnce() { if (!scanned) { scan(); } } public void scan() { File[] files = baseDir.listFiles(); scan(files); resolveAll(unresolvedPoms); int unresolved = pomsWithMissingParent.size(); while (unresolved > 0) { resolveAll(pomsWithMissingParent); if (pomsWithMissingParent.size() == unresolved) { // stale detection break; } unresolved = pomsWithMissingParent.size(); } unresolved = unresolvedPoms.size(); while (unresolved > 0) { resolveAll(unresolvedPoms); if (unresolvedPoms.size() == unresolved) { // stale detection break; } unresolved = unresolvedPoms.size(); } scanned = true; } public void report(RepositoryReportWriter writer) { writer.printStart(); if (pomsWithMissingParent.size() > 0) { writer.printSectionStart("POMs with missing parents"); for (File pom : pomsWithMissingParent.keySet()) { writer.printItem(pom.getAbsolutePath()); writer.endItem(); } writer.printSectionEnd(); } if (pomsWithMissingVersions.size() > 0) { writer.printSectionStart("POMs with missing versions"); for (Entry entry : pomsWithMissingVersions.entrySet()) { File pom = entry.getKey(); POMInfo pomInfo = entry.getValue(); writer.printItem(pom.getAbsolutePath()); for (Dependency dependency : pomInfo.getDependencies().get(DependencyType.DEPENDENCIES)) { if (dependency.getVersion() == null || dependency.getVersion().contains("$")) { writer.printItem(dependency.toString()); writer.endItem(); } } for (Dependency dependency : pomInfo.getDependencies().get(DependencyType.PLUGINS)) { if (dependency.getVersion() == null || dependency.getVersion().contains("$")) { writer.printItem(dependency.toString()); writer.endItem(); } } writer.endItem(); } writer.printSectionEnd(); } Set issues = new TreeSet(); Map> pomsWithIssues = new HashMap>(); for (Entry entry : resolvedPoms.entrySet()) { File pom = entry.getKey(); POMInfo pomInfo = entry.getValue(); if (pomInfo.getThisPom().getVersion() == null) { issues.add("Missing version in " + pom); } if (pomInfo.getThisPom().getVersion().endsWith("-SNAPSHOT")) { issues.add("Snapshot version in " + pom); } for (Dependency dependency : pomInfo.getDependencies().get(DependencyType.DEPENDENCIES)) { if (!dep2info.containsKey(dependency)) { issues.add("Unpackaged dependency: " + dependency + " in " + pom); List pomIssues = pomsWithIssues.get(pom); if (pomIssues == null) { pomIssues = new ArrayList(); pomsWithIssues.put(pom, pomIssues); } pomIssues.add(dependency); } } for (Dependency dependency : pomInfo.getDependencies().get(DependencyType.PLUGINS)) { if (!dep2info.containsKey(dependency)) { issues.add("Unpackaged plugin: " + dependency + " in " + pom); List pomIssues = pomsWithIssues.get(pom); if (pomIssues == null) { pomIssues = new ArrayList(); pomsWithIssues.put(pom, pomIssues); } pomIssues.add(dependency); } } } writer.printSectionStart("Errors"); for (String issue : issues) { writer.printItem(issue); writer.endItem(); } writer.printSectionEnd(); // Find the poms with most issues Map> pomsWithNumberOfIssues = new TreeMap>(Collections.reverseOrder()); for (Entry> entry : pomsWithIssues.entrySet()) { File pom = entry.getKey(); List missingDeps = entry.getValue(); int count = missingDeps.size(); List orderedPoms = pomsWithNumberOfIssues.get(count); if (orderedPoms == null) { orderedPoms = new ArrayList(); pomsWithNumberOfIssues.put(count, orderedPoms); } orderedPoms.add(pom); } if (!pomsWithNumberOfIssues.isEmpty()) { writer.printSectionStart("Top 10 POM files with issues"); int count = 0; for (Iterator> i = pomsWithNumberOfIssues.values().iterator(); i.hasNext() && count < 10; ) { List orderedPoms = i.next(); for (Iterator j = orderedPoms.iterator(); j.hasNext() && count < 10; count++) { File pom = j.next(); List missingDeps = pomsWithIssues.get(pom); writer.printItem("Missing dependencies in " + pom); for (Dependency dependency : missingDeps) { writer.printItem(dependency.toString()); writer.endItem(); } writer.endItem(); } } writer.printSectionEnd(); } // Find the dependencies that need packaging most Map missingDependenciesCounts = new HashMap(); for (Entry> entry : pomsWithIssues.entrySet()) { List missingDeps = entry.getValue(); for (Dependency missingDependency : missingDeps) { Integer lastCount = missingDependenciesCounts.remove(missingDependency); if (lastCount == null) { lastCount = 0; } missingDependenciesCounts.put(missingDependency, lastCount + 1); } } List> missingDependenciesCountList = new ArrayList>(missingDependenciesCounts.entrySet()); Collections.sort(missingDependenciesCountList, new Comparator>() { public int compare(Map.Entry entry1, Map.Entry entry2) { Integer count1 = entry1.getValue(); Integer count2 = entry2.getValue(); return count2.compareTo(count1); } }); if (!missingDependenciesCountList.isEmpty()) { writer.printSectionStart("Top 10 missing dependencies"); int count = 0; for (Iterator> i = missingDependenciesCountList.iterator(); i.hasNext() && count < 10; count++) { Map.Entry entry = i.next(); Dependency missingDependency = entry.getKey(); Integer numberOfTimes = entry.getValue(); writer.printItem("Missing dependency " + missingDependency + " is needed in " + numberOfTimes + " places"); writer.endItem(); } writer.printSectionEnd(); } writer.printEnd(); } private void resolveAll(Map file2pom) { // copy to avoid concurrent modifications Map copy = new HashMap(file2pom); for (Entry entry : copy.entrySet()) { try { registerPom(entry.getKey(), entry.getValue()); } catch (DependencyNotFoundException e) { // Ignore } } } private void scan(File[] files) { if (files == null) { return; } for (File file : files) { if (file.isDirectory()) { scan(file.listFiles()); } else if (file.getName().endsWith(".pom")) { try { registerPom(file, pomReader.readPom(file)); } catch (DependencyNotFoundException e) { // Ignore } catch (Exception e) { System.out.println("Failed to parse " + file); e.printStackTrace(); System.out.println(); } } } } public void registerPom(File file, POMInfo pomInfo) throws DependencyNotFoundException { dep2info.put(pomInfo.getThisPom(), pomInfo); unresolvedPoms.put(file, pomInfo); POMInfo parentPOM = superPom; try { if (pomInfo.getParent() != null && !pomInfo.getParent().isSuperPom()) { POMInfo foundParent = getPOM(pomInfo.getParent()); if (foundParent == null) { pomsWithMissingParent.put(file, pomInfo); throw new DependencyNotFoundException(pomInfo.getParent()); } else { parentPOM = foundParent; pomsWithMissingParent.remove(file); } if (!resolvedPoms.values().contains(parentPOM)) { throw new DependencyNotFoundException(parentPOM.getThisPom()); } } } finally { // Always merge with the parent POM - which is by default the super POM, // as we can have intermediate situations in the DependenciesSolver where // the true parent POM is not known and will be eliminated, yet we need // the versions from the super POM. pomInfo.setParentPOM(parentPOM); pomsWithMissingVersions.remove(file); for (Dependency dependency : pomInfo.getDependencies().get(DependencyType.DEPENDENCIES)) { if (dependency.getVersion() == null) { pomsWithMissingVersions.put(file, pomInfo); } } for (Dependency dependency : pomInfo.getDependencies().get(DependencyType.PLUGINS)) { if (dependency.getVersion() == null) { pomsWithMissingVersions.put(file, pomInfo); } } } resolvedPoms.put(file, pomInfo); unresolvedPoms.remove(file); } public static void main(String[] args) { if (args != null && args.length > 0 && ("-h".equals(args[0]) || "--help".equals(args[0]))) { System.out.println("Purpose: Check content of a Maven repository."); System.out.println("Usage: [option]"); System.out.println(""); System.out.println("Options:"); System.out.println(" -v, --verbose: be extra verbose"); System.out.println(" -o, --output=: 'text' or 'html' to change output format"); System.out.println(" -r, --repository=: directory of Maven repository"); return; } // default format String format = "text"; // default repository File repoLocation = new File("/usr/share/maven-repo/"); // Parse parameters int i = inc(-1, args); if (args != null) { while (i < args.length && (args[i].trim().startsWith("-") || args[i].trim().isEmpty())) { String arg = args[i].trim(); if (arg.startsWith("-o")) { format = arg.substring(2).trim(); } else if (arg.startsWith("--output=")) { format = arg.substring("--output=".length()).trim(); } else if (arg.startsWith("-r")) { repoLocation = new File(arg.substring(2).trim()); } else if (arg.startsWith("--repository=")) { repoLocation = new File(arg.substring("--repository=".length()).trim()); } i = inc(i, args); } } Repository repository = new Repository(repoLocation); RepositoryReportWriter reportWriter; if ("text".equals(format)) { reportWriter = new RepositoryReportTextWriter(); } else { reportWriter = new RepositoryReportHTMLWriter(); } repository.scan(); repository.report(reportWriter); } private static int inc(int i, String[] args) { do { i++; } while (i < args.length && args[i].isEmpty()); return i; } } maven-repo-helper-1.8.5/src/main/java/org/debian/maven/repo/POMTransformer.java0000644000000000000000000011602612247273474024224 0ustar /* * Copyright 2009 Ludovic Claude. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.debian.maven.repo; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.io.Writer; import java.util.*; import java.util.logging.Level; import java.util.logging.Logger; import javax.xml.stream.XMLOutputFactory; import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; import org.debian.maven.cliargs.ArgumentsMap; import org.debian.maven.repo.POMInfo.DependencyType; import org.debian.maven.util.Strings; import org.debian.maven.util.XMLWriterWrapper; import static org.debian.maven.repo.POMInfo.DependencyType.*; import static org.debian.maven.repo.DependencyRuleSet.*; import static org.debian.maven.repo.DependencyRuleSetFiles.RulesType.*; /** * @author Ludovic Claude */ public class POMTransformer extends POMReader { private static final Logger log = Logger.getLogger(POMTransformer.class.getName()); private static final List WRITE_IGNORED_ELEMENTS = Arrays.asList("modelVersion", "parent"); private static final List DEBIAN_BUILD_IGNORED_ELEMENTS = Arrays.asList("distributionManagement", "repositories", "pluginRepositories"); private static final List DEBIAN_DOC_IGNORED_ELEMENTS = Arrays.asList("reports", "reporting", "site"); private static final List INFO_ELEMENTS = Arrays.asList("groupId", "artifactId", "packaging", "version"); private DependencyRuleSetFiles depRules = new DependencyRuleSetFiles(); private Map> ignoredModules = new HashMap>(); private Repository repository; private boolean verbose; private boolean isDebianBuild; private boolean isBuildWithoutDoc; private boolean publishUsedRule = true; private boolean fixVersions = true; private ListOfPOMs listOfPOMs; public void setRulesFiles(DependencyRuleSetFiles rulesFiles) { this.depRules = rulesFiles; } public DependencyRuleSetFiles getRulesFiles() { return depRules; } public Repository getRepository() { return repository; } public void setRepository(Repository repository) { this.repository = repository; } public ListOfPOMs getListOfPOMs() { return listOfPOMs; } public void setListOfPOMs(ListOfPOMs listOfPOMs) { this.listOfPOMs = listOfPOMs; } public void setBuildWithoutDoc(boolean isBuildWithoutDoc) { this.isBuildWithoutDoc = isBuildWithoutDoc; } public void setDebianBuild(boolean isDebianBuild) { this.isDebianBuild = isDebianBuild; } public void setPublishUsedRule(boolean publishUsedRule) { this.publishUsedRule = publishUsedRule; } public void setFixVersions(boolean fixVersions) { this.fixVersions = fixVersions; } public void usePluginVersionsFromRepository() { repository.scanOnce(); for (POMInfo pom : repository.getResolvedPoms().values()) { if (pom.getThisPom().isPlugin()) { Set pomRules = pom.getPublishedRules(); depRules.get(RULES).add(MAVEN_PLUGINS_KEEP_VERSION_RULE); boolean found = false; for (DependencyRule rule: pomRules) { if (rule.matches(pom.getThisPom()) && rule.apply(pom.getThisPom()).equals(pom.getThisPom()) && !rule.getGroupRule().isGeneric() && !rule.getArtifactRule().isGeneric()) { depRules.get(AUTOMATIC).add(rule); found = true; break; } } if (!found) { DependencyRule rule = new DependencyRule(pom.getThisPom().getGroupId() + " " + pom.getThisPom().getArtifactId() + " maven-plugin s/.*/" + pom.getThisPom().getVersion() + "/"); depRules.get(AUTOMATIC).add(rule); } } } // Remove the default rules from the list of automatic rules, as they may be added by the scanning // but addDefaultRules() may not have been called depRules.get(AUTOMATIC).getRules().remove(MAVEN_PLUGINS_KEEP_VERSION_RULE); depRules.get(AUTOMATIC).getRules().remove(TO_DEBIAN_VERSION_RULE); } public void addIgnoreModule(File pomFile, String module) { pomFile = pomFile.getAbsoluteFile(); Set modules = ignoredModules.get(pomFile); if (modules == null) { modules = new HashSet(); ignoredModules.put(pomFile, modules); } modules.add(module); } public void discoverModulesToIgnore() { listOfPOMs.foreachPoms(new POMHandler() { public void handlePOM(File pomFile, boolean noParent, boolean hasPackageVersion) throws Exception { } public void ignorePOM(File pomFile) throws Exception { File parentPom = new File(pomFile.getParentFile().getParentFile(), "pom.xml"); addIgnoreModule(parentPom, pomFile.getParentFile().getName()); } }); } public void keepPomVersions() { listOfPOMs.foreachPoms(new POMHandler() { public void handlePOM(File pomFile, boolean noParent, boolean hasPackageVersion) throws Exception { keepPomVersion(pomFile); } public void ignorePOM(File pomFile) throws Exception { } }); } public void keepPomVersion(File pomFile) throws XMLStreamException, FileNotFoundException { Dependency pom = readPom(pomFile).getThisPom(); depRules.get(RULES).add(new DependencyRule(pom.getGroupId() + " " + pom.getArtifactId() + " " + pom.getType() + " " + pom.getVersion())); } public boolean keepParentVersion(File pomFile, boolean noParent, boolean keepPomVersion) throws Exception { boolean keepParentVersion = !noParent && keepPomVersion; if (keepParentVersion && repository != null) { POMInfo pom = readPom(pomFile); if (pom.getThisPom().isPom() && pom.getParent() != null) { keepParentVersion = listOfPOMs.contains(pomFile) || repository.searchMatchingPOM(pom.getParent()) == null; } } return keepParentVersion; } public void transformPoms(final String debianPackage, final boolean keepPomVersion, final String setVersion) { discoverModulesToIgnore(); listOfPOMs.foreachPoms(new POMHandler() { public void handlePOM(File pomFile, boolean noParent, boolean hasPackageVersion) throws Exception { File targetFile = new File(pomFile.getAbsolutePath() + ".new"); boolean keepParentVersion = keepParentVersion(pomFile, noParent, keepPomVersion); transformPom(pomFile, targetFile, noParent, hasPackageVersion, keepPomVersion, keepParentVersion, setVersion, debianPackage); pomFile.delete(); targetFile.renameTo(pomFile); } public void ignorePOM(File pomFile) throws Exception { } }); } public POMInfo transformPom(File originalPom, File targetPom) throws XMLStreamException, IOException { return transformPom(originalPom, targetPom, false, false, false, false, null, null); } public POMInfo transformPom(File originalPom, File targetPom, boolean noParent, boolean hasPackageVersion, boolean keepPomVersion, boolean keepParentVersion, String setVersion, String debianPackage) throws XMLStreamException, IOException { return transformPom(originalPom, targetPom, noParent, hasPackageVersion, keepPomVersion, keepParentVersion, setVersion, debianPackage, false); } public POMInfo transformPom(File originalPom, File targetPom, boolean noParent, boolean hasPackageVersion, boolean keepPomVersion, boolean keepParentVersion, String setVersion, String debianPackage, boolean ignoreRegisterErrors) throws XMLStreamException, IOException { if (targetPom.getParentFile() != null) { targetPom.getParentFile().mkdirs(); } XMLOutputFactory outFactory = XMLOutputFactory.newInstance(); Writer out = null; try { // First pass - read information for this POM POMInfo original = readPom(originalPom); if (setVersion != null) { original.getThisPom().setVersion(setVersion); } if (keepParentVersion && original.getParent() != null) { // Add a rule to also keep the parent version depRules.get(AUTOMATIC).add(new DependencyRule(original.getParent().getGroupId() + " " + original.getParent().getArtifactId() + " * * * *")); } Set allRules = new TreeSet(depRules.get(RULES).getRules()); allRules.addAll(depRules.get(AUTOMATIC).getRules()); POMInfo info = original.newPOMFromRules(allRules, repository); if (hasPackageVersion) { info.getProperties().put("debian.hasPackageVersion", "true"); } if (noParent) { info.setParent(null); } if (repository != null) { try { repository.registerPom(targetPom, info); } catch (DependencyNotFoundException e) { if (!noParent && !ignoreRegisterErrors) { System.err.println("[ERROR] Cannot find parent dependency " + e.getDependency() + ", use --no-parent option to resolve this issue or install the parent POM in the Maven repository"); } } } Dependency parent = noParent ? null : info.getParent(); // Second pass - create the new document // Stack of the XML path currently parsed. Most deepest XML element is first in the list. TreePath path = new TreePath(); int inIgnoredElement = 0; int inCopyOnlyElement = 0; int inDependency = 0; int inExclusion = 0; int inExtension = 0; int inPlugin = 0; int inProperties = 0; boolean sawVersion = false; List dependencyList = null; int dependencyIndex = -1; Map dependencyIndexes = new HashMap(); int moduleDependencyIndex = 0; Set visitedProperties = new HashSet(); Dependency dependency = null; Dependency parentDependency = null; String element = null; boolean afterText = false; XMLStreamReader parser = factory.createXMLStreamReader(new BufferedReader(new FileReader(originalPom))); out = new BufferedWriter(new FileWriter(targetPom)); XMLStreamWriter writer = outFactory.createXMLStreamWriter(out); XMLWriterWrapper writerWrapper = new XMLWriterWrapper(writer); writer.writeStartDocument("UTF-8", "1.0"); for (int event = parser.next(); event != XMLStreamConstants.END_DOCUMENT; event = parser.next()) { switch (event) { case XMLStreamConstants.START_ELEMENT: { element = parser.getLocalName(); path.add(element); if (isWriteIgnoredElement(element, path, dependency) || (path.size() == 2 && INFO_ELEMENTS.contains(element))) { inIgnoredElement++; if ("version".equals(element)) { sawVersion = true; } } else if (path.matches("/project/properties") && original.getProperties().isEmpty()) { inIgnoredElement++; } else if (inIgnoredElement > 0) { inIgnoredElement++; } else if (inCopyOnlyElement > 0 | (inPlugin > 0 && ("executions".equals(element) || "configuration".equals(element)) || "goals".equals(element) || "reportSets".equals(element)) || (inDependency > 0 && "exclusions".equals(element))) { inCopyOnlyElement++; writerWrapper.indent(path.size() - 1); writer.writeStartElement(element); copyNsAndAttributes(parser, writer); } else { // Handle the special case of dependencies or plugins which can be ignored // such as test dependencies during a clean operation if ("dependency".equals(element) || "plugin".equals(element) || "extension".equals(element)) { dependency = null; if (path.matches("dependencies/dependency")) { sawVersion = false; DependencyType listSelector = path.match(); if (listSelector != null) { dependencyIndex = inc(dependencyIndexes, listSelector); dependencyList = info.getDependencies().get(listSelector); if (dependency != null) { parentDependency = dependency; } dependency = dependencyList.get(dependencyIndex); } } else if (path.matches("plugins/plugin")) { sawVersion = false; DependencyType listSelector = path.match(); dependencyIndex = inc(dependencyIndexes, listSelector); dependencyList = info.getDependencies().get(listSelector); dependency = dependencyList.get(dependencyIndex); } else if (path.matches("extensions/extension")) { sawVersion = false; int index = inc(dependencyIndexes, EXTENSIONS); dependency = info.getDependencies().get(EXTENSIONS).get(index); } // Skip dependency if we can't find it (== null) if (dependency == null || !acceptDependency(dependency, info)) { inIgnoredElement++; dependency = null; continue; } } if (path.matches("/project/modules/module")) { String module = info.getModules().get(moduleDependencyIndex); ++moduleDependencyIndex; if (!acceptModule(module, originalPom)) { if (verbose) { System.out.println("Ignore module " + module + " in transformed POM"); } inIgnoredElement++; continue; } } writerWrapper.indent(path.size() - 1); writer.writeStartElement(element); copyNsAndAttributes(parser, writer); if (path.matches("/project")) { copyAndFillProjectHeader(parser, writerWrapper, keepPomVersion, info, original, parent, debianPackage); } else if (path.matches("/project/properties")) { inProperties++; } else if (path.matches("/project/properties/*")) { visitedProperties.add(element); inProperties++; } else if ("dependency".equals(element)) { inDependency++; } else if (inExclusion > 0) { inExclusion++; } else if (inDependency > 0) { if ("exclusion".equals(element)) { inExclusion++; } else { inDependency++; } } else if (path.contains("plugin")) { inPlugin++; } else if (path.contains("extension")) { inExtension++; } } break; } case XMLStreamConstants.END_ELEMENT: { path.remove(); if (inIgnoredElement > 0) { inIgnoredElement--; } else { // Attempt to repair missing version information on dependencies if (dependency != null && !sawVersion && inCopyOnlyElement == 0) { if ((inDependency == 1 || inPlugin == 1 || inExtension == 1) && ((parent == null && repository == null) || (repository != null && info.getVersionFromManagementDependency(dependency) == null))) { if (dependency.getVersion() == null && fixVersions) { String version = info.getVersionFromManagementDependency(dependency); if (version == null) { version = "debian"; } Dependency fixedDependency = new Dependency(dependency); fixedDependency.setVersion(version); // Give a chance to customize the version // In maven.rules, you can write: // myDependencyGroup myDependencyArtifact * s/.*/myVersion/ fixedDependency = fixedDependency.applyRules(depRules.get(RULES).getRules()); fixedDependency = fixedDependency.applyRules(depRules.get(AUTOMATIC).getRules()); dependencyList.set(dependencyIndex, fixedDependency); dependency = fixedDependency; } // If we try to fix the version for a plugin, the fix is valid // only if a real version (not 'debian') is forced on that plugin and the plugin is not // declared in any pluginManagement section in this pom or its parents // For simple dependencies, we avoid inserting the version if it's in the dependency management if (null == info.getVersionFromManagementDependency(dependency) && !( inPlugin == 1 && "debian".equals(dependency.getVersion()))) { writerWrapper.writeFilledElement("version", dependency.getVersion(), path.size()); } } } if (inExclusion > 0) { inExclusion--; } else if (inCopyOnlyElement > 0) { inCopyOnlyElement--; } else if (inDependency > 0) { inDependency--; } else if (inPlugin > 0) { inPlugin--; } else if (inExtension > 0) { inExtension--; } if (inDependency + inPlugin + inExtension == 0) { dependency = null; dependencyIndex = -1; dependencyList = null; if (parentDependency != null) { dependency = parentDependency; parentDependency = null; } } if (inProperties > 0) { inProperties--; if (inProperties == 0) { createDebianProperties(info, original, debianPackage, path.size()); writeMissingProperties(writerWrapper, path.size(), info.getProperties(), visitedProperties); } } if (!afterText) { writerWrapper.indent(path.size()); } writer.writeEndElement(); afterText = false; } element = null; break; } case XMLStreamConstants.CHARACTERS: { if (inIgnoredElement == 0) { String value = parser.getText().trim(); if (dependency != null && (inDependency == 2 || inPlugin == 2 || inExtension == 2) && inExclusion == 0) { if ("groupId".equals(element)) { value = dependency.getGroupId(); } else if ("artifactId".equals(element)) { value = dependency.getArtifactId(); } else if ("type".equals(element)) { value = dependency.getType(); } else if ("version".equals(element)) { value = dependency.getVersion(); sawVersion = true; } } else if (inPlugin > 0 && path.matches("configuration/resourceBundles/resourceBundle")) { Dependency embeddedDependency = Dependency.fromCompactNotation(value); if(null != embeddedDependency) { value = embeddedDependency.applyRules(depRules.get(RULES).getRules()).formatCompactNotation(); } } else if (inProperties > 1) { visitedProperties.add(element); } writer.writeCharacters(value); afterText = value != null && value.length() > 0; } break; } case XMLStreamConstants.COMMENT: { if (inIgnoredElement == 0) { writerWrapper.indent(path.size()); writer.writeComment(parser.getText()); } } } // end switch } // end for parser.close(); writer.writeEndDocument(); writer.flush(); writer.close(); info.applyIgnoreRulesOnDependenciesAndPlugins(depRules.get(IGNORE).getRules()); return info; } finally { try { if (out != null) { out.close(); } } catch (IOException ex) { log.log(Level.SEVERE, null, ex); } } } protected boolean shouldWriteRelativePath() { return true; } private void copyAndFillProjectHeader(XMLStreamReader parser, XMLWriterWrapper writerWrapper, boolean keepPomVersion, POMInfo info, POMInfo original, Dependency parent, String debianPackage) throws XMLStreamException { XMLStreamWriter writer = writerWrapper.getWriter(); if (parser.getNamespaceCount() == 0) { writer.writeNamespace(null, "http://maven.apache.org/POM/4.0.0"); writer.writeNamespace("xsi", "http://www.w3.org/2001/XMLSchema-instance"); // The correct URL is http://maven.apache.org/xsd/maven-4.0.0.xsd but // as gcj fails to validate it, we need to replace 4.0.0 with 4_0_0 writer.writeAttribute("xsi", "http://www.w3.org/2001/XMLSchema-instance", "schemaLocation", "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4_0_0.xsd"); } writerWrapper .writeFilledElement("modelVersion", "4.0.0", 1) .writeFilledElement("groupId", info.getThisPom().getGroupId(), 1) .writeFilledElement("artifactId", info.getThisPom().getArtifactId(), 1) .writeFilledElement("version", keepPomVersion ? info.getOriginalVersion() : info.getThisPom().getVersion(), 1) .writeFilledElement("packaging", info.getThisPom().getType(), 1); if (parent != null) { writerWrapper.indent(1); writer.writeStartElement("parent"); writerWrapper .writeFilledElement("groupId", parent.getGroupId(), 2) .writeFilledElement("artifactId", parent.getArtifactId(), 2) .writeFilledElement("version", parent.getVersion(), 2); if (shouldWriteRelativePath() && null != parent.getRelativePath()) { writerWrapper.writeFilledElement("relativePath", parent.getRelativePath(), 2); } writerWrapper.indent(1); writer.writeEndElement(); writerWrapper.indent(1); } if (original.getProperties().isEmpty()) { writer.writeStartElement("properties"); createDebianProperties(info, original, debianPackage, 1); writeMissingProperties(writerWrapper, 1, info.getProperties(), new HashSet()); writerWrapper.indent(1); writer.writeEndElement(); writerWrapper.indent(1); } } private void copyNsAndAttributes(XMLStreamReader parser, XMLStreamWriter writer) throws XMLStreamException { int nbNamespace = parser.getNamespaceCount(); for (int i = 0; i < nbNamespace; i++) { String nsPrefix = parser.getNamespacePrefix(i); String nsURI = parser.getNamespaceURI(i); // Workaround gcj bug // See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40653 try { if (nsPrefix == null || "".equals(nsPrefix)) { writer.writeDefaultNamespace(nsURI); } else { writer.writeNamespace(nsPrefix, nsURI); } } catch (IllegalArgumentException ignore) { } } int nbAttributes = parser.getAttributeCount(); for (int i = 0; i < nbAttributes; i++) { String attrNamespace = parser.getAttributeNamespace(i); String attrPrefix = parser.getAttributePrefix(i); String attrName = parser.getAttributeLocalName(i); String value = parser.getAttributeValue(i); // Workaround gcj bug // See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40653 if (attrNamespace == null) { writer.writeAttribute(attrName, value); } else { writer.writeAttribute(attrPrefix, attrNamespace, attrName, value); } } } protected boolean isWriteIgnoredElement(String element, TreePath path, Dependency dependency) { // if (isDebianBuild() && DEBIAN_BUILD_IGNORED_ELEMENTS.contains(element)) { // System.out.println("Build ignored " + element + " " + printPath(path) + " for " + dependency); // } // if (isBuildWithoutDoc() && DEBIAN_DOC_IGNORED_ELEMENTS.contains(element)) { // System.out.println("Doc ignored " + element + " " + printPath(path) + " for " + dependency); // } // if (WRITE_IGNORED_ELEMENTS.contains(element)) { // System.out.println("Write ignored " + element + " " + printPath(path) + " for " + dependency); // } return path.size() == 1 && (isDebianBuild && DEBIAN_BUILD_IGNORED_ELEMENTS.contains(element)) || (isBuildWithoutDoc && DEBIAN_DOC_IGNORED_ELEMENTS.contains(element)) || WRITE_IGNORED_ELEMENTS.contains(element); } // String printPath(List path) { // StringBuilder sb = new StringBuilder(); // for (Iterator i = path.iterator(); i.hasNext(); ) { // sb.append(i.next()); // if (i.hasNext()) sb.append("/"); // } // return sb.toString(); // } protected boolean acceptDependency(Dependency dependency, POMInfo info) { return dependency.findMatchingRule(depRules.get(IGNORE).getRules()) == null; } private int inc(Map dependencyIndexes, DependencyType selector) { Integer index = dependencyIndexes.get(selector); if (index == null) { index = 0; } else { index = index + 1; } dependencyIndexes.put(selector, index); return index; } protected void createDebianProperties(POMInfo info, POMInfo original, String debianPackage, int inLevel) throws XMLStreamException { info.getProperties().put("debian.originalVersion", info.getOriginalVersion()); if (debianPackage != null) { info.getProperties().put("debian.package", debianPackage); } if (!info.getProperties().containsKey("debian.mavenRules")) { if (publishUsedRule && info.getOriginalPom() != null) { DependencyRule usedRule = info.getOriginalPom().findMatchingRule(depRules.get(RULES).getRules()); if (usedRule != null && !usedRule.equals(TO_DEBIAN_VERSION_RULE) && !usedRule.equals(MAVEN_PLUGINS_KEEP_VERSION_RULE)) { depRules.get(PUBLISHED).add(usedRule); } } if (!depRules.get(PUBLISHED).isEmpty()) { String glue = ",\n" + Strings.repeat("\t", inLevel + 1); info.getProperties().put("debian.mavenRules", Strings.join(depRules.get(PUBLISHED), glue)); } } } protected void writeMissingProperties(XMLWriterWrapper writerWrapper, int inLevel, TreeMap properties, Set visitedProperties) throws XMLStreamException { for (Map.Entry entry: properties.entrySet()) { String property = entry.getKey(); if (!visitedProperties.contains(property)) { writerWrapper.writeFilledOrEmpty(property, entry.getValue(), inLevel + 1); } } } public void setVerbose(boolean verbose) { this.verbose = verbose; if (listOfPOMs != null) { this.listOfPOMs.setVerbose(verbose); } } private boolean acceptModule(String module, File pomFile) { Set modulesToSkip = ignoredModules.get(pomFile.getAbsoluteFile()); return modulesToSkip == null || !modulesToSkip.contains(module); } public static void main(String[] args) { if (args.length == 0 || "-h".equals(args[0]) || "--help".equals(args[0])) { System.out.println("Purpose: Transforms the POM files to use Debian versions."); System.out.println("Usage: [option] "); System.out.println(""); System.out.println("Options:"); System.out.println(" -v, --verbose: be extra verbose"); System.out.println(" -p, --package=: name of the Debian package containing"); System.out.println(" this library"); System.out.println(" -r, --rules=: path to the file containing the"); System.out.println(" extra rules to apply when cleaning the POM"); System.out.println(" -R, --extra-rule=: extra rule to apply when cleaning the POM"); System.out.println(" May occur multiple times, instead of or in addition to -r"); System.out.println(" -u, --published-rules=: path to the file containing the"); System.out.println(" extra rules to publish in the property debian.mavenRules in the cleaned POM"); System.out.println(" -u, --published-rules=: path to the file containing the"); System.out.println(" extra rules to publish in the property debian.mavenRules in the cleaned POM"); System.out.println(" -U, --extra-published-rule=: extra rule to publish in debian.mavenRules"); System.out.println(" May occur multiple times, instead of or in addition to -u"); System.out.println(" -i, --ignore-rules=: path to the file containing the"); System.out.println(" extra rules use to remove certain dependencies from the transformed POM"); System.out.println(" This option can be repeated, in order to have multiple sets of"); System.out.println(" dependencies to ignore, useful in situations such as when the Maven clean"); System.out.println(" target requires more dependencies or plugins to ignore than the build target"); System.out.println(" -I, --extra-ignore-rule=: extra rule used to remove dependencies"); System.out.println(" from the transformed POM"); System.out.println(" May occur multiple times, instead of or in addition to -i"); System.out.println(" --no-rules: don't apply any rules for converting versions, "); System.out.println(" do not even convert versions to the default 'debian' version"); System.out.println(" --no-publish-used-rule: don't publish the rule used to transform"); System.out.println(" a POM's own attributes in debian.mavenRules"); System.out.println(" -e, --set-version=: set the version for the POM,"); System.out.println(" do not use the version declared in the POM file."); System.out.println(" --keep-pom-version: keep the original version of the POMs but, "); System.out.println(" convert all other versions in dependencies and plugins"); System.out.println(" --debian-build: transform during a Debian build, which means that"); System.out.println(" some POM elements will be removed"); System.out.println(" --build-no-docs: transform during a build where no documentation is generated,"); System.out.println(" which means that some POM elements will be removed"); System.out.println(" -m--maven-repo=: location of the Maven repository,"); System.out.println(" used to force the versions of the Maven plugins used in the current"); System.out.println(" POM file with the versions found in the repository"); System.out.println(""); System.out.println("Arguments:"); System.out.println(" poms: location of file containing the list of POM files to process."); System.out.println(" Optional, defaults to debian/$package"); System.out.println(""); System.out.println("Description:"); System.out.println(" Reads the file debian/$package.poms and tranform each POM file"); System.out.println(" listed in the .poms file into a POM file using the Debian versions"); System.out.println(" of the libraries."); return; } POMTransformer transformer = new POMTransformer(); ArgumentsMap argsMap = ArgumentsMap.fromArgs(args); boolean verbose = argsMap.getBooleanLong("verbose"); boolean singlePom = argsMap.getBooleanLong("single"); boolean noParent = argsMap.getBooleanLong("no-parent"); boolean noRules = argsMap.getBooleanLong("no-rules"); boolean keepPomVersion = argsMap.getBooleanLong("keep-pom-version"); transformer.setPublishUsedRule(argsMap.getBooleanLong("no-publish-used-rule")); transformer.setDebianBuild(argsMap.getBooleanLong("debian-build")); transformer.setBuildWithoutDoc(argsMap.getBooleanLong("build-no-docs")); String debianPackage = argsMap.getValue("package", "p", ""); String setVersion = argsMap.getValue("set-version", "e", null); File mavenRepo = argsMap.getFile("maven-repo", "m", null); transformer.setVerbose(verbose); ListOfPOMs listOfPOMs; if (singlePom) { String pomPath = argsMap.getFirstArgument(); listOfPOMs = new ListOfPOMs(); ListOfPOMs.POMOptions options = listOfPOMs.addPOM(pomPath); options.setNoParent(noParent); } else { String pomsFileName = argsMap.getFirstArgument("debian/" + debianPackage + ".poms"); listOfPOMs = new ListOfPOMs(new File(pomsFileName)); } transformer.setListOfPOMs(listOfPOMs); if (noRules) { transformer.getRulesFiles().get(RULES).add(NO_CHANGE_RULE); } else { transformer.setRulesFiles(DependencyRuleSetFiles.fromCLIArguments(argsMap, verbose)); if (keepPomVersion) { transformer.keepPomVersions(); } transformer.getRulesFiles().addDefaultRules(); } if (mavenRepo != null) { Repository repository = new Repository(mavenRepo); transformer.setRepository(repository); transformer.usePluginVersionsFromRepository(); } transformer.transformPoms(debianPackage, keepPomVersion, setVersion); } } maven-repo-helper-1.8.5/src/main/java/org/debian/maven/repo/RepositoryReportWriter.java0000644000000000000000000000255612247273474026120 0ustar /* * Copyright 2011 Damien Raude-Morvan. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.debian.maven.repo; /** * Interface of any check's output. * * @author Damien Raude-Morvan */ public interface RepositoryReportWriter { /** * Print start part of any Item * * @param string content of message to print */ void printItem(String string); /** * Print end part of any Item */ void endItem(); /** * Print start of a report section * * @param string content of message to print */ void printSectionStart(String string); /** * Print end of a report section */ void printSectionEnd(); /** * Print end footer of the report */ void printEnd(); /** * Print start header of the report */ void printStart(); } maven-repo-helper-1.8.5/src/main/java/org/debian/maven/repo/POMInfo.java0000644000000000000000000003001012247273474022601 0ustar /* * Copyright 2009 Ludovic Claude. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.debian.maven.repo; import java.util.*; import static org.debian.maven.repo.POMInfo.DependencyType.*; /** * @author Ludovic Claude */ public class POMInfo implements Cloneable { private String originalParentVersion; private Dependency originalPom; private Dependency parent; private Dependency thisPom; private List modules; private Map> dependencies = POMInfo.initDependenciesMultiMap(); // Use a TreeMap to guarantee ordering of the keys. private TreeMap properties; private POMInfo parentPOM; public Dependency getOriginalPom() { return originalPom; } public void setOriginalPom(Dependency originalPom) { this.originalPom = originalPom; } public String getOriginalVersion() { if (originalPom != null) { return originalPom.getVersion(); } return thisPom.getVersion(); } public String getOriginalParentVersion() { return originalParentVersion; } public void setOriginalParentVersion(String originalParentVersion) { this.originalParentVersion = originalParentVersion; } public Dependency getParent() { return parent; } public void setParent(Dependency parent) { this.parent = parent; } public Dependency getThisPom() { return thisPom; } public void setThisPom(Dependency thisPom) { this.thisPom = thisPom; } public List getModules() { return modules; } public void setModules(List modules) { this.modules = modules; } public TreeMap getProperties() { return properties; } public void setProperties(Map properties) { this.properties = new TreeMap(properties); } public Set getPublishedRules() { Set rules = new TreeSet(); if (getProperties() == null) { return rules; } String mavenRules = getProperties().get("debian.mavenRules"); if (mavenRules != null) { for(String ruleString : mavenRules.split(",")) { rules.add(new DependencyRule(ruleString.trim())); } } return rules; } public Map> getDependencies() { return dependencies; } public void setDependencies(Map> dependencies) { this.dependencies = dependencies; } /** * Create a new POM from the current POM, and apply all rules on the dependencies and parent POM * @param rules The list of rules to apply * @see #applyRulesOnParent(java.util.Collection, Repository) */ public POMInfo newPOMFromRules(Collection rules, Repository repository) { if (rules.isEmpty()) { return this; } POMInfo result = new POMInfo(); result.setOriginalPom(getThisPom()); result.setThisPom(getThisPom().applyRules(rules)); Map> dependencies = new EnumMap>(DependencyType.class); for(DependencyType depType : DependencyType.values()) { dependencies.put(depType, Dependency.applyRules(this.dependencies.get(depType), rules)); } result.setDependencies(dependencies); result.setProperties(new TreeMap(getProperties())); result.setModules(getModules()); result.setParent(getParent()); result.applyRulesOnParent(rules, repository); return result; } public void applyRulesOnParent(Collection rules, Repository repository) { if (getParent() != null) { //System.out.println(this.getThisPom() + ": Apply rules on parent " + getParent() + " using repository " + repository); setOriginalParentVersion(getParent().getVersion()); setParent(getParent().applyRules(rules)); if (repository != null) { POMInfo newParentPOM = repository.getPOM(getParent()); setParentPOM(newParentPOM); } else { // Always apply rules //System.out.println(this.getThisPom() + ": Parent is not registered in repository, apply rules anyway"); } } } public void applyRulesOnDependenciesAndPlugins(Collection rules) { for(DependencyType depType : DependencyType.values()) { dependencies.put(depType, Dependency.applyRules(dependencies.get(depType), rules)); } } public void applyIgnoreRulesOnDependenciesAndPlugins(Set rules) { for(DependencyType depType : DependencyType.values()) { dependencies.put(depType, Dependency.applyIgnoreRules(dependencies.get(depType), rules)); } } public void setParentPOM(POMInfo parentPOM) { this.parentPOM = parentPOM; if (parentPOM != null) { if (this.parent == null) { this.parent = parentPOM.getThisPom(); } mergeManagement(dependencies.get(DEPENDENCY_MANAGEMENT_LIST), parentPOM.getDependencies().get(DEPENDENCY_MANAGEMENT_LIST)); mergeManagement(dependencies.get(PLUGIN_MANAGEMENT), parentPOM.getDependencies().get(PLUGIN_MANAGEMENT)); } resolveVersions(dependencies.get(DEPENDENCIES), dependencies.get(DEPENDENCY_MANAGEMENT_LIST)); resolveVersions(dependencies.get(PLUGIN_DEPENDENCIES), dependencies.get(DEPENDENCY_MANAGEMENT_LIST)); resolveVersions(dependencies.get(PLUGIN_DEPENDENCIES), dependencies.get(PLUGIN_MANAGEMENT_DEPENDENCIES)); resolveVersions(dependencies.get(PLUGINS), dependencies.get(PLUGIN_MANAGEMENT)); resolveVersions(dependencies.get(REPORTING_PLUGINS), dependencies.get(PLUGIN_MANAGEMENT)); resolveVersions(dependencies.get(PROFILE_DEPENDENCIES), dependencies.get(PROFILE_DEPENDENCY_MANAGEMENT_LIST)); resolveVersions(dependencies.get(PROFILE_PLUGINS), dependencies.get(PROFILE_PLUGIN_MANAGEMENT)); } private void mergeManagement(List target, List management) { resolveVersions(target, management); nextParentDep: for (Dependency parentDep: management) { for (Dependency dependency: target) { if (dependency.equalsIgnoreVersion(parentDep)) { continue nextParentDep; } } target.add(new Dependency(parentDep)); } } public String getVersionFromManagementDependency(Dependency dependency) { for (DependencyType depType: Arrays.asList(DEPENDENCY_MANAGEMENT_LIST, PLUGIN_MANAGEMENT, PLUGIN_MANAGEMENT_DEPENDENCIES)) { for (Dependency mgtDep: dependencies.get(depType)) { if (mgtDep.equalsIgnoreVersion(dependency) ) { if (mgtDep.getVersion() != null) { //System.out.println("In " + getThisPom() + " - found version " + mgtDep.getVersion() + " for " + // dependency.getGroupId() + ":" + dependency.getArtifactId() + " according to the list of " + listType); return mgtDep.getVersion(); } } } } if (parentPOM != null) { return parentPOM.getVersionFromManagementDependency(dependency); } return null; } private void resolveVersions(List deps, List management) { for (Dependency parentDep: management) { for (Dependency dependency: deps) { if (dependency.getVersion() == null || !dependency.isScopeDefined()) { if (dependency.getGroupId().equals(parentDep.getGroupId()) && dependency.getArtifactId().equals(parentDep.getArtifactId()) && dependency.getType().equals(parentDep.getType())) { if (dependency.getVersion() == null) { //System.out.println("In " + getThisPom() + " - resolve version to " + parentDep.getVersion() + " for " + // dependency.getGroupId() + ":" + dependency.getArtifactId() + " according to parent POM"); dependency.setVersion(parentDep.getVersion()); } if (!dependency.isScopeDefined()) { dependency.setScope(parentDep.getScope()); } break; } } } } } public Object clone() throws CloneNotSupportedException { POMInfo clone = new POMInfo(); clone.originalParentVersion = originalParentVersion; clone.originalPom = originalPom; clone.parent = parent; clone.thisPom = (Dependency) thisPom.clone(); clone.modules = modules; // TODO this doesn't really make sense. We should do a deep copy here. // But lets see first, who uses the clone method! clone.dependencies = dependencies; clone.properties = properties; clone.parentPOM = parentPOM; return clone; } public static Map> initDependenciesMultiMap() { Map> dependencies = new EnumMap>(DependencyType.class); for (DependencyType depType : DependencyType.values()) { dependencies.put(depType, new ArrayList()); } return dependencies; } public enum DependencyType { // The order of the patterns is important! More specific patterns first! DEPENDENCY_MANAGEMENT_LIST("/project/dependencyManagement/dependencies/dependency"), PROFILE_DEPENDENCY_MANAGEMENT_LIST("profile/dependencyManagement/dependencies/dependency"), DEPENDENCIES("/project/dependencies/dependency"), PROFILE_DEPENDENCIES("profile/dependencies/dependency"), PLUGIN_DEPENDENCIES("/project/*/*/plugin/dependencies/dependency"), PLUGIN_MANAGEMENT_DEPENDENCIES("build/*/*/plugin/dependencies/dependency"), PROFILE_PLUGIN_DEPENDENCIES("profile/*/*/plugin/dependencies/dependency"), PROFILE_PLUGIN_MANAGEMENT("profile/*/pluginManagement/plugins/plugin"), PLUGIN_MANAGEMENT("pluginManagement/plugins/plugin"), PROFILE_REPORTING_PLUGINS("profile/reporting/plugins/plugin"), REPORTING_PLUGINS("reporting/plugins/plugin"), PROFILE_PLUGINS("profile/*/*/plugin"), PLUGINS("plugin"), EXTENSIONS("extension"); private static final Map byPatternMap = new HashMap(); static { for(DependencyType type : values()) { byPatternMap.put(type.pattern, type); } } public final String pattern; DependencyType(String pattern) { this.pattern = pattern; } Dependency dependencyPrototype() { if (pattern.endsWith("plugin")) { return new Dependency(Dependency.PROTO_PLUGIN); } else { return new Dependency(Dependency.PROTO_JAR); } } public DependencyType byPattern(String pattern) { return byPatternMap.get(pattern); } } } maven-repo-helper-1.8.5/src/main/java/org/debian/maven/repo/POMCleaner.java0000644000000000000000000005140112247273474023266 0ustar /* * Copyright 2009 Ludovic Claude. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.debian.maven.repo; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.util.*; import java.util.logging.Level; import java.util.logging.Logger; import javax.xml.stream.XMLStreamException; import org.debian.maven.repo.POMInfo.DependencyType; import static org.debian.maven.repo.DependencyRuleSetFiles.RulesType.*; /** * Cleans up a POM for inclusion in the /usr/share/maven-repo/ repository. * * All POMs should contain only * * @author Ludovic Claude */ public class POMCleaner extends POMTransformer { private static final Logger log = Logger.getLogger(POMCleaner.class.getName()); private static final List WRITE_IGNORED_ELEMENTS = Arrays.asList("build", "distributionManagement", "profiles", "ciManagement", "prerequisites", "repositories", "pluginRepositories", "reports", "reporting", "modelVersion", "parent"); private boolean keepAllElements = false; private Collection keepElements = new ArrayList(); public POMCleaner() { } public boolean isKeepAllElements() { return keepAllElements; } public void setKeepAllElements(boolean keepAllElements) { this.keepAllElements = keepAllElements; } public void addElementToKeep(String element) { keepElements.add(element); } public void cleanPom(File originalPom, File targetPom, File pomProperties, boolean noParent, boolean hasPackageVersion, boolean keepPomVersion, boolean keepParentVersion, String setVersion, String debianPackage) { if (targetPom.getParentFile() != null) { targetPom.getParentFile().mkdirs(); } if (pomProperties.getParentFile() != null) { pomProperties.getParentFile().mkdirs(); } try { POMInfo info = transformPom(originalPom, targetPom, noParent, hasPackageVersion, keepPomVersion, keepParentVersion, setVersion, debianPackage); Properties pomProps = new Properties(); pomProps.put("groupId", info.getThisPom().getGroupId()); pomProps.put("artifactId", info.getThisPom().getArtifactId()); pomProps.put("type", info.getThisPom().getType()); pomProps.put("version", info.getOriginalVersion()); pomProps.put("debianVersion", info.getThisPom().getVersion()); pomProps.put("classifier", info.getThisPom().getClassifier()); FileOutputStream pomWriter = new FileOutputStream(pomProperties); pomProps.store(pomWriter, "POM properties"); pomWriter.close(); } catch (IOException ex) { log.log(Level.SEVERE, null, ex); } catch (XMLStreamException ex) { log.log(Level.SEVERE, null, ex); } } protected void transformingPom(POMInfo pom) { if (pom.getThisPom().isPlugin()) { getRulesFiles().get(IGNORE).add(new DependencyRule(pom.getThisPom().getGroupId() + " " + pom.getThisPom().getArtifactId() + " maven-plugin s/.*/" + pom.getThisPom().getVersion() + "/")); } } @Override protected boolean shouldWriteRelativePath() { return false; } @Override protected boolean isWriteIgnoredElement(String element, TreePath path, Dependency dependency) { if (path.matches("parent/relativePath")) { return true; } boolean ignore = super.isWriteIgnoredElement(element, path, dependency); if (keepAllElements || ignore) { return ignore; } if (keepElements.contains(element)) { return false; } if (path.size() > 2 && keepElements.contains(path.get(1))) { if ("version".equals(element)) { if ("plugin".equals(path.parent(1))) { return true; } } } // if (WRITE_IGNORED_ELEMENTS.contains(element)) { // System.out.println("Write ignored " + element + " " + printPath(path) + " for " + dependency); // } return path.size() == 2 && WRITE_IGNORED_ELEMENTS.contains(element); } protected boolean acceptDependency(Dependency dependency, POMInfo info) { return super.acceptDependency(dependency, info) && (info.getThisPom().isPom() || !"test".equals(dependency.getScope())); } protected void createDebianProperties(POMInfo info, POMInfo original, String debianPackage, int inLevel) throws XMLStreamException { super.createDebianProperties(info, original, debianPackage, inLevel); for (Dependency dependency : original.getDependencies().get(DependencyType.DEPENDENCIES)) { if (dependency.getVersion() != null) { String versionProperty = "debian." + dependency.getGroupId() + "." + dependency.getArtifactId() + ".originalVersion"; info.getProperties().put(versionProperty, dependency.getVersion()); } } } public static void main(String[] args) { if (args.length == 0 || "-h".equals(args[0]) || "--help".equals(args[0])) { System.out.println("Purpose: cleans a Maven POM for inclusion in the Debian/Maven repository in /usr/share/maven-repo"); System.out.println("Usage: [option] original-pom target-file pom-properties"); System.out.println(""); System.out.println("Options:"); System.out.println(" -v, --verbose: be extra verbose"); System.out.println(" -o, --no-parent: don't inherit from a parent POM"); System.out.println(" -p, --package=: name of the Debian package containing"); System.out.println(" this library"); System.out.println(" -h --has-package-version: flag that indicates that this POM has the"); System.out.println(" same version as the package, this helps packagers of depending packages"); System.out.println(" -r, --rules=: path to the file containing the"); System.out.println(" extra rules to apply when cleaning the POM"); System.out.println(" -R, --extra-rule=: extra rule to apply when cleaning the POM"); System.out.println(" May occur multiple times, instead of or in addition to -r"); System.out.println(" -u, --published-rules=: path to the file containing the"); System.out.println(" extra rules to publish in the property debian.mavenRules in the cleaned POM"); System.out.println(" -U, --extra-published-rule=: extra rule to publish"); System.out.println(" May occur multiple times, instead of or in addition to -u"); System.out.println(" -i, --ignore-rules=: path to the file containing the"); System.out.println(" extra rules use to remove certain dependencies from the transformed POM"); System.out.println(" This option can be repeated, in order to have multiple sets of"); System.out.println(" dependencies to ignore, useful in situations such as when the Maven clean"); System.out.println(" target requires more dependencies or plugins to ignore than the build target"); System.out.println(" -I, --extra-ignore-rule=: extra rule used to remove dependencies"); System.out.println(" from the transformed POM"); System.out.println(" May occur multiple times, instead of or in addition to -i"); System.out.println(" --no-rules: don't apply any rules for converting versions, "); System.out.println(" do not even convert versions to the default 'debian' version"); System.out.println(" --no-publish-used-rule: don't publish the rule used to transform"); System.out.println(" a POM's own attributes in debian.mavenRules"); System.out.println(" -e, --set-version=: set the version for the POM,"); System.out.println(" do not use the version declared in the POM file."); System.out.println(" --keep-pom-version: keep the original version of the POM but"); System.out.println(" convert all other versions in dependencies and plugins"); System.out.println(" --keep-parent-version: keep the version of the parent in the POM but"); System.out.println(" convert all other versions in dependencies and plugins"); System.out.println(" --keep-all-elements: keep all elements in the POM, do a version"); System.out.println(" transformation only, don't delete the build and other elements."); System.out.println(" --keep-elements=: keep the elements listed here"); System.out.println(" even if they are normally removed by the clean operation."); System.out.println(" Such elements are build,reports,reporting,prerequisites,profiles."); System.out.println(" -m--maven-repo=: location of the Maven repository,"); System.out.println(" used to force the versions of the Maven plugins used in the current"); System.out.println(" POM file with the versions found in the repository"); System.out.println(""); System.out.println("Arguments:"); System.out.println(" original-pom: location of the original POM"); System.out.println(" target-file: where the cleaned POM will be written to"); System.out.println(" pom-properties: property file where the POM properties will be written to"); System.out.println(""); System.out.println("Description:"); System.out.println(" Cleans a Maven POM and prepare it for inclusion in the Debian"); System.out.println(" repository for Maven."); System.out.println(); System.out.println(" The POM will be normalised, and its parent tag removed if the option"); System.out.println(" --no-parent is given. The version will be replaced by 'debian', unless"); System.out.println(" a special rule applies (see below the discussion about rules)."); System.out.println(" Build, profiles and other build time only sections of the POM"); System.out.println(" will be stripped."); System.out.println(); System.out.println(" If versions are given for a dependency, this version will be"); System.out.println(" replaced by the 'debian' version, or a rule can be given to"); System.out.println(" use a custom version"); System.out.println(); System.out.println(" You can modify those defaults with the help of the"); System.out.println(" rules file. This file should contain the lines with the format:"); System.out.println(" [artifactId] [type] [version]"); System.out.println(" where groupId, artifactId, type and version can be the explicit attribute to"); System.out.println(" match, or can contain a wildcard (*) for generic matches."); System.out.println(); System.out.println(" Each one of those elements can also be a replace rule, of the form"); System.out.println(" s/// where regex is a regular expression, and replace"); System.out.println(" is the replacement. Substitution groups $1 $2... can be used in the"); System.out.println(" replacement if capture groups () have been used in the regex."); System.out.println(); System.out.println(" The first element is mandatory (groupId), but you can ignore the following"); System.out.println(" elements."); System.out.println(" If the version is missing, then any version will be replaced with 'debian'."); System.out.println(" If type is missing, then any type is matched."); System.out.println(" If artifactId is missing, then any artifactId is matched."); System.out.println(); System.out.println(" You can also have comments in this file, it should be a line starting with #"); System.out.println(); System.out.println(" Example of a rules file:"); System.out.println(); System.out.println(" s/commons-(.*)/org.apache.commons.commons$1/"); System.out.println(" org.itext * * s/1\\..*/1.x/"); System.out.println(" org.itext * * s/2\\..*/2.x/"); System.out.println(" org.codehaus.plexus plexus-container-default jar s/1\\.0-alpha-.*/1.0-alpha/"); System.out.println(); System.out.println(" This rules file does the following:"); System.out.println(" - all groupIds starting with commons- will have org.apache.commons. prefixed to them"); System.out.println(" - any artifact in the org.itext group with a version number starting with 1. will"); System.out.println(" use the 1.x version"); System.out.println(" - any artifact in the org.itext group with a version number starting with 2. will"); System.out.println(" use the 2.x version"); System.out.println(" - the jar with groupId=org.codehaus.plexus and artifactId=plexus-container-default and a"); System.out.println(" version starting with 1.0-alpha- will use the 1.0-alpha version"); System.out.println(); System.out.println(" The default rule (* * * s/.*/debian/) replaces any version number with"); System.out.println(" the 'debian' version and always applies last if there was no other matches."); System.out.println(); System.out.println(" Any rules given on the command line (using -R/--extra-rule,"); System.out.println(" -U/--extra-published-rule or -I/--extra-ignore-rule) are applied"); System.out.println(" in the order given, in between the rules given in the rules file"); System.out.println(" (if any) and the default rules."); return; } POMCleaner cleaner = new POMCleaner(); int i = inc(-1, args); boolean verbose = false; boolean noParent = false; boolean noRules = false; boolean hasPackageVersion = false; boolean keepPomVersion = false; boolean keepParentVersion = false; boolean keepAllElements = false; String debianPackage = ""; String setVersion = null; File rulesFile = null; File publishedRulesFile = null; File mavenRepo = null; List rulesExtra = new ArrayList(); List publishedRulesExtra = new ArrayList(); List ignoreRulesExtra = new ArrayList(); List ignoreRulesFiles = new ArrayList(); while (i < args.length && (args[i].trim().startsWith("-") || args[i].trim().length() == 0)) { String arg = args[i].trim(); if ("--verbose".equals(arg) || "-v".equals(arg)) { verbose = true; } else if ("--no-parent".equals(arg) || "-o".equals(arg)) { noParent = true; } else if ("--no-rules".equals(arg)) { noRules = true; } else if ("--no-publish-used-rule".equals(arg)) { cleaner.setPublishUsedRule(false); } else if ("--has-package-version".equals(arg) || "-h".equals(arg)) { hasPackageVersion = true; } else if ("--keep-pom-version".equals(arg)) { keepPomVersion = true; } else if ("--keep-parent-version".equals(arg)) { keepParentVersion = true; } else if ("--keep-all-elements".equals(arg)) { keepAllElements = true; } else if (arg.startsWith("--keep-elements=")) { String keepElements = arg.substring("--keep-elements=".length()); StringTokenizer st = new StringTokenizer(keepElements, ","); while (st.hasMoreTokens()) { cleaner.addElementToKeep(st.nextToken()); } } else if (arg.startsWith("-p")) { debianPackage = arg.substring(2); } else if (arg.startsWith("--package=")) { debianPackage = arg.substring("--package=".length()); } else if (arg.startsWith("-r")) { rulesFile = new File(arg.substring(2)); } else if (arg.startsWith("--rules=")) { rulesFile = new File(arg.substring("--rules=".length())); } else if (arg.startsWith("-R")) { rulesExtra.add(arg.substring(2)); } else if (arg.startsWith("--extra-rule=")) { rulesExtra.add(arg.substring("--extra-rule=".length())); } else if (arg.startsWith("-u")) { publishedRulesFile = new File(arg.substring(2)); } else if (arg.startsWith("--published-rules=")) { publishedRulesFile = new File(arg.substring("--published-rules=".length())); } else if (arg.startsWith("-U")) { publishedRulesExtra.add(arg.substring(2)); } else if (arg.startsWith("--extra-published-rule=")) { publishedRulesExtra.add(arg.substring("--extra-published-rule=".length())); } else if (arg.startsWith("-i") || arg.startsWith("--ignore-rules=")) { if (arg.startsWith("-i")) { ignoreRulesFiles.add(new File(arg.substring(2))); } else { ignoreRulesFiles.add(new File(arg.substring("--ignore-rules=".length()))); } } else if (arg.startsWith("-I")) { ignoreRulesExtra.add(arg.substring(2)); } else if (arg.startsWith("--extra-ignore-rule=")) { ignoreRulesExtra.add(arg.substring("--extra-ignore-rule=".length())); } else if (arg.startsWith("-e")) { setVersion = arg.substring(2); } else if (arg.startsWith("--set-version=")) { setVersion = arg.substring("--set-version=".length()); } else if (arg.startsWith("-m")) { mavenRepo = new File(arg.substring(2)); } else if (arg.startsWith("--maven-repo=")) { mavenRepo = new File(arg.substring("--maven-repo=".length())); } i = inc(i, args); } File originalPom = new File(args[i++].trim()); File targetPom = new File(args[i++].trim()); File pomProperties = new File(args[i++].trim()); if (verbose) { System.out.println("Cleaning POM " + originalPom.getAbsolutePath() + ", saving the result into " + targetPom.getAbsolutePath()); } if (!noRules) { DependencyRuleSet rules = cleaner.getRulesFiles().get(RULES); rules.addAll(DependencyRuleSet.readRules(rulesFile, "", verbose, true)); rules.addAll(rulesExtra); DependencyRuleSet ignoreRules = cleaner.getRulesFiles().get(IGNORE); for(File ignoreRulesFile : ignoreRulesFiles) { ignoreRules.addAll(DependencyRuleSet.readRules(ignoreRulesFile, "", verbose, true)); } ignoreRules.addAll(ignoreRulesExtra); DependencyRuleSet publishedRules = cleaner.getRulesFiles().get(PUBLISHED); publishedRules.addAll(DependencyRuleSet.readRules(publishedRulesFile, "", verbose, true)); publishedRules.addAll(publishedRulesExtra); cleaner.getRulesFiles().addDefaultRules(); } if (mavenRepo != null) { Repository repository = new Repository(mavenRepo); cleaner.setRepository(repository); cleaner.usePluginVersionsFromRepository(); } cleaner.setKeepAllElements(keepAllElements); cleaner.cleanPom(originalPom, targetPom, pomProperties, noParent, hasPackageVersion, keepPomVersion, keepParentVersion, setVersion, debianPackage); } private static int inc(int i, String[] args) { do { i++; } while (i < args.length && args[i].length() == 0); return i; } } maven-repo-helper-1.8.5/src/main/java/org/debian/maven/repo/POMHandler.java0000644000000000000000000000161412247273474023273 0ustar /* * Copyright 2009 Ludovic Claude. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.debian.maven.repo; import java.io.File; /** * @author Ludovic Claude */ public interface POMHandler { void handlePOM(File pomFile, boolean noParent, boolean hasPackageVersion) throws Exception; void ignorePOM(File pomFile) throws Exception; } maven-repo-helper-1.8.5/src/main/java/org/debian/maven/repo/DependencyRuleSet.java0000644000000000000000000001240412247273474024723 0ustar /* * Copyright 2009 Ludovic Claude. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.debian.maven.repo; import java.io.*; import java.util.*; import java.util.logging.Level; import java.util.logging.Logger; /** * @author Ludovic Claude */ public class DependencyRuleSet implements Iterable { static final DependencyRule TO_DEBIAN_VERSION_RULE = new DependencyRule(""); static final DependencyRule MAVEN_PLUGINS_KEEP_VERSION_RULE = new DependencyRule("* * maven-plugin * * *"); static final DependencyRule NO_CHANGE_RULE = new DependencyRule("* * * * * *"); private static final Logger log = Logger.getLogger(DependencyRuleSet.class.getName()); private final Set rules; private final String description; public Set getRules() { return rules; } public DependencyRuleSet(Set rules, String description) { this.rules = rules; this.description = description; } public DependencyRuleSet(String description) { this(new TreeSet(), description); } public DependencyRuleSet() { this(""); } public Iterator iterator() { return getRules().iterator(); } public boolean isEmpty() { return getRules().isEmpty(); } public void add(DependencyRule rule) { getRules().add(rule); } public void addAll(DependencyRuleSet newRules) { for (DependencyRule rule: newRules) { add(rule); } } public void addAll(Collection newRules) { for (Object rule : newRules) { if (rule instanceof DependencyRule) { add((DependencyRule) rule); } else { add(new DependencyRule((String) rule)); } } } @Deprecated public void remove(DependencyRule rule) { getRules().remove(rule); } public Set findMatchingRules(Dependency dependency) { Set matchingRules = new HashSet(); for (DependencyRule rule : rules) { if (rule.matches(dependency)) { matchingRules.add(rule); } } return matchingRules; } public void saveToFile(File rulesFile, DependencyRuleSet dontDuplicate) { try { PrintWriter out = new PrintWriter(new FileWriter(rulesFile)); out.println(description); for (DependencyRule rule: getRules()) { if ((dontDuplicate == null || !dontDuplicate.getRules().contains(rule)) // Don't save implicit rules && !TO_DEBIAN_VERSION_RULE.equals(rule) && !MAVEN_PLUGINS_KEEP_VERSION_RULE.equals(rule)) { out.println(rule.toString()); } } out.flush(); out.close(); } catch (IOException ex) { log.log(Level.SEVERE, null, ex); } } public void dump() { if (rules != null) { // System.out.println(name + ":"); for (DependencyRule rule : rules) { System.out.println(" " + rule); } System.out.println("---------"); } } public static DependencyRuleSet readRules(File rulesFile, String description, boolean verbose, boolean warnRulesFileNotFound) { DependencyRuleSet rules = new DependencyRuleSet(description); if (rulesFile == null) { return rules; } if (!rulesFile.exists()) { if (verbose && warnRulesFileNotFound) { String descr = description; if (description == null || description.isEmpty()) { descr = "Rules"; } System.out.println(descr + " file does not exist: " + rulesFile.getAbsolutePath()); } return rules; } try { if (verbose) { System.out.println(rulesFile.getName() + ":"); } BufferedReader lnr = new BufferedReader(new FileReader(rulesFile)); String line; while ((line = lnr.readLine()) != null) { line = line.trim(); if (line.length() > 0 && !line.startsWith("#")) { if (verbose) { System.out.println(" " + line); } rules.add(new DependencyRule(line)); } } if (verbose) { System.out.println("---------"); } lnr.close(); } catch (IOException ex) { log.log(Level.SEVERE, null, ex); } return rules; } } maven-repo-helper-1.8.5/src/main/java/org/debian/maven/repo/POMReader.java0000644000000000000000000003344712247273474023131 0ustar /* * Copyright 2009 Ludovic Claude. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.debian.maven.repo; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.Reader; import java.util.ArrayList; import java.util.Arrays; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.TreeMap; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamConstants; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamReader; import org.debian.maven.repo.POMInfo.DependencyType; /** * Reads relevant information from the POM. * * @author Ludovic Claude * @author Damien Raude-Morvan */ public class POMReader { private static final List READ_IGNORED_ELEMENTS = Arrays.asList( "distributionManagement", "ciManagement", "prerequisites", "exclusions", "repositories", "pluginRepositories", "reports", "modelVersion"); private static final List PLUGIN_IGNORED_ELEMENTS = Arrays.asList( "executions", "configuration", "goals", "reportSets" ); protected final XMLInputFactory factory = XMLInputFactory.newInstance(); public POMInfo readPom(File originalPom) throws XMLStreamException, FileNotFoundException { if (!originalPom.exists()) { System.err.println("Cannot find pom file " + originalPom.getAbsolutePath()); } return readPom(new FileReader(originalPom)); } public POMInfo readPom(Reader originalPom) throws XMLStreamException { XMLStreamReader parser = factory.createXMLStreamReader(new BufferedReader(originalPom)); // Stack of the XML path currently parsed. Most deepest XML element is first in the list. TreePath path = new TreePath(); // http://maven.apache.org/pom.html#Aggregation: // "the ordering of the modules [...] is not important" // However the POMTransformer depends on the ordering... List modules = new ArrayList(); Map properties = new TreeMap(); Map> dependencies = POMInfo.initDependenciesMultiMap(); Dependency thisPom = new Dependency(Dependency.PROTO_JAR); Dependency parent = null; Dependency currentDependency = null; int inIgnoredElement = 0; String element = null; StringBuilder buffer = null; // First pass - collect version and parent information for (int event = parser.next(); event != XMLStreamConstants.END_DOCUMENT; event = parser.next()) { switch (event) { case XMLStreamConstants.START_ELEMENT: { buffer = null; element = parser.getLocalName(); path.add(element); if (isReadIgnoredElement(element) || (path.contains("plugin") && PLUGIN_IGNORED_ELEMENTS.contains(element)) || (path.contains("dependency") && "exclusions".equals(element)) || inIgnoredElement > 0) { inIgnoredElement++; } else if ("dependency".equals(element) || "plugin".equals(element) || path.matches("extension")) { DependencyType depType = path.match(); if(depType != null) { currentDependency = new Dependency(depType.dependencyPrototype()); dependencies.get(depType).add(currentDependency); } } else if (path.size() == 2 && "parent".equals(element)) { parent = new Dependency(null, null, "pom", null); } break; } case XMLStreamConstants.END_ELEMENT: { String value = buffer != null ? buffer.toString().trim() : null; if (inIgnoredElement > 0 || path.contains("exclusions")) { // ignore } else if (path.contains("dependency") || path.contains("plugin") || path.contains("extension")) { if ("groupId".equals(element)) { currentDependency.setGroupId(value); } else if ("artifactId".equals(element)) { currentDependency.setArtifactId(value); } else if ("type".equals(element)) { currentDependency.setType(value); } else if ("version".equals(element)) { currentDependency.setVersion(value); } else if ("optional".equals(element)) { currentDependency.setOptional("true".equals(value)); } else if ("scope".equals(element)) { currentDependency.setScope(value); } else if ("classifier".equals(element)) { currentDependency.setClassifier(value); } } else if (path.size() == 3 && "modules".equals(path.parent(1))) { // we're not interested in the modules section inside a profiles section modules.add(value); } else if (path.size() == 3 && "parent".equals(path.parent(1))) { if ("groupId".equals(element)) { parent.setGroupId(value); } else if ("artifactId".equals(element)) { parent.setArtifactId(value); } else if ("version".equals(element)) { parent.setVersion(value); } else if ("relativePath".equals(element)) { parent.setRelativePath(value); } } else if (path.size() == 3 && "properties".equals(path.parent(1))) { properties.put(element, value != null ? value : "true"); } else if (path.size() == 2 && inIgnoredElement == 0) { if ("groupId".equals(element)) { thisPom.setGroupId(value); } else if ("artifactId".equals(element)) { thisPom.setArtifactId(value); } else if ("packaging".equals(element)) { thisPom.setType(value); } else if ("version".equals(element)) { thisPom.setVersion(value); } } path.remove(); if (inIgnoredElement > 0) { inIgnoredElement--; } element = null; buffer = null; break; } case XMLStreamConstants.CDATA: case XMLStreamConstants.CHARACTERS: { if (buffer == null) { buffer = new StringBuilder(); } buffer.append(parser.getText()); break; } } // end switch } // end for parser.close(); if (thisPom.getGroupId() == null && parent != null) { thisPom.setGroupId(parent.getGroupId()); } if (thisPom.getVersion() == null && parent != null) { thisPom.setVersion(parent.getVersion()); } Map inferedProperties = new TreeMap(properties); inferedProperties.put("pom.groupId", thisPom.getGroupId()); inferedProperties.put("project.groupId", thisPom.getGroupId()); inferedProperties.put("groupId", thisPom.getGroupId()); inferedProperties.put("pom.artifactId", thisPom.getArtifactId()); inferedProperties.put("project.artifactId", thisPom.getArtifactId()); inferedProperties.put("artifactId", thisPom.getArtifactId()); inferedProperties.put("pom.version", thisPom.getVersion()); inferedProperties.put("project.version", thisPom.getVersion()); inferedProperties.put("version", thisPom.getVersion()); if (parent != null) { inferedProperties.put("parent.groupId", parent.getGroupId()); inferedProperties.put("parent.artifactId", parent.getArtifactId()); inferedProperties.put("parent.version", parent.getVersion()); inferedProperties.put("project.parent.groupId", parent.getGroupId()); inferedProperties.put("project.parent.artifactId", parent.getArtifactId()); inferedProperties.put("project.parent.version", parent.getVersion()); } expandProperties(thisPom, inferedProperties); // the former code did not call expandProperties for EXTENSIONS for(List deplist : dependencies.values()) { for (Dependency dependency : deplist) { expandProperties(dependency, inferedProperties); } } POMInfo info = new POMInfo(); if (properties.get("debian.originalVersion") != null) { Dependency originalPomDep = new Dependency(thisPom.getGroupId(), thisPom.getArtifactId(), thisPom.getType(), properties.get("debian.originalVersion")); info.setOriginalPom(originalPomDep); } info.setThisPom(thisPom); info.setParent(parent); info.setModules(new ArrayList(modules)); info.setDependencies(dependencies); info.setProperties(properties); return info; } protected boolean isReadIgnoredElement(String element) { return READ_IGNORED_ELEMENTS.contains(element); } private void expandProperties(Dependency dependency, Map inferedProperties) { dependency.setGroupId(expandString(dependency.getGroupId(), inferedProperties)); dependency.setArtifactId(expandString(dependency.getArtifactId(), inferedProperties)); dependency.setType(expandString(dependency.getType(), inferedProperties)); dependency.setVersion(expandString(dependency.getVersion(), inferedProperties)); } private String expandString(String str, Map inferedProperties) { if (str == null) { return null; } int pos; while ((pos = str.indexOf("${")) >= 0) { int end = str.indexOf('}', pos); String property = str.substring(pos + 2, end); if (inferedProperties.containsKey(property)) { String endStr = ""; if (end + 1 < str.length()) { endStr = str.substring(end + 1); } str = str.substring(0, pos) + inferedProperties.get(property) + endStr; } else { break; } } return str; } static class TreePath { private LinkedList path = new LinkedList(); // forwarding functions to the inner LinkedList public void add(S el) { path.addLast(el); } public void remove() { path.removeLast(); } public boolean contains(S el) { return path.contains(el); } public int size() { return path.size(); } public S get(int index) { return path.get(index); } public S parent(int generations) { int index = (path.size() - 1) - generations; return index >= 0 ? path.get(index) : null; } private boolean matches(String patternString, boolean anchored) { String[] patterns = patternString.split("/"); if(anchored && patterns.length != path.size()) return false; int pathIndex = path.size() - patterns.length - 1; if(pathIndex < -1) return false; for (String pattern : patterns) { ++pathIndex; if ("*".equals(pattern)) { continue; } if (!pattern.equals(path.get(pathIndex))) { return false; } } return true; } /** * Does this path match the pattern? * * The pattern is separated by slashes / and can contain the * wildcard for any path element to match * anything. The matching is anchored at the end of the path. So the pattern does not need to start at * the root. * * A pattern that starts with a slash is also anchored at the start. * * @param patternString */ public boolean matches(String patternString) { if(patternString.startsWith("/")) { return matches(patternString.substring(1), true); } else { return matches(patternString, false); } } public DependencyType match() { for(DependencyType depType : DependencyType.values()) { if(matches(depType.pattern)) { return depType; } } return null; } } } maven-repo-helper-1.8.5/src/main/java/org/debian/maven/repo/DependencyNotFoundException.java0000644000000000000000000000206212247273474026752 0ustar /* * Copyright 2009 Ludovic Claude. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.debian.maven.repo; /** * @author Ludovic Claude */ public class DependencyNotFoundException extends Exception { private Dependency dependency; public DependencyNotFoundException(Dependency dependency) { this.dependency = dependency; } public Dependency getDependency() { return dependency; } public String getMessage() { return "Dependency not found " + dependency; } } maven-repo-helper-1.8.5/src/main/java/org/debian/maven/util/0000755000000000000000000000000012247273474020505 5ustar maven-repo-helper-1.8.5/src/main/java/org/debian/maven/util/Strings.java0000644000000000000000000000237012247273474023003 0ustar package org.debian.maven.util; public class Strings { /** * Join all items with the glue string. * * The toString() method is used on the items. */ public static String join(Iterable items, String glue) { StringBuilder sb = new StringBuilder(); boolean first = true; for (Object item : items) { if (!first) { sb.append(glue); } first = false; sb.append(item); } return sb.toString(); } /** * Return a string repeating the item the given number of times. */ public static String repeat(String item, int times) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < times; ++i) { sb.append(item); } return sb.toString(); } /** * Format a line feed terminated property line for a java properties file. * * e.g.: mypropertyname=mypropertyvalue\n */ public static String propertyLine(String name, String value) { StringBuilder sb = new StringBuilder(name.length() + value.length() + 2); sb.append(name); sb.append("="); sb.append(value); sb.append("\n"); return sb.toString(); } } maven-repo-helper-1.8.5/src/main/java/org/debian/maven/util/XMLWriterWrapper.java0000644000000000000000000000376712247273474024563 0ustar /* * Copyright 2013 Thomas Koch * Copyright 2009 Ludovic Claude. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.debian.maven.util; import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; public class XMLWriterWrapper { private final XMLStreamWriter writer; public XMLWriterWrapper(XMLStreamWriter writer) { this.writer = writer; } public XMLStreamWriter getWriter() { return writer; } public void indent(int inLevel) throws XMLStreamException { writer.writeCharacters("\n"); writer.writeCharacters(Strings.repeat("\t", inLevel)); } public XMLWriterWrapper writeFilledElement(String element, String content) throws XMLStreamException { writer.writeStartElement(element); writer.writeCharacters(content); writer.writeEndElement(); return this; } public XMLWriterWrapper writeFilledElement(String element, String content, int inLevel) throws XMLStreamException { indent(inLevel); return writeFilledElement(element, content); } public XMLWriterWrapper writeFilledOrEmpty(String element, String content, int inLevel) throws XMLStreamException { indent(inLevel); indent(inLevel + 1); if (content == null || content.isEmpty() || "true".equals(content)) { writer.writeEmptyElement(element); } else { writeFilledElement(element, content); } return this; } } maven-repo-helper-1.8.5/src/main/java/org/debian/maven/cliargs/0000755000000000000000000000000012247273474021154 5ustar maven-repo-helper-1.8.5/src/main/java/org/debian/maven/cliargs/ArgumentsMap.java0000644000000000000000000000654512247273474024434 0ustar package org.debian.maven.cliargs; import java.io.File; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; public class ArgumentsMap { private static final List EMPTY_LIST = Collections.emptyList(); private final Map> longMap = new HashMap>(); private final Map> shortMap = new HashMap>(); private final List args = new ArrayList(); public ArgumentsMap(final ArgumentsIterable it) { for (Argument argument : it) { switch (argument.type) { case LONG: addToMap(longMap, argument.name, argument.value); break; case SHORT: addToMap(shortMap, argument.name, argument.value); break; case ARG: args.add(argument.value); break; } } } private void addToMap(Map> map, String name, String value) { if (!map.containsKey(name)) { map.put(name, new ArrayList()); } map.get(name).add(value); } public List getArguments() { return args; } /** * Returns the first argument or the given default value. */ public String getFirstArgument(String defaultArgument) { if (args.isEmpty()) { return defaultArgument; } return getFirstArgument(); } public String getFirstArgument() { return args.get(0); } public boolean getBoolean(String longName, String shortName) { return longMap.containsKey(longName) || shortMap.containsKey(shortName); } public boolean getBooleanLong(String longName) { return getBoolean(longName, null); } public String getValue(String longName, String shortName, String defaultValue) { if (longMap.containsKey(longName)) { return getLastOfList(longMap, longName); } if (shortMap.containsKey(shortName)) { return getLastOfList(shortMap, shortName); } return defaultValue; } public File getFile(String longName, String shortName, File defaultFile) { String fileName = getValue(longName, shortName, null); if (fileName == null) { return defaultFile; } return new File(fileName); } public List getValueList(String longName, String shortName) { List result = new ArrayList(); result.addAll(getAllValues(longMap, longName)); result.addAll(getAllValues(shortMap, shortName)); return result; } private Collection getAllValues(Map> map, String name) { return map.containsKey(name) ? map.get(name) : EMPTY_LIST; } public String getValueLong(String longName, String defaultValue) { return getValue(longName, null, defaultValue); } private String getLastOfList(Map> map, String name) { List list = map.get(name); return list.get(list.size() - 1); } public static ArgumentsMap fromArgs(String[] args) { return new ArgumentsMap(new ArgumentsIterable(args)); } } maven-repo-helper-1.8.5/src/main/java/org/debian/maven/cliargs/Argument.java0000644000000000000000000000174712247273474023612 0ustar package org.debian.maven.cliargs; public class Argument { public final String name; public final String value; public final Type type; Argument(final String arg) { final String trimmed = arg.trim(); if (trimmed.startsWith("--")) { type = Type.LONG; int equalsPosition = trimmed.indexOf("="); if (-1 == equalsPosition) { name = trimmed.substring(2); value = null; } else { name = trimmed.substring(2, equalsPosition); value = trimmed.substring(equalsPosition + 1); } } else if (trimmed.startsWith("-")) { type = Type.SHORT; name = trimmed.substring(1, 2); value = trimmed.length() <= 2 ? null : trimmed.substring(2); } else { type = Type.ARG; name = null; value = trimmed; } } public static enum Type { LONG, SHORT, ARG } } maven-repo-helper-1.8.5/src/main/java/org/debian/maven/cliargs/ArgumentsIterable.java0000644000000000000000000000174012247273474025436 0ustar package org.debian.maven.cliargs; import java.util.Iterator; public class ArgumentsIterable implements Iterable { private final String[] args; public ArgumentsIterable(String[] args) { this.args = args; } @Override public Iterator iterator() { return new ArgumentsIterator(); } private class ArgumentsIterator implements Iterator { private int pointer = -1; private int next = -1; @Override public boolean hasNext() { if (pointer == next) { do { pointer++; } while (pointer < args.length && args[pointer].isEmpty()); } return pointer < args.length; } @Override public Argument next() { hasNext(); next = pointer; return new Argument(args[next].trim()); } @Override public void remove() { } } } maven-repo-helper-1.8.5/src/main/bin/0000755000000000000000000000000012247273474014240 5ustar maven-repo-helper-1.8.5/src/main/bin/mh_checkrepo0000644000000000000000000000266612247273474016624 0ustar #!/bin/bash -- # Copyright 2009 Ludovic Claude. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. set -e . /usr/share/maven-repo-helper/mh_lib.sh syntax() { echo -e "Usage: mh_checkrepo " echo -e "Checks the Maven repository for consistency and prints a report." echo -e "" echo -e "Where" echo -e "\t is the location of the Maven repository." echo -e "\t Default to /usr/share/maven-repo" echo -e "" echo -e "Options:" echo -e "\t-h --help: show this text" echo -e "\t-V --version: show the version" echo -e "\t-v --verbose: show more information while running" echo -e "\t-o, --output=: 'text' or 'html' to change output format" echo -e "\t-r, --repository=: directory of Maven repository" exit 1 } ARGS="v verbose o output r repository" parseargs "$@" VERBOSE=$(getarg v verbose) java -cp $CLASSPATH $JAVA_OPTIONS org.debian.maven.repo.Repository "$@" maven-repo-helper-1.8.5/src/main/bin/mh_patchpom0000644000000000000000000001631212247273474016465 0ustar #!/bin/bash -- # Copyright 2009 Ludovic Claude. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. set -e . /usr/share/maven-repo-helper/mh_lib.sh syntax() { echo -e "Usage: mh_patchpom [option]... [pom] [backup]" echo -e "Transform the POM using the transformation rules." echo -e "" echo -e "Where" echo -e "\t[pom] is the location of the POM file to transform." echo -e "\t Default to pom.xml" echo -e "\t[backup] is the backup file for the pom." echo -e "\t Default to pom.xml.save" echo -e "Options:" echo -e "\t-h --help: show this text" echo -e "\t-V --version: show the version" echo -e "\t-p --package=: name of the Debian package which" echo -e "\t will contain this POM file" echo -e "\t-o --no-parent: don't inherit from a parent POM" echo -e "\t-k --keep-pom-version: keep the original version of the POM but" echo -e "\t convert all other versions in dependencies and plugins." echo -e "\t If there is a parent POM, keeps its version except when the parent is already" echo -e "\t registered in the Maven repository" echo -e "\t-e, --set-version=: set the version for the POM," echo -e "\t do not use the version declared in the POM file." echo -e "\t-r --rules=: path to the file containing the" echo -e "\t rules to apply when cleaning the POM." echo -e "\t Optional, the default location is debian/maven.rules" echo -e "\t-R, --extra-rule=: extra rule to apply when cleaning the POM" echo -e "\t May occur multiple times, instead of or in addition to -r" echo -e "\t-u --published-rules=: path to the file containing the" echo -e "\t extra rules to publish in the property debian.mavenRules in the" echo -e "\t cleaned POM." echo -e "\t Optional, the default location is debian/maven.publishedRules" echo -e "\t-U, --extra-published-rule=: extra rule to publish" echo -e "\t May occur multiple times, instead of or in addition to -u" echo -e "\t-i --ignore-rules=: path to the file containing the" echo -e "\t rules used to remove certain dependencies from the cleaned POM" echo -e "\t Optional, the default location is debian/maven.ignoreRules" echo -e "\t-I, --extra-ignore-rule=: extra rule used to remove dependencies" echo -e "\t from the transformed POM" echo -e "\t May occur multiple times, instead of or in addition to -i" echo -e "\t-c --clean-ignore-rules=: path to the file containing the" echo -e "\t rules use to remove certain dependencies from the cleaned POM," echo -e "\t in addition to the ignore rules specified previously. This is" echo -e "\t useful in situations such as when the Maven clean target requires more" echo -e "\t dependencies or plugins to ignore than the build target." echo -e "\t All rules defined in clean-ignore-rules will be added to the existing" echo -e "\t rules in ignore-rules." echo -e "\t Optional, the default location is debian/maven.cleanIgnoreRules" echo -e "\t-s --no-rules: don't apply any rules for converting versions," echo -e "\t do not even convert versions to the default 'debian' version" echo -e "\t--no-publish-used-rule: don't publish the rule used to transform" echo -e "\t a POM's own attributes in debian.mavenRules" echo -e "\t-d --debian-build: transform during a Debian build, which means that" echo -e "\t some POM elements will be removed" echo -e "\t-b --build-no-docs: if the build doesn't need to build documentation, use this" echo -e "\t option to remove some POM elements (in particular plugins) which are useless here" echo -e "\t and may require extra dependencies and make the packaging harder." echo -e "\t-m--maven-repo=: location of the Maven repository," echo -e "\t used to force the versions of the Maven plugins used in the current" echo -e "\t POM file with the versions found in the repository" echo -e "\t-v --verbose: show more information while running" echo -e "\t-n --no-act: don't actually do anything, just print the results" echo -e "" echo -e "See also: mh_installpom(1), mh_patchpoms(1)" exit 1 } ARGS="p package o no-parent k keep-pom-version e set-version r rules R extra-rule u published-rules U extra-published-rule i ignore-rules I extra-ignore-rule c clean-ignore-rules s no-rules no-publish-used-rule v verbose n no-act d debian-build b build-no-docs m maven-repo" parseargs "$@" if [ "$ARGC" -lt "1" ]; then syntax fi NOPARENT=$(getarg o no-parent) KEEP_POM_VERSION=$(getarg k keep-pom-version) SETVERSION=$(getarg e set-version) RULES=$(getarg r rules) eval EXTRA_RULES=$(getargs R extra-rule) PUBLISHED_RULES=$(getarg u published-rules) eval EXTRA_PUBLISHED_RULES=$(getargs U extra-published-rule) IGNORE_RULES=$(getarg i ignore-rules) eval EXTRA_IGNORE_RULES=$(getargs I extra-ignore-rule) CLEAN_IGNORE_RULES=$(getarg c clean-ignore-rules) NORULES=$(getarg s no-rules) NO_PUBLISH_USED_RULE=$(getarg no-publish-used-rule) MAVEN_REPO=$(getarg m maven-repo) PACKAGE=$(getarg p package) PACKAGE=${PACKAGE:?"Package parameter (-p) is mandatory"} VERBOSE=$(getarg v verbose) NOACT=$(getarg n no-act) DEBIAN_BUILD=$(getarg d debian-build) BUILD_NO_DOCS=$(getarg b build-no-docs) POM="${ARGV[0]}" BACKUP="${ARGV[1]}" if [ -z "$POM" ]; then POM="pom.xml" fi if [ -z "$BACKUP" ]; then BACKUP="${POM}.save" fi if [ -z "$PUBLISHED_RULES" ]; then if [ -f debian/maven.publishedRules ]; then PUBLISHED_RULES="debian/maven.publishedRules" fi fi if [ -z "$IGNORE_RULES" ]; then if [ -f debian/maven.ignoreRules ]; then IGNORE_RULES="debian/maven.ignoreRules" fi fi if [ -z "$RULES" ]; then if [ -f debian/maven.rules ]; then RULES="debian/maven.rules" fi fi if [ -z "$MAVEN_REPO" ]; then if [ -f /usr/share/maven-repo ]; then MAVEN_REPO="/usr/share/maven-repo" fi fi DH_OPTS="${VERBOSE:+-v} ${NOACT:+-n}" MH_ARGS=(--package=${PACKAGE} ${NOPARENT:+--no-parent} ${NORULES:+--no-rules} ${KEEP_POM_VERSION:+--keep-pom-version} ${NO_PUBLISH_USED_RULE:+--no-publish-used-rule} ${SETVERSION:+--set-version=$SETVERSION} ${RULES:+--rules=$RULES} ${PUBLISHED_RULES:+--published-rules=$PUBLISHED_RULES} ${IGNORE_RULES:+--ignore-rules=$IGNORE_RULES} ${CLEAN_IGNORE_RULES:+--clean-ignore-rules=$CLEAN_IGNORE_RULES} ${DEBIAN_BUILD:+--debian-build} ${BUILD_NO_DOCS:+--build-no-docs} ${MAVEN_REPO:+--maven-repo=$MAVEN_REPO} "${EXTRA_RULES[@]/#/--extra-rule=}" "${EXTRA_PUBLISHED_RULES[@]/#/--extra-published-rule=}" "${EXTRA_IGNORE_RULES[@]/#/--extra-ignore-rule=}") if [ -z "$NOACT" ]; then cp $POM $BACKUP java -cp $CLASSPATH $JAVA_OPTIONS org.debian.maven.repo.POMTransformer --single $DH_OPTS "${MH_ARGS[@]}" $POM fi maven-repo-helper-1.8.5/src/main/bin/mh_linkrepojar0000644000000000000000000000700212247273474017166 0ustar #!/bin/bash -- # Copyright 2009 Ludovic Claude. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. set -e . /usr/share/maven-repo-helper/mh_lib.sh syntax() { echo -e "Usage: mh_linkrepojar [option]... [pom] [link]..." echo -e "Create symlinks from the jar in the Maven repository to any location," echo -e "usually to a file located in /usr/share/java." echo -e "" echo -e "Where" echo -e "\t[pom] is the location of the POM associated with the jar to install." echo -e "\t GroupId, artifactId and version will be extracted from this file." echo -e "\t[link] is a link to the jar to install, usually there should" echo -e "\t be a link to usr/share/java/\$jar.jar and" echo -e "\t usr/share/java/\$jar-\$version.jar to comply with the Java packaging" echo -e "\t guidelines. Note that there is no need to specify those particular" echo -e "\t links if the --java-lib option is used." echo -e "Options:" echo -e "\t-h --help: show this text" echo -e "\t-V --version: show the version" echo -e "\t-p --package=: package to act on " echo -e "\t-r --rules=: gives the location of the rules file for" echo -e "\t special properties. Optional, the default location is" echo -e "\t debian/maven.rules" echo -e "\t-c --classifier=: Optional, the classifier for" echo -e "\t the jar in the Maven repository. Empty by default." echo -e "\t-v --verbose: show more information while running" echo -e "\t-n --no-act: don't actually do anything, just print the results" exit 1 } ARGS="p package r rules c classifier v verbose n no-act" parseargs "$@" if [ "$ARGC" -lt "1" ]; then syntax fi RULES=$(getarg r rules) PACKAGE=$(getarg p package) PACKAGE=${PACKAGE:?"Package parameter (-p) is mandatory"} CLASSIFIER=$(getarg c classifier) VERBOSE=$(getarg v verbose) NOACT=$(getarg n no-act) POM="${ARGV[0]}" DH_OPTS="${VERBOSE:+-v} ${NOACT:+-n}" CLEAN_ARGS="--package=${PACKAGE} ${RULES:+--rules=$RULES}" mkdir -p debian/.mh 2> /dev/null if [[ ! -z "$VERBOSE" || "$DH_VERBOSE" = "1" ]]; then echo -e "\tmh_cleanpom $DH_OPTS $CLEAN_ARGS $POM debian/.mh/pom.xml debian/.mh/pom.properties" fi mh_cleanpom $DH_OPTS $CLEAN_ARGS $POM debian/.mh/pom.xml debian/.mh/pom.properties source debian/.mh/pom.properties groupPath=$(echo $groupId | tr . / ) VERSIONED_JAR_NAME="${artifactId}-${version}.jar" if [ ! -z "$CLASSIFIER" ]; then VERSIONED_JAR_NAME="${artifactId}-${version}-${CLASSIFIER}.jar" fi MVN_VERSIONED_DIR=usr/share/maven-repo/${groupPath}/${artifactId}/${version} MVN_VERSIONED_JAR=$MVN_VERSIONED_DIR/$VERSIONED_JAR_NAME link_jar () { local src=$1 local dest=$2 if [[ "$src" == "$dest" ]]; then return fi if [[ ! -z "$VERBOSE" || "$DH_VERBOSE" = "1" ]]; then echo -e "\tdh_link $DH_OPTS -p${PACKAGE} ${src} ${dest}" fi dh_link $DH_OPTS -p${PACKAGE} ${src} ${dest} } # Create the links supplied on the argument list for (( i=1; i < $ARGC; i++ )); do LINK_JAR="${ARGV[i]}" link_jar "$MVN_VERSIONED_JAR" "$LINK_JAR" done maven-repo-helper-1.8.5/src/main/bin/mh_patchpoms0000644000000000000000000001576012247273474016656 0ustar #!/bin/bash -- # Copyright 2011 Ludovic Claude. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. set -e . /usr/share/maven-repo-helper/mh_lib.sh syntax() { echo -e "Usage: mh_patchpoms [option]..." echo -e "Reads the file debian/\$package.poms and tranform each POM file" echo -e "listed in the .poms file into a POM file using the Debian versions" echo -e "of the libraries. Also keeps a backup of each POM file which can" echo -e "be restored with mh_unpatchpoms" echo -e "" echo -e "Options:" echo -e "\t-h --help: show this text" echo -e "\t-V --version: show the version" echo -e "\t-p --package=: package to act on " echo -e "\t-k --keep-pom-version: keep the original version of the POMs but, " echo -e "\t convert all other versions in dependencies and plugins" echo -e "\t If there is a parent POM, keeps its version except when the parent is already" echo -e "\t registered in the Maven repository" echo -e "\t-e, --set-version=: set the version for the POM," echo -e "\t do not use the version declared in the POM file." echo -e "\t-r --rules=: path to the file containing the" echo -e "\t rules to apply when cleaning the POM." echo -e "\t Optional, the default location is debian/maven.rules" echo -e "\t-R, --extra-rule=: extra rule to apply when cleaning the POM" echo -e "\t May occur multiple times, instead of or in addition to -r" echo -e "\t-u --published-rules=: path to the file containing the" echo -e "\t extra rules to publish in the property debian.mavenRules in the" echo -e "\t cleaned POM." echo -e "\t Optional, the default location is debian/maven.publishedRules" echo -e "\t-U, --extra-published-rule=: extra rule to publish" echo -e "\t May occur multiple times, instead of or in addition to -u" echo -e "\t-i --ignore-rules=: path to the file containing the" echo -e "\t rules used to remove certain dependencies from the cleaned POM" echo -e "\t Optional, the default location is debian/maven.ignoreRules" echo -e "\t-I, --extra-ignore-rule=: extra rule used to remove dependencies" echo -e "\t from the transformed POM" echo -e "\t May occur multiple times, instead of or in addition to -i" echo -e "\t-c --clean-ignore-rules=: path to the file containing the" echo -e "\t rules use to remove certain dependencies from the cleaned POM," echo -e "\t in addition to the ignore rules specified previously. This is" echo -e "\t useful in situations such as when the Maven clean target requires more" echo -e "\t dependencies or plugins to ignore than the build target." echo -e "\t All rules defined in clean-ignore-rules will be added to the existing" echo -e "\t rules in ignore-rules." echo -e "\t Optional, the default location is debian/maven.cleanIgnoreRules" echo -e "\t-s --no-rules: don't apply any rules for converting versions," echo -e "\t do not even convert versions to the default 'debian' version" echo -e "\t--no-publish-used-rule: don't publish the rule used to transform" echo -e "\t a POM's own attributes in debian.mavenRules" echo -e "\t-d --debian-build: transform during a Debian build, which means that" echo -e "\t some POM elements will be removed" echo -e "\t-b --build-no-docs: if the build doesn't need to build documentation, use this" echo -e "\t option to remove some POM elements (in particular plugins) which are useless here" echo -e "\t and may require extra dependencies and make the packaging harder." echo -e "\t-m--maven-repo=: location of the Maven repository," echo -e "\t used to force the versions of the Maven plugins used in the current" echo -e "\t POM file with the versions found in the repository" echo -e "\t-v --verbose: show more information while running" echo -e "\t-n --no-act: don't actually do anything, just print the results" echo -e "" echo -e "See also: mh_installpoms(1), mh_patchpom(1)" exit 1 } ARGS="p package keep-pom-version e set-version r rules R extra-rule u published-rules U extra-published-rule i ignore-rules I extra-ignore-rule c clean-ignore-rules s no-rules no-publish-used-rule v verbose n no-act d debian-build b build-no-docs m maven-repo" parseargs "$@" KEEP_POM_VERSION=$(getarg k keep-pom-version) SETVERSION=$(getarg e set-version) RULES=$(getarg r rules) eval EXTRA_RULES=$(getargs R extra-rule) PUBLISHED_RULES=$(getarg u published-rules) eval EXTRA_PUBLISHED_RULES=$(getargs U extra-published-rule) IGNORE_RULES=$(getarg i ignore-rules) eval EXTRA_IGNORE_RULES=$(getargs I extra-ignore-rule) CLEAN_IGNORE_RULES=$(getarg c clean-ignore-rules) NORULES=$(getarg s no-rules) NO_PUBLISH_USED_RULE=$(getarg no-publish-used-rule) MAVEN_REPO=$(getarg m maven-repo) PACKAGE=$(getarg p package) PACKAGE=${PACKAGE:?"Package parameter (-p) is mandatory"} VERBOSE=$(getarg v verbose) NOACT=$(getarg n no-act) DEBIAN_BUILD=$(getarg d debian-build) BUILD_NO_DOCS=$(getarg b build-no-docs) if [ -z "$PUBLISHED_RULES" ]; then if [ -f debian/maven.publishedRules ]; then PUBLISHED_RULES="debian/maven.publishedRules" fi fi if [ -z "$IGNORE_RULES" ]; then if [ -f debian/maven.ignoreRules ]; then IGNORE_RULES="debian/maven.ignoreRules" fi fi if [ -z "$RULES" ]; then if [ -f debian/maven.rules ]; then RULES="debian/maven.rules" fi fi if [ -z "$MAVEN_REPO" ]; then if [ -f /usr/share/maven-repo ]; then MAVEN_REPO="/usr/share/maven-repo" fi fi DH_OPTS="${VERBOSE:+-v} ${NOACT:+-n}" MH_ARGS=(--package=${PACKAGE} ${NORULES:+--no-rules} ${KEEP_POM_VERSION:+--keep-pom-version} ${NO_PUBLISH_USED_RULE:+--no-publish-used-rule} ${SETVERSION:+--set-version=$SETVERSION} ${RULES:+--rules=$RULES} ${PUBLISHED_RULES:+--published-rules=$PUBLISHED_RULES} ${IGNORE_RULES:+--ignore-rules=$IGNORE_RULES} ${CLEAN_IGNORE_RULES:+--clean-ignore-rules=$CLEAN_IGNORE_RULES} ${DEBIAN_BUILD:+--debian-build} ${BUILD_NO_DOCS:+--build-no-docs} ${MAVEN_REPO:+--maven-repo=$MAVEN_REPO} "${EXTRA_RULES[@]/#/--extra-rule=}" "${EXTRA_PUBLISHED_RULES[@]/#/--extra-published-rule=}" "${EXTRA_IGNORE_RULES[@]/#/--extra-ignore-rule=}") if [ -z "$NOACT" ]; then cat debian/$PACKAGE.poms | while read POM OPT1 OPT2; do # Remove comments POM=${POM##\#*} if [ ! -z "$POM" ]; then cp $POM $POM.save fi done java -cp $CLASSPATH $JAVA_OPTIONS org.debian.maven.repo.POMTransformer $DH_OPTS "${MH_ARGS[@]}" fi maven-repo-helper-1.8.5/src/main/bin/mh_linkjar0000644000000000000000000001622212247273474016304 0ustar #!/bin/bash -- # Copyright 2009 Ludovic Claude. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. set -e . /usr/share/maven-repo-helper/mh_lib.sh syntax() { echo -e "Usage: mh_linkjar [option]... [pom] [dest_jar] [link]..." echo -e "Create symlinks for a jar installed by other means. The symlinks created" echo -e "include links to the jar in /usr/share/maven-repo, at the correct" echo -e "location for Maven." echo -e "It can also create additional links to the jar, usually located in" echo -e "/usr/share/java." echo -e "" echo -e "Where" echo -e "\t[pom] is the location of the POM associated with the jar to install." echo -e "\t GroupId, artifactId and version will be extracted from this file." echo -e "\t[dest_jar] is the path of the installed jar, usually located in the" echo -e "\t usr/share/java folder." echo -e "\t[link] is an additional link to the jar to install, usually there should" echo -e "\t be a link to usr/share/java/\$jar.jar and" echo -e "\t usr/share/java/\$jar-\$version.jar to comply with the Java packaging" echo -e "\t guidelines. Note that there is no need to specify those particular" echo -e "\t links if the --java-lib option is used." echo -e "Options:" echo -e "\t-h --help: show this text" echo -e "\t-V --version: show the version" echo -e "\t-p --package=: name of the Debian package which" echo -e "\t will contain this jar file" echo -e "\t-e, --set-version=: set the version for the jar," echo -e "\t do not use the version declared in the POM file." echo -e "\t-r --rules=: path to the file containing the" echo -e "\t rules to apply when cleaning the POM." echo -e "\t Optional, the default location is debian/maven.rules" echo -e "\t Maven rules are used here to extract the groupId, artifactId" echo -e "\t and version from the POM file." echo -e "\t-l --java-lib: Optional, if given it will install the jar into" echo -e "\t /usr/share/java to comply with the Debian Java specification." echo -e "\t The jar will be installed as /usr/share/java/\$name-\$version.jar and" echo -e "\t a versionless link /usr/share/java/\$name.jar will point to it, as" echo -e "\t well as the links installed in /usr/share/maven-repo" echo -e "\t-n --usj-name=: Optional, the name to use when installing the" echo -e "\t library in /usr/share/java when --java-lib is used." echo -e "\t Defaults to the artifact id found in the POM." echo -e "\t-j --usj-version=: Optional, the version to use when" echo -e "\t installing the library in /usr/share/java when --java-lib is used." echo -e "\t Defaults to the version found in the POM." echo -e "\t-s --no-usj-versionless: Optional, don't install the versionless link" echo -e "\t in /usr/share/java." echo -e "\t This flag is used only when the -l or --java-lib option is given." echo -e "\t-c --classifier=: Optional, the classifier for" echo -e "\t the jar. Empty by default." echo -e "\t-v --verbose: show more information while running" echo -e "\t-n --no-act: don't actually do anything, just print the results" echo -e "\t--skip-clean-pom: don't clean the pom, assume that a previous action ran" echo -e "\t mh_cleanpom with the correct options. mh_cleanpom is run only to extract" echo -e "\t the groupId, artifactId and version of the jar" exit 1 } ARGS="p package e set-version r rules l java-lib n usj-name j usj-version s no-usj-versionless c classifier v verbose n no-act skip-clean-pom no-parent has-package-version keep-elements ignore-pom" parseargs "$@" if [ "$ARGC" -lt "2" ]; then syntax fi SETVERSION=$(getarg e set-version) RULES=$(getarg r rules) PACKAGE=$(getarg p package) PACKAGE=${PACKAGE:?"Package parameter (-p) is mandatory"} JAVALIB=$(getarg l java-lib) USJ_JAR_NAME=$(getarg n usj-name) USJ_JAR_VERSION=$(getarg j usj-version) NO_USJ_VERSIONLESS=$(getarg s no-usj-versionless) CLASSIFIER=$(getarg c classifier) VERBOSE=$(getarg v verbose) NOACT=$(getarg n no-act) SKIP_CLEAN_POM=$(getarg skip-clean-pom) POM="${ARGV[0]}" JAR="${ARGV[1]}" DH_OPTS="${VERBOSE:+-v} ${NOACT:+-n}" CLEAN_ARGS="--package=${PACKAGE} ${SETVERSION:+--set-version=$SETVERSION} ${RULES:+--rules=$RULES}" mkdir -p debian/.mh 2> /dev/null if [ -z "$SKIP_CLEAN_POM" ]; then if [[ ! -z "$VERBOSE" || "$DH_VERBOSE" = "1" ]]; then echo -e "\tmh_cleanpom $DH_OPTS $CLEAN_ARGS $POM debian/.mh/pom.xml debian/.mh/pom.properties" fi mh_cleanpom $DH_OPTS $CLEAN_ARGS $POM debian/.mh/pom.xml debian/.mh/pom.properties fi source debian/.mh/pom.properties groupPath=$(echo $groupId | tr . / ) if [ -z "$CLASSIFIER" ]; then # Use the classifier from the POM CLASSIFIER=$classifier fi VERSIONED_JAR_NAME="${artifactId}-${version}.jar" if [ ! -z "$CLASSIFIER" ]; then VERSIONED_JAR_NAME="${artifactId}-${version}-${CLASSIFIER}.jar" fi DEBIAN_JAR_NAME="${artifactId}-${debianVersion}.jar" if [ ! -z "$CLASSIFIER" ]; then DEBIAN_JAR_NAME="${artifactId}-${debianVersion}-${CLASSIFIER}.jar" fi MVN_VERSIONED_DIR=usr/share/maven-repo/${groupPath}/${artifactId}/${version} MVN_DEBIAN_DIR=usr/share/maven-repo/${groupPath}/${artifactId}/${debianVersion} if [ -n "$JAVALIB" ]; then USJ_JAR_NAME=$(getarg n usj-name) USJ_JAR_NAME=${USJ_JAR_NAME:-$artifactId} USJ_JAR_VERSION=${USJ_JAR_VERSION:-$version} USJ_VERSIONED_JAR_NAME=${USJ_JAR_NAME}-${USJ_JAR_VERSION}.jar USJ_JAR_NAME=${USJ_JAR_NAME}.jar fi link_jar () { local srcDir=$1 local srcJar=$2 local destDir=$3 local destJar=$4 if [[ ("$srcDir" == "$destDir") && ("$srcJar" == "$destJar") ]]; then return fi if [[ ! -z "$VERBOSE" || "$DH_VERBOSE" = "1" ]]; then echo -e "\tdh_link $DH_OPTS -p${PACKAGE} ${srcDir}${srcJar} ${destDir}/${destJar}" fi dh_link $DH_OPTS -p${PACKAGE} ${srcDir}/${srcJar} ${destDir}/${destJar} } TARGET_DIR=$(dirname $JAR) TARGET_JAR=$(basename $JAR) # Install the link to the jar into the Maven repository link_jar "$TARGET_DIR" "$TARGET_JAR" "$MVN_VERSIONED_DIR" "$VERSIONED_JAR_NAME" if [[ "${version}" != "${debianVersion}" ]]; then link_jar "$TARGET_DIR" "$TARGET_JAR" "$MVN_DEBIAN_DIR" "$DEBIAN_JAR_NAME" fi # Create the additional links supplied on the argument list for (( i=2; i < $ARGC; i++ )); do LINK_JAR="${ARGV[i]}" link_jar "$TARGET_DIR" "$TARGET_JAR" "$(dirname $LINK_JAR)" "$(basename $LINK_JAR)" done # Install the link to the jar in /usr/share/java if [ -n "$JAVALIB" ]; then link_jar "$TARGET_DIR" "$TARGET_JAR" "usr/share/java" "$USJ_VERSIONED_JAR_NAME" if [[ -z "$NO_USJ_VERSIONLESS" ]]; then link_jar "$TARGET_DIR" "$TARGET_JAR" "usr/share/java" "$USJ_JAR_NAME" fi fi maven-repo-helper-1.8.5/src/main/bin/mh_install0000644000000000000000000001333412247273474016321 0ustar #!/bin/bash -- # Copyright 2009 Ludovic Claude. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. set -e . /usr/share/maven-repo-helper/mh_lib.sh syntax() { echo -e "Usage: mh_install [option]..." echo -e "Reads the file debian/\$package.poms and installs each POM file" echo -e "listed in the .poms file, as well as the associated jars - assuming" echo -e "that at least the --artifact option is given in the .poms file for" echo -e "all jars to install." echo -e "" echo -e "Options:" echo -e "\t-h --help: show this text" echo -e "\t-V --version: show the version" echo -e "\t-p --package=: name of the Debian package which" echo -e "\t will contain all the files to install" echo -e "\t-e, --set-version=: set the version for all artifacts," echo -e "\t do not use the version declared in the POM files." echo -e "\t-r --rules=: path to the file containing the" echo -e "\t rules to apply when cleaning the POM files." echo -e "\t Optional, the default location is debian/maven.rules" echo -e "\t-u --published-rules=: path to the file containing the" echo -e "\t extra rules to publish in the property debian.mavenRules in the" echo -e "\t cleaned POM." echo -e "\t Optional, the default location is debian/maven.publishedRules" echo -e "\t-i --ignore-rules=: path to the file containing the" echo -e "\t rules used to remove certain dependencies from the cleaned POM" echo -e "\t Optional, the default location is debian/maven.ignoreRules" echo -e "\t--no-publish-used-rule: don't publish the rule used to transform" echo -e "\t a POM's own attributes in debian.mavenRules" echo -e "\t-v --verbose: show more information while running" echo -e "\t-n --no-act: don't actually do anything, just print the results" echo -e "" echo -e "The \$package.poms file must contain enough information to locate" echo -e "the jar files to install, and to associate them with their POM file." echo -e "For each POM file associated with a jar, we need to supply at least" echo -e "the --artifact parameter." echo -e "" echo -e "See also: mh_installpoms(1), mh_installjar(1)" exit 1 } ARGS="p package no-publish-used-rule r rules u published-rules i ignore-rules e set-version v verbose n no-act" parseargs "$@" RULES=$(getarg r rules) PUBLISHED_RULES=$(getarg u published-rules) IGNORE_RULES=$(getarg i ignore-rules) SETVERSION=$(getarg e set-version) PACKAGE=$(getarg p package) NO_PUBLISH_USED_RULE=$(getarg no-publish-used-rule) VERBOSE=$(getarg v verbose) NOACT=$(getarg n no-act) function installpackage() { p=$1 DH_OPTS="${VERBOSE:+-v} ${NOACT:+-n}" MH_ARGS="--package=${p} ${VERBOSE:+--verbose} ${NO_PUBLISH_USED_RULE:+--no-publish-used-rule} ${SETVERSION:+--set-version=$SETVERSION} ${RULES:+--rules=$RULES} ${PUBLISHED_RULES:+--published-rules=$PUBLISHED_RULES} ${IGNORE_RULES:+--ignore-rules=$IGNORE_RULES}" cat debian/$p.poms | while read POM OPT1 OPT2 OPT3 OPT4 OPT5 OPT6 OPT7 OPT8 OPT9 OPT10; do # Remove comments POM=${POM##\#*} if [[ -n "$POM" ]]; then POM_DIR=$(dirname $POM) ARTIFACT= SITE_XML= C=1 _opt=$(eval echo '$OPT'$C) while [ -n "$_opt" ]; do if [ "--artifact" = "${_opt%%=*}" ]; then export ARTIFACT=${_opt##--artifact=} fi if [ "--site-xml" = "${_opt%%=*}" ]; then export SITE_XML=${_opt##--site-xml=} fi if [ "--artifact" = "${_opt%%=*}" ] || [ "--site-xml" = "${_opt%%=*}" ]; then # Unset the option where we found the matching option eval OPT$C= # shift all following options while [ -n "$_opt" ]; do C1=$(( $C + 1 )) eval OPT$C='$OPT'$C1 C=$C1 _opt=$(eval echo '$OPT'$C) done fi C=$(( $C + 1 )) _opt=$(eval echo '$OPT'$C) done if [[ ! "--ignore" == "$OPT1" ]]; then if [[ ! -z "$VERBOSE" || "$DH_VERBOSE" = "1" ]]; then echo -e "\tmh_installpom $OPT1 $OPT2 $OPT3 $OPT4 $OPT5 $OPT6 $OPT7 $OPT8 $OPT9 $OPT10 $DH_OPTS $MH_ARGS $POM" fi mh_installpom $OPT1 $OPT2 $OPT3 $OPT4 $OPT5 $OPT6 $OPT7 $OPT8 $OPT9 $OPT10 $DH_OPTS $MH_ARGS $POM if [[ -n "$ARTIFACT" ]]; then if [[ ! -z "$VERBOSE" || "$DH_VERBOSE" = "1" ]]; then echo -e "\tmh_installjar --skip-clean-pom $OPT1 $OPT2 $OPT3 $OPT4 $OPT5 $OPT6 $OPT7 $OPT8 $OPT9 $OPT10 $DH_OPTS $MH_ARGS $POM $ARTIFACT" fi mh_installjar --skip-clean-pom $OPT1 $OPT2 $OPT3 $OPT4 $OPT5 $OPT6 $OPT7 $OPT8 $OPT9 $OPT10 $DH_OPTS $MH_ARGS $POM $ARTIFACT fi if [[ -n "$SITE_XML" ]]; then if [[ ! -z "$VERBOSE" || "$DH_VERBOSE" = "1" ]]; then echo mh_installsite --skip-clean-pom $OPT1 $OPT2 $OPT3 $OPT4 $OPT5 $OPT6 $OPT7 $OPT8 $OPT9 $OPT10 $DH_OPTS $MH_ARGS $POM ${SITE_XML} fi mh_installsite --skip-clean-pom $OPT1 $OPT2 $OPT3 $OPT4 $OPT5 $OPT6 $OPT7 $OPT8 $OPT9 $OPT10 $DH_OPTS $MH_ARGS $POM ${SITE_XML} fi fi fi done } if [ -n "$PACKAGE" ]; then installpackage $PACKAGE else for p in `findpackages`; do if [ -f debian/$p.poms ]; then installpackage $p fi done fi maven-repo-helper-1.8.5/src/main/bin/mh_installsite0000644000000000000000000001102312247273474017177 0ustar #!/bin/bash -- # Copyright 2009 Ludovic Claude. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. set -e . /usr/share/maven-repo-helper/mh_lib.sh syntax() { echo -e "Usage: mh_installsite [option]... [pom] [site-file]" echo -e "Installs the site.xml file in /usr/share/maven-repo, at the correct location for" echo -e "Maven." echo -e "" echo -e "Where" echo -e "\t[pom] is the location of the POM associated with the site.xml file to install." echo -e "\t GroupId, artifactId and version will be extracted from this file." echo -e "\t[site-file] is the location of the site.xml to install." echo -e "Options:" echo -e "\t-h --help: show this text" echo -e "\t-V --version: show the version" echo -e "\t-p --package=: name of the Debian package which" echo -e "\t will contain the site file" echo -e "\t-e, --set-version=: set the version for the artifact," echo -e "\t do not use the version declared in the POM file." echo -e "\t-r --rules=: path to the file containing the" echo -e "\t rules to apply when cleaning the POM." echo -e "\t Optional, the default location is debian/maven.rules" echo -e "\t Maven rules are used here to extract the groupId, artifactId" echo -e "\t and version from the POM file." echo -e "\t-v --verbose: show more information while running" echo -e "\t-n --no-act: don't actually do anything, just print the results" echo -e "\t--skip-clean-pom: don't clean the pom, assume that a previous action ran" echo -e "\t mh_cleanpom with the correct options. mh_cleanpom is run only to extract" echo -e "\t the groupId, artifactId and version of the jar" echo -e "" echo -e "See also: mh_installpom(1), mh_installjar(1)" exit 1 } # The following elements are options which just need to be ignored: no-parent has-package-version keep-elements ignore-pom classifier ARGS="p package e set-version r rules l java-lib n usj-name i usj-version s no-usj-versionless d dest-jar c classifier v verbose n no-act skip-clean-pom no-parent has-package-version keep-elements ignore-pom classifier" parseargs "$@" if [ "$ARGC" -lt "2" ]; then syntax fi SETVERSION=$(getarg e set-version) RULES=$(getarg r rules) PACKAGE=$(getarg p package) PACKAGE=${PACKAGE:?"Package parameter (-p) is mandatory"} VERBOSE=$(getarg v verbose) NOACT=$(getarg n no-act) SKIP_CLEAN_POM=$(getarg skip-clean-pom) POM="${ARGV[0]}" SITE_FILE="${ARGV[1]}" DH_OPTS="${VERBOSE:+-v} ${NOACT:+-n}" CLEAN_ARGS="--package=${PACKAGE} ${SETVERSION:+--set-version=$SETVERSION} ${RULES:+--rules=$RULES}" mkdir -p debian/.mh 2> /dev/null if [ -z "$SKIP_CLEAN_POM" ]; then if [[ ! -z "$VERBOSE" || "$DH_VERBOSE" = "1" ]]; then echo -e "\tmh_cleanpom $DH_OPTS $CLEAN_ARGS $POM debian/.mh/pom.xml debian/.mh/pom.properties" fi mh_cleanpom $DH_OPTS $CLEAN_ARGS $POM debian/.mh/pom.xml debian/.mh/pom.properties fi source debian/.mh/pom.properties groupPath=$(echo $groupId | tr . / ) if [ ! -e $SITE_FILE ]; then echo "Cannot find the site.xml file to install: $SITE_FILE" exit 2 fi VERSIONED_SITE_NAME="${artifactId}-${version}-site.xml" DEBIAN_SITE_NAME="${artifactId}-${debianVersion}-site.xml" MVN_VERSIONED_DIR=usr/share/maven-repo/${groupPath}/${artifactId}/${version} MVN_DEBIAN_DIR=usr/share/maven-repo/${groupPath}/${artifactId}/${debianVersion} install_site () { local srcSite=$1 local destDir=$2 local destSite=$3 if [[ ! -z "$VERBOSE" || "$DH_VERBOSE" = "1" ]]; then echo "mh_installsite: Install $srcSite to $destDir $destSite" fi cp ${srcSite} debian/.mh/${destSite} if [[ ! -z "$VERBOSE" || "$DH_VERBOSE" = "1" ]]; then echo -e "\tinstall -m 644 -D debian/.mh/${destSite} debian/${PACKAGE}/${destDir}/${destSite}" fi install -m 644 -D debian/.mh/${destSite} debian/${PACKAGE}/${destDir}/${destSite} } # Install site.xml in the Maven repository install_site "$SITE_FILE" "$MVN_VERSIONED_DIR" "$VERSIONED_SITE_NAME" if [[ "${version}" != "${debianVersion}" ]]; then install_site "$SITE_FILE" "$MVN_DEBIAN_DIR" "$DEBIAN_SITE_NAME" fi maven-repo-helper-1.8.5/src/main/bin/mh_installjar0000644000000000000000000002141412247273474017014 0ustar #!/bin/bash -- # Copyright 2009 Ludovic Claude. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. set -e . /usr/share/maven-repo-helper/mh_lib.sh syntax() { echo -e "Usage: mh_installjar [option]... [pom] [jar] [link]..." echo -e "Installs the jar file in /usr/share/maven-repo, at the correct location for" echo -e "Maven. The jar is copied into the build directory." echo -e "It can also create additional links to the jar, usually located in" echo -e "/usr/share/java." echo -e "" echo -e "Where" echo -e "\t[pom] is the location of the POM associated with the jar to install." echo -e "\t GroupId, artifactId and version will be extracted from this file." echo -e "\t[jar] is the path to the jar to install, usually located in the build" echo -e "\t folder." echo -e "\t[link] is an additional link to the jar to install, usually there should" echo -e "\t be a link to usr/share/java/\$jar.jar and" echo -e "\t usr/share/java/\$jar-\$version.jar to comply with the Java packaging" echo -e "\t guidelines. Note that there is no need to specify those particular" echo -e "\t links if the --java-lib option is used." echo -e "Options:" echo -e "\t-h --help: show this text" echo -e "\t-V --version: show the version" echo -e "\t-p --package=: name of the Debian package which" echo -e "\t will contain this jar file" echo -e "\t-e, --set-version=: set the version for the jar," echo -e "\t do not use the version declared in the POM file." echo -e "\t-r --rules=: path to the file containing the" echo -e "\t rules to apply when cleaning the POM." echo -e "\t Optional, the default location is debian/maven.rules" echo -e "\t Maven rules are used here to extract the groupId, artifactId" echo -e "\t and version from the POM file." echo -e "\t-l --java-lib: Optional, if given it will install the jar into" echo -e "\t /usr/share/java to comply with the Debian Java specification." echo -e "\t The jar will be installed as /usr/share/java/\$name-\$version.jar and" echo -e "\t a versionless link /usr/share/java/\$name.jar will point to it, as" echo -e "\t well as the links installed in /usr/share/maven-repo" echo -e "\t-n --usj-name=: Optional, the name to use when installing the" echo -e "\t library in /usr/share/java when --java-lib is used." echo -e "\t Defaults to the artifact id found in the POM." echo -e "\t-j --usj-version=: Optional, the version to use when" echo -e "\t installing the library in /usr/share/java when --java-lib is used." echo -e "\t Defaults to the version found in the POM." echo -e "\t-s --no-usj-versionless: Optional, don't install the versionless link" echo -e "\t in /usr/share/java." echo -e "\t This flag is used only when the -l or --java-lib option is given." echo -e "\t-d --dest-jar=: Optional, the destination for the real jar." echo -e "\t The other places where the jar appears, in the repository or in the" echo -e "\t list of links, will be symlinks to this jar." echo -e "\t Defaults to /usr/share/java/\$name-\$version.jar if --java-lib is used," echo -e "\t otherwise the jar is installed in the versioned path in the Maven repository." echo -e "\t-c --classifier=: Optional, the classifier for" echo -e "\t the jar. Empty by default." echo -e "\t-v --verbose: show more information while running" echo -e "\t-n --no-act: don't actually do anything, just print the results" echo -e "\t--skip-clean-pom: don't clean the pom, assume that a previous action ran" echo -e "\t mh_cleanpom with the correct options. mh_cleanpom is run only to extract" echo -e "\t the groupId, artifactId and version of the jar" echo -e "" echo -e "See also: mh_installpom(1), mh_installsite(1)" exit 1 } # The following elements are options which just need to be ignored: no-parent has-package-version keep-elements ignore-pom ARGS="p package e set-version r rules l java-lib n usj-name i j usj-version s no-usj-versionless d dest-jar c classifier v verbose n no-act skip-clean-pom no-parent has-package-version keep-elements ignore-pom" parseargs "$@" if [ "$ARGC" -lt "2" ]; then syntax fi SETVERSION=$(getarg e set-version) RULES=$(getarg r rules) PACKAGE=$(getarg p package) PACKAGE=${PACKAGE:?"Package parameter (-p) is mandatory"} JAVALIB=$(getarg l java-lib) USJ_JAR_NAME=$(getarg n usj-name) USJ_JAR_VERSION=$(getarg i j usj-version) NO_USJ_VERSIONLESS=$(getarg s no-usj-versionless) TARGET_JAR_PATH=$(getarg d dest-jar) CLASSIFIER=$(getarg c classifier) VERBOSE=$(getarg v verbose) NOACT=$(getarg n no-act) SKIP_CLEAN_POM=$(getarg skip-clean-pom) POM="${ARGV[0]}" JAR="${ARGV[1]}" if [ -n "$(getarg i)" ]; then echo "WARNING: mh_installjar -i option is deprecated, prefer -j or --usj-version instead" fi DH_OPTS="${VERBOSE:+-v} ${NOACT:+-n}" CLEAN_ARGS="--package=${PACKAGE} ${SETVERSION:+--set-version=$SETVERSION} ${RULES:+--rules=$RULES}" mkdir -p debian/.mh 2> /dev/null if [ -z "$SKIP_CLEAN_POM" ]; then if [[ ! -z "$VERBOSE" || "$DH_VERBOSE" = "1" ]]; then echo -e "\tmh_cleanpom $DH_OPTS $CLEAN_ARGS $POM debian/.mh/pom.xml debian/.mh/pom.properties" fi mh_cleanpom $DH_OPTS $CLEAN_ARGS $POM debian/.mh/pom.xml debian/.mh/pom.properties fi source debian/.mh/pom.properties groupPath=$(echo $groupId | tr . / ) if [ -z "$CLASSIFIER" ]; then # Use the classifier from the POM CLASSIFIER=$classifier fi if [ ! -e $JAR ]; then echo "Cannot find the jar to install: $JAR" exit 2 fi VERSIONED_JAR_NAME="${artifactId}-${version}.jar" if [ ! -z "$CLASSIFIER" ]; then VERSIONED_JAR_NAME="${artifactId}-${version}-${CLASSIFIER}.jar" fi DEBIAN_JAR_NAME="${artifactId}-${debianVersion}.jar" if [ ! -z "$CLASSIFIER" ]; then DEBIAN_JAR_NAME="${artifactId}-${debianVersion}-${CLASSIFIER}.jar" fi MVN_VERSIONED_DIR=usr/share/maven-repo/${groupPath}/${artifactId}/${version} MVN_DEBIAN_DIR=usr/share/maven-repo/${groupPath}/${artifactId}/${debianVersion} TARGET_DIR=${MVN_VERSIONED_DIR} TARGET_JAR=${VERSIONED_JAR_NAME} if [ -n "$JAVALIB" ]; then USJ_JAR_NAME=$(getarg n usj-name) USJ_JAR_NAME=${USJ_JAR_NAME:-$artifactId} USJ_JAR_VERSION=${USJ_JAR_VERSION:-$version} USJ_VERSIONED_JAR_NAME=${USJ_JAR_NAME}-${USJ_JAR_VERSION}.jar USJ_JAR_NAME=${USJ_JAR_NAME}.jar TARGET_DIR=usr/share/java TARGET_JAR=${USJ_VERSIONED_JAR_NAME} fi if [[ -n "$TARGET_JAR_PATH" ]]; then TARGET_DIR=$(dirname $TARGET_JAR_PATH) TARGET_JAR=$(basename $TARGET_JAR_PATH) fi JAR_INSTALLED= install_jar () { local srcDir=$1 local srcJar=$2 local destDir=$3 local destJar=$4 if [[ ! -z "$VERBOSE" || "$DH_VERBOSE" = "1" ]]; then echo "mh_installjar: Install $srcDir $srcJar to $destDir $destJar" fi if [[ ("$destDir" == "$TARGET_DIR") && ("$destJar" == "$TARGET_JAR") ]]; then # avoid duplication as install_jar is called twice if [[ -n "$JAR_INSTALLED" ]]; then return fi cp ${srcJar} debian/.mh/${destJar} if [[ ! -z "$VERBOSE" || "$DH_VERBOSE" = "1" ]]; then echo -e "\tinstall -m 644 -D debian/.mh/${destJar} debian/${PACKAGE}/${destDir}/${destJar}" fi install -m 644 -D debian/.mh/${destJar} debian/${PACKAGE}/${destDir}/${destJar} JAR_INSTALLED=done else if [[ ! -z "$VERBOSE" || "$DH_VERBOSE" = "1" ]]; then echo -e "\tdh_link $DH_OPTS -p${PACKAGE} ${srcDir}${srcJar} ${destDir}/${destJar}" fi dh_link $DH_OPTS -p${PACKAGE} ${srcDir}/${srcJar} ${destDir}/${destJar} fi } # Install the jar in its target directory install_jar "" "$JAR" "$TARGET_DIR" "$TARGET_JAR" # Install the jar in the Maven repository install_jar "$TARGET_DIR" "$TARGET_JAR" "$MVN_VERSIONED_DIR" "$VERSIONED_JAR_NAME" if [[ "${version}" != "${debianVersion}" ]]; then install_jar "$TARGET_DIR" "$TARGET_JAR" "$MVN_DEBIAN_DIR" "$DEBIAN_JAR_NAME" fi # Create the additional links supplied on the argument list for (( i=2; i < $ARGC; i++ )); do LINK_JAR="${ARGV[i]}" install_jar "$TARGET_DIR" "$TARGET_JAR" "$(dirname $LINK_JAR)" "$(basename $LINK_JAR)" done # Install the jar in /usr/share/java if [ -n "$JAVALIB" ]; then install_jar "$TARGET_DIR" "$TARGET_JAR" "usr/share/java" "$USJ_VERSIONED_JAR_NAME" if [[ -z "$NO_USJ_VERSIONLESS" ]]; then install_jar "$TARGET_DIR" "$TARGET_JAR" "usr/share/java" "$USJ_JAR_NAME" fi fi maven-repo-helper-1.8.5/src/main/bin/mh_linkjars0000644000000000000000000001062512247273474016470 0ustar #!/bin/bash -- # Copyright 2011 Ludovic Claude. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. set -e . /usr/share/maven-repo-helper/mh_lib.sh syntax() { echo -e "Usage: mh_linkjars [option]..." echo -e "Reads the file debian/\$package.poms and create links for each" echo -e "jar file generated by a POM listed in the .poms file." echo -e "" echo -e "Options:" echo -e "\t-h --help: show this text" echo -e "\t-V --version: show the version" echo -e "\t-p --package=: name of the Debian package which" echo -e "\t will contain the jar files" echo -e "\t-e, --set-version=: set the version for the jars," echo -e "\t do not use the version declared in the POM file." echo -e "\t-r --rules=: path to the file containing the" echo -e "\t rules to apply when cleaning the POM." echo -e "\t Optional, the default location is debian/maven.rules" echo -e "\t-v --verbose: show more information while running" echo -e "\t-n --no-act: don't actually do anything, just print the results" echo -e "" echo -e "The .poms file should contain the list of POM files associated with the" echo -e "list of jars to install in the repository, and each pom file should have either" echo -e "the option --usj-name, giving the name of the jar (without the extension)" echo -e "to link to and located in /usr/share/java, or the option --artifact, which should" echo -e "contain the full name of the source jar to link to." echo -e "" echo -e "See also: mh_linkjar(1), mh_install(1)" exit 1 } ARGS="p package e set-version r rules v verbose n no-act skip-clean-poms" parseargs "$@" SETVERSION=$(getarg e set-version) RULES=$(getarg r rules) PACKAGE=$(getarg p package) VERBOSE=$(getarg v verbose) NOACT=$(getarg n no-act) SKIP_CLEAN_POMS=$(getarg skip-clean-poms) function linkpackagejars() { p=$1 DH_OPTS="${VERBOSE:+-v} ${NOACT:+-n}" MH_ARGS="--package=${p} ${VERBOSE:+--verbose} ${SETVERSION:+--set-version=$SETVERSION} ${RULES:+--rules=$RULES} ${SKIP_CLEAN_POMS:+--skip-clean-pom}" if [ -z "$NOACT" ]; then cat debian/$p.poms | while read POM OPT1 OPT2 OPT3 OPT4 OPT5 OPT6 OPT7 OPT8 OPT9 OPT10; do # Remove comments POM=${POM##\#*} if [[ -n "$POM" ]]; then POM_DIR=$(dirname $POM) ARTIFACT= C=1 _opt=$(eval echo '$OPT'$C) while [ -n "$_opt" ]; do if [ "--usj-name" = "${_opt%%=*}" ]; then export ARTIFACT=/usr/share/java/${_opt##--usj-name=}.jar # Unset the option where we found the artifact eval OPT$C= # shift all following options while [ -n "$_opt" ]; do C1=$(( $C + 1 )) eval OPT$C='$OPT'$C1 C=$C1 _opt=$(eval echo '$OPT'$C) done elif [ "--artifact" = "${_opt%%=*}" ]; then export ARTIFACT=${_opt##--artifact=} # Unset the option where we found the artifact eval OPT$C= # shift all following options while [ -n "$_opt" ]; do C1=$(( $C + 1 )) eval OPT$C='$OPT'$C1 C=$C1 _opt=$(eval echo '$OPT'$C) done fi C=$(( $C + 1 )) _opt=$(eval echo '$OPT'$C) done if [[ ! "--ignore" == "$OPT1" ]]; then if [[ -n "$ARTIFACT" ]]; then if [[ ! -z "$VERBOSE" || "$DH_VERBOSE" = "1" ]]; then echo -e "\tmh_linkjar $OPT1 $OPT2 $OPT3 $OPT4 $OPT5 $OPT6 $OPT7 $OPT8 $OPT9 $OPT10 $DH_OPTS $MH_ARGS $POM $ARTIFACT" fi mh_linkjar $OPT1 $OPT2 $OPT3 $OPT4 $OPT5 $OPT6 $OPT7 $OPT8 $OPT9 $OPT10 $DH_OPTS $MH_ARGS $POM $ARTIFACT fi fi fi done fi } if [ -n "$PACKAGE" ]; then linkpackagejars $PACKAGE else for p in `findpackages`; do if [ -f debian/$p.poms ]; then linkpackagejars $p fi done fi maven-repo-helper-1.8.5/src/main/bin/mh_installpom0000644000000000000000000002065612247273474017042 0ustar #!/bin/bash -- # Copyright 2009 Ludovic Claude. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. set -e . /usr/share/maven-repo-helper/mh_lib.sh syntax() { echo -e "Usage: mh_installpom [option]... [pom]" echo -e "Installs the POM file in /usr/share/maven-repo, at the correct location for" echo -e "Maven." echo -e "Before installing the POM, it prepares it with mh_cleanpom." echo -e "" echo -e "debian/maven.rules is used to alter the version properties for the library and" echo -e "its dependencies." echo -e "" echo -e "Prefer to use mh_installpoms as it reuses the information in" echo -e "debian/\$package.poms and avoids repetition." echo -e "" echo -e "Where" echo -e "\t[pom] is the location of the POM file to install." echo -e "\t GroupId, artifactId and version will be extracted from this file." echo -e "Options:" echo -e "\t-h --help: show this text" echo -e "\t-V --version: show the version" echo -e "\t-p --package=: name of the Debian package which" echo -e "\t will contain this POM file" echo -e "\t-h --has-package-version: flag that indicates that this POM has the" echo -e "\t same version as the package, this helps packagers of depending packages" echo -e "\t-o --no-parent: don't inherit from a parent POM" echo -e "\t-k --keep-pom-version: keep the original version of the POM but" echo -e "\t convert all other versions in dependencies and plugins." echo -e "\t If there is a parent POM, keeps its version except when the parent is already" echo -e "\t registered in the Maven repository" echo -e "\t-e, --set-version=: set the version for the POM," echo -e "\t do not use the version declared in the POM file." echo -e "\t-r --rules=: path to the file containing the" echo -e "\t rules to apply when cleaning the POM." echo -e "\t Optional, the default location is debian/maven.rules" echo -e "\t-u --published-rules=: path to the file containing the" echo -e "\t extra rules to publish in the property debian.mavenRules in the" echo -e "\t cleaned POM." echo -e "\t Optional, the default location is debian/maven.publishedRules" echo -e "\t-i --ignore-rules=: path to the file containing the" echo -e "\t rules used to remove certain dependencies from the cleaned POM" echo -e "\t Optional, the default location is debian/maven.ignoreRules" echo -e "\t-c --clean-ignore-rules=: path to the file containing the" echo -e "\t rules use to remove certain dependencies from the cleaned POM," echo -e "\t in addition to the ignore rules specified previously. This is" echo -e "\t useful in situations such as when the Maven clean target requires more" echo -e "\t dependencies or plugins to ignore than the build target." echo -e "\t All rules defined in clean-ignore-rules will be added to the existing" echo -e "\t rules in ignore-rules." echo -e "\t Optional, the default location is debian/maven.cleanIgnoreRules" echo -e "\t-s --no-rules: don't apply any rules for converting versions," echo -e "\t do not even convert versions to the default 'debian' version" echo -e "\t--no-publish-used-rule: don't publish the rule used to transform" echo -e "\t a POM's own attributes in debian.mavenRules" echo -e "\t--keep-elements=: keep the elements listed here" echo -e "\t even if they are normally removed by the clean operation." echo -e "\t Such elements are build,reports,reporting,prerequisites,profiles." echo -e "\t-m--maven-repo=: location of the Maven repository," echo -e "\t used to force the versions of the Maven plugins used in the current" echo -e "\t POM file with the versions found in the repository" echo -e "\t-v --verbose: show more information while running" echo -e "\t-n --no-act: don't actually do anything, just print the results" echo -e "\t-ignore-pom: read the POM but don't install it" echo -e "" echo -e "See also: mh_installpoms(1), mh_cleanpom(1)" exit 1 } # The following elements are options which just need to be ignored: artifact java-lib usj-name usj-version no-usj-versionless dest-jar classifier ARGS="p package o no-parent k keep-pom-version e set-version r rules u published-rules i ignore-rules c clean-ignore-rules s no-rules no-publish-used-rule v verbose n no-act m maven-repo h has-package-version keep-elements artifact java-lib usj-name usj-version no-usj-versionless dest-jar ignore-pom classifier" parseargs "$@" if [ "$ARGC" -lt "1" ]; then syntax fi NOPARENT=$(getarg o no-parent) KEEP_POM_VERSION=$(getarg k keep-pom-version) SETVERSION=$(getarg e set-version) RULES=$(getarg r rules) PUBLISHED_RULES=$(getarg u published-rules) IGNORE_RULES=$(getarg i ignore-rules) CLEAN_IGNORE_RULES=$(getarg c clean-ignore-rules) NORULES=$(getarg s no-rules) NO_PUBLISH_USED_RULE=$(getarg no-publish-used-rule) MAVEN_REPO=$(getarg m maven-repo) PACKAGE=$(getarg p package) PACKAGE=${PACKAGE:?"Package parameter (-p) is mandatory"} VERBOSE=$(getarg v verbose) NOACT=$(getarg n no-act) POM="${ARGV[0]}" IGNORE_POM=$(getarg ignore-pom) HAS_PACKAGE_VERSION=$(getarg h has-package-version) KEEP_ELEMENTS=$(getarg keep-elements) if [ -z "$PUBLISHED_RULES" ]; then if [ -f debian/maven.publishedRules ]; then PUBLISHED_RULES="debian/maven.publishedRules" fi fi if [ -z "$IGNORE_RULES" ]; then if [ -f debian/maven.ignoreRules ]; then IGNORE_RULES="debian/maven.ignoreRules" fi fi if [ -z "$RULES" ]; then if [ -f debian/maven.rules ]; then RULES="debian/maven.rules" fi fi if [ -z "$MAVEN_REPO" ]; then if [ -f /usr/share/maven-repo ]; then MAVEN_REPO="/usr/share/maven-repo" fi fi DH_OPTS="${VERBOSE:+-v} ${NOACT:+-n}" CLEAN_ARGS="--package=${PACKAGE} ${NOPARENT:+--no-parent} ${NORULES:+--no-rules} ${KEEP_POM_VERSION:+--keep-pom-version} ${HAS_PACKAGE_VERSION:+--has-package-version} ${NO_PUBLISH_USED_RULE:+--no-publish-used-rule} ${SETVERSION:+--set-version=$SETVERSION} ${RULES:+--rules=$RULES} ${PUBLISHED_RULES:+--published-rules=$PUBLISHED_RULES} ${IGNORE_RULES:+--ignore-rules=$IGNORE_RULES} ${CLEAN_IGNORE_RULES:+--clean-ignore-rules=$CLEAN_IGNORE_RULES} ${KEEP_ELEMENTS:+--keep-elements=$KEEP_ELEMENTS} ${MAVEN_REPO:+--maven-repo=$MAVEN_REPO}" mkdir -p debian/.mh 2> /dev/null if [[ ! -z "$VERBOSE" || "$DH_VERBOSE" = "1" ]]; then echo -e "\tmh_cleanpom $DH_OPTS $CLEAN_ARGS $POM debian/.mh/pom.xml debian/.mh/pom.properties" fi mh_cleanpom $DH_OPTS $CLEAN_ARGS --keep-pom-version $POM debian/.mh/pom.xml.keep debian/.mh/pom.properties.keep mh_cleanpom $DH_OPTS $CLEAN_ARGS $POM debian/.mh/pom.xml debian/.mh/pom.properties source debian/.mh/pom.properties groupPath=$(echo $groupId | tr . / ) if [[ ! -z "$VERBOSE" || "$DH_VERBOSE" = "1" ]]; then echo -e "\tmv debian/.mh/pom.xml debian/.mh/${artifactId}-${debianVersion}.pom" fi if [ -n "${IGNORE_POM}" ]; then exit fi mv debian/.mh/pom.xml.keep debian/.mh/${artifactId}-${version}.pom mv debian/.mh/pom.xml debian/.mh/${artifactId}-${debianVersion}.pom if [[ ! -z "$VERBOSE" || "$DH_VERBOSE" = "1" ]]; then echo -e "\tinstall -m 644 -D debian/.mh/${artifactId}-${version}.pom debian/${PACKAGE}/usr/share/maven-repo/${groupPath}/${artifactId}/${version}/${artifactId}-${version}.pom" fi install -m 644 -D debian/.mh/${artifactId}-${version}.pom debian/${PACKAGE}/usr/share/maven-repo/${groupPath}/${artifactId}/${version}/${artifactId}-${version}.pom if [[ "${version}" != "${debianVersion}" ]]; then if [[ ! -z "$VERBOSE" || "$DH_VERBOSE" = "1" ]]; then echo -e "\tinstall -m 644 -D debian/.mh/${artifactId}-${debianVersion}.pom debian/${PACKAGE}/usr/share/maven-repo/${groupPath}/${artifactId}/${debianVersion}/${artifactId}-${debianVersion}.pom" fi install -m 644 -D debian/.mh/${artifactId}-${debianVersion}.pom debian/${PACKAGE}/usr/share/maven-repo/${groupPath}/${artifactId}/${debianVersion}/${artifactId}-${debianVersion}.pom fi maven-repo-helper-1.8.5/src/main/bin/mh_installpoms0000644000000000000000000001333612247273474017222 0ustar #!/bin/bash -- # Copyright 2009 Ludovic Claude. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. set -e . /usr/share/maven-repo-helper/mh_lib.sh syntax() { echo -e "Usage: mh_installpoms [option]..." echo -e "Reads the file debian/\$package.poms and installs each POM file" echo -e "listed in the .poms file." echo -e "" echo -e "Options:" echo -e "\t-h --help: show this text" echo -e "\t-V --version: show the version" echo -e "\t-p --package=: name of the Debian package which" echo -e "\t will contain those POM files" echo -e "\t-k --keep-pom-version: keep the original version of the POM but" echo -e "\t convert all other versions in dependencies and plugins." echo -e "\t If there is a parent POM, keeps its version except when the parent is already" echo -e "\t registered in the Maven repository" echo -e "\t-e, --set-version=: set the version for the POM," echo -e "\t do not use the version declared in the POM file." echo -e "\t-r --rules=: path to the file containing the" echo -e "\t rules to apply when cleaning the POM." echo -e "\t Optional, the default location is debian/maven.rules" echo -e "\t-u --published-rules=: path to the file containing the" echo -e "\t extra rules to publish in the property debian.mavenRules in the" echo -e "\t cleaned POM." echo -e "\t Optional, the default location is debian/maven.publishedRules" echo -e "\t-i --ignore-rules=: path to the file containing the" echo -e "\t rules used to remove certain dependencies from the cleaned POM" echo -e "\t Optional, the default location is debian/maven.ignoreRules" echo -e "\t-c --clean-ignore-rules=: path to the file containing the" echo -e "\t rules use to remove certain dependencies from the cleaned POM," echo -e "\t in addition to the ignore rules specified previously. This is" echo -e "\t useful in situations such as when the Maven clean target requires more" echo -e "\t dependencies or plugins to ignore than the build target." echo -e "\t All rules defined in clean-ignore-rules will be added to the existing" echo -e "\t rules in ignore-rules." echo -e "\t Optional, the default location is debian/maven.cleanIgnoreRules" echo -e "\t-s --no-rules: don't apply any rules for converting versions," echo -e "\t do not even convert versions to the default 'debian' version" echo -e "\t--no-publish-used-rule: don't publish the rule used to transform" echo -e "\t a POM's own attributes in debian.mavenRules" echo -e "\t--keep-elements=: keep the elements listed here" echo -e "\t even if they are normally removed by the clean operation." echo -e "\t Such elements are build,reports,reporting,prerequisites,profiles." echo -e "\t-m--maven-repo=: location of the Maven repository," echo -e "\t used to force the versions of the Maven plugins used in the current" echo -e "\t POM file with the versions found in the repository" echo -e "\t-v --verbose: show more information while running" echo -e "\t-n --no-act: don't actually do anything, just print the results" echo -e "" echo -e "See also: mh_installpom(1), mh_cleanpom(1)" exit 1 } ARGS="p package k keep-pom-version e set-version r rules u published-rules i ignore-rules c clean-ignore-rules s no-rules no-publish-used-rule v verbose n no-act m maven-repo keep-elements" parseargs "$@" KEEPVERSION=$(getarg k keep-pom-version) SETVERSION=$(getarg e set-version) RULES=$(getarg r rules) PUBLISHED_RULES=$(getarg u published-rules) IGNORE_RULES=$(getarg i ignore-rules) CLEAN_IGNORE_RULES=$(getarg c clean-ignore-rules) NORULES=$(getarg s no-rules) NO_PUBLISH_USED_RULE=$(getarg no-publish-used-rule) MAVEN_REPO=$(getarg m maven-repo) PACKAGE=$(getarg p package) VERBOSE=$(getarg v verbose) NOACT=$(getarg n no-act) KEEP_ELEMENTS=$(getarg keep-elements) function installpackagepoms() { p=$1 DH_OPTS="${VERBOSE:+-v} ${NOACT:+-n}" MH_ARGS="--package=${p} ${VERBOSE:+--verbose} ${NORULES:+--no-rules} ${KEEPVERSION:+--keep-version} ${NO_PUBLISH_USED_RULE:+--no-publish-used-rule} ${SETVERSION:+--set-version=$SETVERSION} ${RULES:+--rules=$RULES} ${PUBLISHED_RULES:+--published-rules=$PUBLISHED_RULES} ${IGNORE_RULES:+--ignore-rules=$IGNORE_RULES} ${CLEAN_IGNORE_RULES:+--clean-ignore-rules=$CLEAN_IGNORE_RULES} ${KEEP_ELEMENTS:+--keep-elements=$KEEP_ELEMENTS} ${MAVEN_REPO:+--maven-repo=$MAVEN_REPO}" if [ -z "$NOACT" ]; then cat debian/$p.poms | while read POM OPT1 OPT2 OPT3 OPT4 OPT5 OPT6 OPT7 OPT8 OPT9 OPT10; do # Remove comments POM=${POM##\#*} if [[ ! -z "$POM" ]]; then if [[ ! -z "$VERBOSE" || "$DH_VERBOSE" = "1" ]]; then echo -e "\tmh_installpom $DH_OPTS $MH_ARGS $OPT1 $OPT2 $OPT3 $OPT4 $OPT5 $OPT6 $OPT7 $OPT8 $OPT9 $OPT10 $POM" fi if [[ ! "--ignore" == "$OPT1" ]]; then mh_installpom $DH_OPTS $MH_ARGS $OPT1 $OPT2 $OPT3 $OPT4 $OPT5 $OPT6 $OPT7 $OPT8 $OPT9 $OPT10 $POM fi fi done fi } if [ -n "$PACKAGE" ]; then installpackagepoms $PACKAGE else for p in `findpackages`; do if [ -f debian/$p.poms ]; then installpackagepoms $p fi done fi maven-repo-helper-1.8.5/src/main/bin/mh_unpatchpoms0000644000000000000000000000314412247273474017212 0ustar #!/bin/bash -- # Copyright 2009 Ludovic Claude. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. set -e . /usr/share/maven-repo-helper/mh_lib.sh syntax() { echo -e "Usage: mh_unpatchpoms [option]..." echo -e "Restore the POM files that have been patched to their original content." echo -e "" echo -e "Options:" echo -e "\t-h --help: show this text" echo -e "\t-V --version: show the version" echo -e "\t-p --package=: package to act on " echo -e "\t-v --verbose: show more information while running" echo -e "\t-n --no-act: don't actually do anything, just print the results" exit 1 } ARGS="p package v verbose n no-act" parseargs "$@" PACKAGE=$(getarg p package) PACKAGE=${PACKAGE:?"Package parameter (-p) is mandatory"} VERBOSE=$(getarg v verbose) NOACT=$(getarg n no-act) if [ -z "$NOACT" ]; then cat debian/$PACKAGE.poms | while read POM OPT1 OPT2; do # Remove comments POM=${POM##\#*} if [ ! -z "$POM" ]; then if [ -e ${POM}.save ]; then rm $POM mv ${POM}.save $POM fi fi done fi maven-repo-helper-1.8.5/src/main/bin/mh_clean0000644000000000000000000000162012247273474015730 0ustar #!/bin/bash -- # Copyright 2009 Ludovic Claude. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. set -e . /usr/share/maven-repo-helper/mh_lib.sh syntax() { echo -e "Usage: mh_clean" echo -e "Cleans the temporary files created by the other mh_* utilities." echo -e "" exit 1 } parseargs "$@" if [ -f "debian/.mh_clean" ]; then rm -f `cat debian/.mh_clean` debian/.mh_clean fi rm -rf debian/.mh maven-repo-helper-1.8.5/src/main/bin/mh_cleanpom0000644000000000000000000002715312247273474016455 0ustar #!/bin/bash -- # Copyright 2009 Ludovic Claude. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. set -e . /usr/share/maven-repo-helper/mh_lib.sh syntax() { echo -e "Usage: mh_cleanpom [option]... [pom] [target] [pom-props]" echo -e "Cleans the POM and prepare it for inclusion in the Maven repository." echo -e "Also extracts some information from the POM." echo -e "" echo -e "debian/maven.rules is used to alter the version properties for the library and" echo -e "its dependencies." echo -e "" echo -e "Where" echo -e "\t[pom] is the location of the POM file to clean." echo -e "\t Default to pom.xml or debian/pom.xml" echo -e "\t[target] is where the cleaned POM is written to." echo -e "\t Default to debian/.mh/pom.xml" echo -e "\t[pom-props] is where the POM properties file will be written." echo -e "\t Default to debian/.mh/pom.properties" echo -e "Options:" echo -e "\t-h --help: show this text" echo -e "\t-V --version: show the version" echo -e "\t-p --package=: name of the Debian package which" echo -e "\t will contain this POM file" echo -e "\t-h --has-package-version: flag that indicates that this POM has the" echo -e "\t same version as the package, this helps packagers of depending packages" echo -e "\t-o --no-parent: don't inherit from a parent POM" echo -e "\t-k --keep-pom-version: keep the original version of the POM but" echo -e "\t convert all other versions in dependencies and plugins." echo -e "\t If there is a parent POM, keeps its version except when the parent is already" echo -e "\t registered in the Maven repository" echo -e "\t-e, --set-version=: set the version for the POM," echo -e "\t do not use the version declared in the POM file." echo -e "\t-r --rules=: path to the file containing the" echo -e "\t rules to apply when cleaning the POM." echo -e "\t Optional, the default location is debian/maven.rules" echo -e "\t-R, --extra-rule=: extra rule to apply when cleaning the POM" echo -e "\t May occur multiple times, instead of or in addition to -r" echo -e "\t-u --published-rules=: path to the file containing the" echo -e "\t extra rules to publish in the property debian.mavenRules in the" echo -e "\t cleaned POM." echo -e "\t Optional, the default location is debian/maven.publishedRules" echo -e "\t-U, --extra-published-rule=: extra rule to publish" echo -e "\t May occur multiple times, instead of or in addition to -u" echo -e "\t-i --ignore-rules=: path to the file containing the" echo -e "\t rules used to remove certain dependencies from the cleaned POM" echo -e "\t Optional, the default location is debian/maven.ignoreRules" echo -e "\t-I, --extra-ignore-rule=: extra rule used to remove dependencies" echo -e "\t from the transformed POM" echo -e "\t May occur multiple times, instead of or in addition to -i" echo -e "\t-c --clean-ignore-rules=: path to the file containing the" echo -e "\t rules use to remove certain dependencies from the cleaned POM," echo -e "\t in addition to the ignore rules specified previously. This is" echo -e "\t useful in situations such as when the Maven clean target requires more" echo -e "\t dependencies or plugins to ignore than the build target." echo -e "\t All rules defined in clean-ignore-rules will be added to the existing" echo -e "\t rules in ignore-rules." echo -e "\t Optional, the default location is debian/maven.cleanIgnoreRules" echo -e "\t-s --no-rules: don't apply any rules for converting versions," echo -e "\t do not even convert versions to the default 'debian' version" echo -e "\t--no-publish-used-rule: don't publish the rule used to transform" echo -e "\t a POM's own attributes in debian.mavenRules" echo -e "\t--keep-elements=: keep the elements listed here" echo -e "\t even if they are normally removed by the clean operation." echo -e "\t Such elements are build,reports,reporting,prerequisites,profiles." echo -e "\t-m--maven-repo=: location of the Maven repository," echo -e "\t used to force the versions of the Maven plugins used in the current" echo -e "\t POM file with the versions found in the repository" echo -e "\t-v --verbose: show more information while running" echo -e "\t-n --no-act: don't actually do anything, just print the results" echo -e "" echo -e "Description:" echo -e "\tCleans a Maven POM and prepare it for inclusion in the Debian" echo -e "\trepository for Maven." echo -e "" echo -e "\tThe POM will be normalised, and its parent tag removed if the option" echo -e "\t--no-parent is given. The version will be replaced by 'debian', unless" echo -e "\ta special rule applies (see below the discussion about rules)." echo -e "\tBuild, profiles and other build time only sections of the POM" echo -e "\twill be stripped." echo -e "" echo -e "\tIf versions are given for a dependency, this version will be" echo -e "\treplaced by the 'debian' version, or a rule can be given to" echo -e "\tuse a custom version" echo -e "" echo -e "\tYou can modify those defaults with the help of the" echo -e "\trules file. This file should contain the lines with the format:" echo -e "\t [artifactId] [type] [version] [classifier] [scope]" echo -e "\twhere groupId, artifactId, type, version, classifier and scope can be" echo -e "\tthe explicit attribute to match, or can contain a wildcard (*) for" echo -e "\tgeneric matches." echo -e "" echo -e "\tEach one of those elements can also be a replace rule, of the form" echo -e "\ts/// where regex is a regular expression, and replace" echo -e "\tis the replacement. Substitution groups \$1 \$2... can be used in the" echo -e "\treplacement if capture groups () have been used in the regex." echo -e "" echo -e "\tThe first element is mandatory (groupId), but you can ignore the" echo -e "\telements on the right hand side." echo -e "\tIf the scope is missing, then any scope is matched and left unchanged." echo -e "\tIf the version is missing, then any version will be replaced with" echo -e "\t'debian'." echo -e "\tIf type is missing, then any type is matched and left unchanged." echo -e "\tIf artifactId is missing, then any artifactId is matched and left" echo -e "\tunchanged." echo -e "" echo -e "\tYou can also have comments in this file, it should be a line starting" echo -e "\twith #" echo -e "" echo -e "Example of a rules file:" echo -e "" echo -e "\ts/commons-(.*)/org.apache.commons.commons\$1/" echo -e "\torg.itext * * s/1\\..*/1.x/" echo -e "\torg.itext * * s/2\\..*/2.x/" echo -e "\t# use the alpha version of plexus-container-default" echo -e "\torg.codehaus.plexus plexus-container-default jar s/1\\.0-alpha.*/1.0-alpha/" echo -e "" echo -e "\tThis rules file does the following:" echo -e "\t- all groupIds starting with commons- will have" echo -e "\t- org.apache.commons. prefixed to them" echo -e "\t- any artifact in the org.itext group with a version number starting" echo -e "\t with 1. will use the 1.x version" echo -e "\t- any artifact in the org.itext group with a version number starting" echo -e "\t with 2. will use the 2.x version" echo -e "\t- the jar with groupId=org.codehaus.plexus and" echo -e "\t artifactId=plexus-container-default and a version starting with" echo -e "\t 1.0-alpha- will use the 1.0-alpha version" echo -e "" echo -e "\tThe default rule (* * * s/.*/debian/ *) replaces any version number with" echo -e "\tthe 'debian' version and always applies last if there was no other" echo -e "\tmatches." echo -e "\tAnother default rule (* * maven-plugin * *) keep the version for all" echo -e "\tplugins as the plugin mechanism requires a version in Maven." echo -e "" echo -e "\tAny rules given on the command line (using -R/--extra-rule," echo -e "\t-U/--extra-published-rule or -I/--extra-ignore-rule) are applied" echo -e "\tin the order given, in between the rules given in the rules file" echo -e "\t(if any) and the default rules." echo -e "" echo -e "See also: mh_installpom(1), mh_installpoms(1)" exit 1 } ARGS="p package o no-parent k keep-pom-version e set-version r rules R extra-rule u published-rules U extra-published-rule i ignore-rules I extra-ignore-rule c clean-ignore-rules s no-rules no-publish-used-rule v verbose n no-act m maven-repo h has-package-version keep-elements" parseargs "$@" if [ "$ARGC" -lt "1" ]; then syntax fi NOPARENT=$(getarg o no-parent) KEEP_POM_VERSION=$(getarg k keep-pom-version) SETVERSION=$(getarg e set-version) RULES=$(getarg r rules) eval EXTRA_RULES=$(getargs R extra-rule) PUBLISHED_RULES=$(getarg u published-rules) eval EXTRA_PUBLISHED_RULES=$(getargs U extra-published-rule) IGNORE_RULES=$(getarg i ignore-rules) eval EXTRA_IGNORE_RULES=$(getargs I extra-ignore-rule) CLEAN_IGNORE_RULES=$(getarg c clean-ignore-rules) NORULES=$(getarg s no-rules) NO_PUBLISH_USED_RULE=$(getarg no-publish-used-rule) MAVEN_REPO=$(getarg m maven-repo) PACKAGE=$(getarg p package) PACKAGE=${PACKAGE:?"Package parameter (-p) is mandatory"} VERBOSE=$(getarg v verbose) NOACT=$(getarg n no-act) POM="${ARGV[0]}" TARGET="${ARGV[1]:-debian/.mh/pom.xml}" POM_PROPS="${ARGV[2]:-debian/.mh/pom.properties}" HAS_PACKAGE_VERSION=$(getarg h has-package-version) KEEP_ELEMENTS=$(getarg keep-elements) if [ -z "$POM" ]; then if [ -f debian/pom.xml ]; then POM="debian/pom.xml" else POM="pom.xml" fi fi if [ -z "$PUBLISHED_RULES" ]; then if [ -f debian/maven.publishedRules ]; then PUBLISHED_RULES="debian/maven.publishedRules" fi fi if [ -z "$IGNORE_RULES" ]; then if [ -f debian/maven.ignoreRules ]; then IGNORE_RULES="debian/maven.ignoreRules" fi fi if [ -z "$CLEAN_IGNORE_RULES" ]; then if [ -f debian/maven.cleanIgnoreRules ]; then CLEAN_IGNORE_RULES="debian/maven.cleanIgnoreRules" fi fi if [ -z "$RULES" ]; then if [ -f debian/maven.rules ]; then RULES="debian/maven.rules" fi fi if [ -z "$MAVEN_REPO" ]; then if [ -f /usr/share/maven-repo ]; then MAVEN_REPO="/usr/share/maven-repo" fi fi DH_OPTS="${VERBOSE:+-v} ${NOACT:+-n}" CLEAN_ARGS=(--package=${PACKAGE} ${NOPARENT:+--no-parent} ${NORULES:+--no-rules} ${KEEP_POM_VERSION:+--keep-pom-version} ${HAS_PACKAGE_VERSION:+--has-package-version} ${NO_PUBLISH_USED_RULE:+--no-publish-used-rule} ${SETVERSION:+--set-version=$SETVERSION} ${RULES:+--rules=$RULES} ${PUBLISHED_RULES:+--published-rules=$PUBLISHED_RULES} ${IGNORE_RULES:+--ignore-rules=$IGNORE_RULES} ${CLEAN_IGNORE_RULES:+--clean-ignore-rules=$CLEAN_IGNORE_RULES} ${KEEP_ELEMENTS:+--keep-elements=$KEEP_ELEMENTS} ${MAVEN_REPO:+--maven-repo=$MAVEN_REPO} "${EXTRA_RULES[@]/#/--extra-rule=}" "${EXTRA_PUBLISHED_RULES[@]/#/--extra-published-rule=}" "${EXTRA_IGNORE_RULES[@]/#/--extra-ignore-rule=}") if [ -z "$NOACT" ]; then java -cp $CLASSPATH $JAVA_OPTIONS org.debian.maven.repo.POMCleaner $DH_OPTS "${CLEAN_ARGS[@]}" $POM $TARGET $POM_PROPS fi maven-repo-helper-1.8.5/src/test/0000755000000000000000000000000012247273474013523 5ustar maven-repo-helper-1.8.5/src/test/resources/0000755000000000000000000000000012247273474015535 5ustar maven-repo-helper-1.8.5/src/test/resources/modello-core.xml0000644000000000000000000000240612247273474020642 0ustar modello org.codehaus.modello 1.0-alpha-22 4.0.0 modello-core Modello Core org.codehaus.plexus plexus-container-default org.codehaus.modello modello-test test maven-assembly-plugin jar-with-dependencies org.codehaus.modello.ModelloCli maven-repo-helper-1.8.5/src/test/resources/plexus-container-default.xml0000644000000000000000000000356312247273474023210 0ustar plexus-containers org.codehaus.plexus 1.0.3 4.0.0 plexus-container-default Default Plexus Container 1.0-alpha-9-stable-1 maven-surefire-plugin **/Test*.java **/Abstract*.java org.apache.maven.wagon wagon-webdav 1.0-beta-2 junit junit 3.8.1 compile org.codehaus.plexus plexus-utils 1.0.4 classworlds classworlds 1.1-alpha-2 codehaus.org Plexus Central Repository dav:https://dav.codehaus.org/repository/plexus codehaus.org Plexus Central Development Repository dav:https://dav.codehaus.org/snapshots.repository/plexus codehaus.org dav:https://dav.codehaus.org/plexus maven-repo-helper-1.8.5/src/test/resources/modello-core.transformed0000644000000000000000000000264412247273474022372 0ustar 4.0.0 org.codehaus.modello modello-core debian jar org.codehaus.modello modello debian 1.0-alpha-22 libmodello-java Modello Core org.codehaus.plexus plexus-container-default org.codehaus.modello modello-test test maven-assembly-plugin jar-with-dependencies org.codehaus.modello.ModelloCli maven-repo-helper-1.8.5/src/test/resources/doxia-module-fml.transformed0000644000000000000000000000734712247273474023161 0ustar 4.0.0 org.apache.maven.doxia doxia-module-fml 1.1.2 jar org.apache.maven.doxia doxia-modules debian ../pom.xml 1.1.2 libdoxia-java Doxia :: FML Module A Doxia module for FML source documents. org.codehaus.plexus plexus-utils org.apache.maven.doxia doxia-test-docs test xerces xercesImpl debian test org.codehaus.modello modello-maven-plugin descriptor generate-sources java src/main/mdo/fml.mdo 1.0.0 reporting org.apache.maven.plugins maven-antrun-plugin site run xsddoc xsddoc debian xalan xalan debian maven-repo-helper-1.8.5/src/test/resources/maven-core.transformed0000644000000000000000000001724412247273474022047 0ustar 4.0.0 org.apache.maven maven-core debian jar org.apache.maven maven debian 2.1.1-SNAPSHOT maven2 Maven Core org.apache.maven maven-settings org.apache.maven.wagon wagon-file runtime org.apache.maven maven-plugin-parameter-documenter org.apache.maven.wagon wagon-webdav-jackrabbit runtime org.apache.maven.wagon wagon-http-lightweight runtime org.apache.maven.reporting maven-reporting-api org.apache.maven maven-profile org.apache.maven maven-model org.apache.maven maven-artifact org.apache.maven.wagon wagon-provider-api org.codehaus.plexus plexus-container-default org.apache.maven maven-repository-metadata org.apache.maven maven-error-diagnostics org.apache.maven maven-project commons-cli commons-cli commons-lang commons-lang commons-logging commons-logging org.apache.maven maven-plugin-api org.apache.maven.wagon wagon-ssh-external runtime org.apache.maven maven-plugin-descriptor org.codehaus.plexus plexus-interactivity-api debian plexus-utils plexus plexus-container-default org.codehaus.plexus org.apache.maven maven-artifact-manager org.apache.maven maven-monitor org.apache.maven.wagon wagon-ssh org.codehaus.plexus plexus-utils classworlds classworlds org.sonatype.plexus plexus-sec-dispatcher src/main/resources true org.codehaus.mojo l10n-maven-plugin 1.0-alpha-1 el de es fr ja nl no pl zh_CN include-site org.apache.maven.plugins maven-scm-plugin scm:svn:http://svn.apache.org/repos/asf/maven/site/trunk ${project.build.directory}/maven-site initialize checkout org.apache.maven.plugins maven-invoker-plugin ${project.build.directory}/maven-site ${project.build.directory}/maven-site/pom.xml clean site initialize initialize run buildnumber .svn org.codehaus.mojo buildnumber-maven-plugin 1.0-beta-1 generate-resources create false false maven-repo-helper-1.8.5/src/test/resources/hibernate-validator.transformed0000644000000000000000000002016712247273474023735 0ustar 4.0.0 org.hibernate hibernate-validator 4.0.2.GA jar org.hibernate hibernate-validator-parent 4.0.2.GA ../pom.xml 4.0.2.GA libhibernate-validator-java Hibernate Validator site http://validator.hibernate.org javax.validation validation-api debian org.slf4j slf4j-api debian com.googlecode.jtype jtype debian org.slf4j slf4j-log4j12 runtime true debian org.hibernate.java-persistence jpa-api debian true org.testng testng test jdk15 debian test src/main/resources true src/main/xsd META-INF true org.apache.maven.plugins maven-source-plugin attach-sources jar org.codehaus.mojo jaxb2-maven-plugin xjc org.hibernate.validator.xml ${basedir}/target/generated-sources true org.apache.maven.plugins maven-surefire-plugin ${basedir}/src/test/suite/unit-tests.xml org.apache.maven.plugins maven-surefire-report-plugin generate-test-report test report-only ${project.build.directory}/surefire-reports test-report 2.4.3 org.apache.maven.plugins maven-shade-plugin package shade com.googlecode.jtype:jtype com.googlecode.jtype org.hibernate.validator.jtype 1.2.1 org.jboss.maven.plugins maven-jdocbook-plugin 2.2.0 true org.hibernate hibernate-jdocbook-style debian jdocbook-style master.xml ${basedir}/src/main/docbook en-US ${basedir}/src/main/docbook/en-US/images pdf classpath:/xslt/org/hibernate/jdocbook/xslt/pdf.xsl hibernate_reference.pdf html_single classpath:/xslt/org/hibernate/jdocbook/xslt/xhtml-single.xsl index.html html classpath:/xslt/org/hibernate/jdocbook/xslt/xhtml.xsl index.html true saxon 1.72.0 - make-doc site resources generate org.jboss.maven.plugins maven-jdocbook-style-plugin 2.0.0 maven-assembly-plugin src/main/assembly/dist.xml make-assembly site assembly org.twdata.maven maven-cli-plugin 0.6.3.CR3 org.apache.maven.plugins maven-project-info-reports-plugin 2.0.1 jaxb 1.5 javax.xml.bind jaxb-api debian com.sun.xml.bind jaxb-impl debian maven-repo-helper-1.8.5/src/test/resources/apache.cleaned0000644000000000000000000001720512247273474020300 0ustar 4.0.0 org.apache apache debian pom The Apache Software Foundation The Apache Software Foundation provides support for the Apache community of open-source software projects. The Apache projects are characterized by a collaborative, consensus based development process, an open andpragmatic software license, and a desire to create high quality software that leads the way in its field. We consider ourselves not simply a group of projects sharing a server, but rather a community of developersand users. The Apache Software License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0.txt repo The Apache Software Foundation http://www.apache.org/ http://www.apache.org/ Apache Announce List announce-subscribe@apache.org announce-unsubscribe@apache.org announce@apache.org http://mail-archives.apache.org/mod_mbox/www-announce/ Apache Development Snapshot Repository https://repository.apache.org/content/repositories/snapshots http://www.apache.org/images/asf_logo_wide.gif UTF-8 source-release 7 libmaven-parent-poms scm:svn:http://svn.apache.org/repos/asf/maven/pom/tags/apache-7 scm:svn:https://svn.apache.org/repos/asf/maven/pom/tags/apache-7 http://svn.apache.org/viewvc/maven/pom/tags/apache-7 org.apache.maven.plugins maven-antrun-plugin org.apache.maven.plugins maven-assembly-plugin org.apache.maven.plugins maven-clean-plugin org.apache.maven.plugins maven-compiler-plugin 1.4 1.4 ${project.build.sourceEncoding} org.apache.maven.plugins maven-docck-plugin org.apache.maven.plugins maven-enforcer-plugin org.apache.maven.plugins maven-gpg-plugin org.apache.maven.plugins maven-install-plugin org.apache.maven.plugins maven-invoker-plugin org.apache.maven.plugins maven-jar-plugin true true org.apache.maven.plugins maven-javadoc-plugin org.apache.maven.plugins maven-plugin-plugin org.apache.maven.plugins maven-remote-resources-plugin org.apache.maven.plugins maven-resources-plugin ${project.build.sourceEncoding} org.apache.maven.plugins maven-site-plugin org.apache.maven.plugins maven-surefire-plugin org.codehaus.mojo clirr-maven-plugin org.codehaus.plexus plexus-maven-plugin org.codehaus.modello modello-maven-plugin org.apache.maven.plugins maven-remote-resources-plugin process org.apache:apache-jar-resource-bundle:1.x maven-project-info-reports-plugin maven-repo-helper-1.8.5/src/test/resources/plexus-active-collections.pom0000644000000000000000000000533512247273474023365 0ustar 4.0.0 plexus-components org.codehaus.plexus 1.1.6 plexus-active-collections 1.0-beta-2 Plexus Container-Backed Active Collections org.codehaus.plexus plexus-component-api 1.0-alpha-22 provided org.codehaus.plexus plexus-container-default 1.0-alpha-22 junit junit 3.8.1 test maven-surefire-plugin **/TestComponent.java **/TestBadComponent.java **/*TCK.java org.codehaus.plexus plexus-maven-plugin 1.3 create-component-descriptor descriptor scm:svn:http://svn.codehaus.org/plexus/tags/plexus-active-collections-1.0-beta-2 scm:svn:https://svn.codehaus.org/plexus/tags/plexus-active-collections-1.0-beta-2 maven-repo-helper-1.8.5/src/test/resources/maven.cleaned0000644000000000000000000003001012247273474020152 0ustar 4.0.0 org.apache.maven maven debian pom Maven Maven is a project development management and comprehension tool. Based on the concept of a project object model: builds, dependency management, documentation creation, site publication, and distribution publication are all controlled from the declarative file. Maven can be extended by plugins to utilise a number of other development tools for reporting or the build process. http://maven.apache.org 2001 jira http://jira.codehaus.org/browse/MNG Maven User List users-subscribe@maven.apache.org users-unsubscribe@maven.apache.org users@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-users http://www.mail-archive.com/users@maven.apache.org/ http://www.nabble.com/Maven---Users-f178.html http://maven.users.markmail.org/ Maven Developer List dev-subscribe@maven.apache.org dev-unsubscribe@maven.apache.org dev@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-dev http://www.mail-archive.com/dev@maven.apache.org/ http://www.nabble.com/Maven-Developers-f179.html http://maven.dev.markmail.org/ Maven Issues List issues-subscribe@maven.apache.org issues-unsubscribe@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-issues/ http://www.mail-archive.com/issues@maven.apache.org http://www.nabble.com/Maven---Issues-f15573.html http://maven.issues.markmail.org/ Maven Commits List commits-subscribe@maven.apache.org commits-unsubscribe@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-commits http://www.mail-archive.com/commits@maven.apache.org http://www.nabble.com/Maven---Commits-f15575.html http://maven.commits.markmail.org/ Maven Announcements List announce@maven.apache.org announce-subscribe@maven.apache.org announce-unsubscribe@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-announce/ http://www.mail-archive.com/announce@maven.apache.org http://www.nabble.com/Maven-Announcements-f15617.html http://maven.announce.markmail.org/ Maven Notifications List notifications-subscribe@maven.apache.org notifications-unsubscribe@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-notifications/ http://www.mail-archive.com/notifications@maven.apache.org http://www.nabble.com/Maven---Notifications-f15574.html http://maven.notifications.markmail.org/ scm:svn:http://svn.apache.org/repos/asf/maven/components/branches/maven-2.1.x scm:svn:https://svn.apache.org/repos/asf/maven/components/branches/maven-2.1.x http://svn.apache.org/viewvc/maven/components/branches/maven-2.1.x maven-artifact maven-artifact-manager maven-artifact-test maven-core maven-error-diagnostics maven-model maven-monitor maven-plugin-api maven-plugin-descriptor maven-plugin-parameter-documenter maven-plugin-registry maven-profile maven-project maven-reporting maven-repository-metadata maven-script maven-settings maven-toolchain apache-maven 2.1.0-SNAPSHOT 1.0-beta-5 3.8.1 2.1.0-SNAPSHOT maven2 junit junit debian test org.apache.maven maven-plugin-descriptor debian org.apache.maven maven-error-diagnostics debian org.apache.maven maven-model debian org.apache.maven maven-project debian org.apache.maven.reporting maven-reporting-api debian org.apache.maven maven-repository-metadata debian org.apache.maven maven-artifact debian org.apache.maven maven-artifact-manager debian org.apache.maven maven-artifact-test debian org.apache.maven maven-settings debian org.apache.maven maven-core debian org.apache.maven maven-toolchain debian org.apache.maven maven-plugin-parameter-documenter debian org.apache.maven maven-profile debian org.apache.maven maven-plugin-registry debian org.apache.maven maven-plugin-api debian org.apache.maven maven-monitor debian org.apache.maven maven-toolchain debian commons-cli commons-cli debian org.apache.maven.doxia doxia-sink-api debian org.apache.maven.doxia doxia-logging-api debian org.codehaus.plexus plexus-interpolation debian org.codehaus.plexus plexus-container-default 1.0-alpha org.codehaus.plexus plexus-utils debian org.sonatype.plexus plexus-sec-dispatcher debian org.apache.maven.wagon wagon-provider-api debian org.apache.maven.wagon wagon-ssh debian org.apache.maven.wagon wagon-ssh-external debian org.apache.maven.wagon wagon-file debian org.apache.maven.wagon wagon-webdav-jackrabbit debian org.apache.maven.wagon wagon-http-lightweight debian backport-util-concurrent backport-util-concurrent debian easymock easymock debian test classworlds classworlds debian maven-repo-helper-1.8.5/src/test/resources/antlr3-tools.xml0000644000000000000000000000643112247273474020624 0ustar 4.0.0 org.antlr antlr jar ANTLR Grammar Tool http://antlr.org org.antlr antlr-master 3.2 org.antlr antlr-runtime ${project.version} compile junit junit 4.5 test install org.antlr antlr3-maven-plugin 3.1.3-1 target/generated-sources/antlr/org/antlr/grammar/v3 antlr org.codehaus.mojo antlr-maven-plugin src/main/antlr2/org/antlr/grammar/v2 antlr.g codegen.g, antlr.print.g, assign.types.g, buildnfa.g, define.g generate maven-compiler-plugin 1.5 1.5 src maven-repo-helper-1.8.5/src/test/resources/org/0000755000000000000000000000000012247273474016324 5ustar maven-repo-helper-1.8.5/src/test/resources/org/apache/0000755000000000000000000000000012247273474017545 5ustar maven-repo-helper-1.8.5/src/test/resources/org/apache/maven/0000755000000000000000000000000012247273474020653 5ustar maven-repo-helper-1.8.5/src/test/resources/org/apache/maven/project/0000755000000000000000000000000012247273474022321 5ustar maven-repo-helper-1.8.5/src/test/resources/org/apache/maven/project/pom-4.0.0.xml0000644000000000000000000001466512247273474024307 0ustar 4.0.0 Maven Default Project central Maven Repository Switchboard default http://repo1.maven.org/maven2 false central Maven Plugin Repository http://repo1.maven.org/maven2 default false never ${project.basedir}/target ${project.build.directory}/classes ${project.artifactId}-${project.version} ${project.build.directory}/test-classes ${project.basedir}/src/main/java src/main/scripts ${project.basedir}/src/test/java ${project.basedir}/src/main/resources ${project.basedir}/src/test/resources maven-antrun-plugin 1.3 maven-assembly-plugin 2.2-beta-4 maven-clean-plugin 2.3 maven-compiler-plugin 2.0.2 maven-dependency-plugin 2.1 maven-deploy-plugin 2.4 maven-ear-plugin 2.3.2 maven-ejb-plugin 2.2 maven-install-plugin 2.3 maven-jar-plugin 2.2 maven-javadoc-plugin 2.5 maven-plugin-plugin 2.5 maven-rar-plugin 2.2 maven-release-plugin 2.0-beta-8 maven-resources-plugin 2.3 maven-site-plugin 2.0 maven-source-plugin 2.0.4 maven-surefire-plugin 2.4.3 maven-war-plugin 2.1-beta-1 ${project.build.directory}/site release-profile performRelease true true org.apache.maven.plugins maven-source-plugin attach-sources jar true org.apache.maven.plugins maven-javadoc-plugin attach-javadocs jar true org.apache.maven.plugins maven-deploy-plugin true maven-repo-helper-1.8.5/src/test/resources/antlr3.xml0000644000000000000000000000617412247273474017472 0ustar 4.0.0 org.antlr antlr-runtime 3.2 jar org.antlr antlr-master 3.2 3.2 libantlr3-java Antlr 3 Runtime A framework for constructing recognizers, compilers, and translators from grammatical descriptions containing Java, C#, C++, or Python actions. http://www.antlr.org Terence Parr USFCA http://www.cs.usfca.edu parrt@antlr.org Project Leader Developer - Java Target PST Jim Idle Temporal Wave LLC http://www.temporal-wave.com jimi@temporal-wave.com Developer - Maven stuff Developer - C Target PST http://fisheye2.cenqua.com/browse/antlr http://fisheye2.cenqua.com/browse/antlr antlr-repo ANTLR Testing repository scpexe://antlr.org/home/mavensync/antlr-repo antlr-snapshot ANTLR Testing Snapshot Repository scpexe://antlr.org/home/mavensync/antlr-snapshot org.antlr stringtemplate 3.2.1 compile install org.apache.maven.wagon wagon-ssh-external debian maven-compiler-plugin 2.0.2 1.5 jsr14 org.codehaus.mojo findbugs-maven-plugin true true true maven-repo-helper-1.8.5/src/test/resources/maven.rules0000644000000000000000000000011312247273474017712 0ustar org.codehaus.plexus plexus-container-default jar s/1.0-alpha-.*/1.0-alpha/ maven-repo-helper-1.8.5/src/test/resources/antlr-maven-plugin.transformed0000644000000000000000000001563112247273474023531 0ustar 4.0.0 org.codehaus.mojo antlr-maven-plugin 2.1 maven-plugin 2.1 libantlr-maven-plugin-java Maven ANTLR Plugin Maven Plugin for Antlr v2 2004 The Apache Software License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0.txt repo 2.0.2 scm:svn:https://svn.codehaus.org/mojo/tags/antlr-maven-plugin-2.1 scm:svn:https://svn.codehaus.org/mojo/tags/antlr-maven-plugin-2.1 https://svn.codehaus.org/mojo/tags/antlr-maven-plugin-2.1 jira http://jira.codehaus.org/browse/MANTLR vsiveton Vincent Siveton vsiveton@apache.org ASF Java Developer -5 org.apache.maven maven-project debian plexus plexus-utils org.apache.maven.reporting maven-reporting-impl debian plexus plexus-utils org.apache.maven maven-plugin-api debian plexus plexus-utils org.codehaus.plexus plexus-i18n debian org.codehaus.plexus plexus-utils debian org.apache.maven.wagon wagon-provider-api debian org.apache.maven.plugin-testing maven-plugin-testing-harness debian test maven-jar-plugin 2.2 maven-compiler-plugin 2.0.2 maven-resources-plugin 2.3 maven-surefire-plugin 2.4.3 maven-clean-plugin 2.3 org.codehaus.modello modello-maven-plugin 1.1 java 1.0.0 src/main/mdo/antlrOptions.mdo org.apache.maven.plugins maven-site-plugin 2.1 integration-tests maven.test.skip !true org.apache.maven.plugins maven-clean-plugin src/it **/target org.apache.maven.plugins maven-install-plugin 2.2 it-test pre-integration-test install-file ${project.build.directory}/${project.build.finalName}.jar ${project.groupId} ${project.artifactId} ${project.version} ${project.packaging} ${basedir}/pom.xml true ${project.build.directory}/local-repo it-local-repo org.apache.maven.plugins maven-invoker-plugin 1.0 true true src/it **/pom.xml verify.bsh site ${project.build.directory}/local-repo integration-test integration-test run maven-repo-helper-1.8.5/src/test/resources/maven.transformed0000644000000000000000000004671512247273474021126 0ustar 4.0.0 org.apache.maven maven debian pom Maven Maven is a project development management and comprehension tool. Based on the concept of a project object model: builds, dependency management, documentation creation, site publication, and distribution publication are all controlled from the declarative file. Maven can be extended by plugins to utilise a number of other development tools for reporting or the build process. http://maven.apache.org 2001 jira http://jira.codehaus.org/browse/MNG Maven User List users-subscribe@maven.apache.org users-unsubscribe@maven.apache.org users@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-users http://www.mail-archive.com/users@maven.apache.org/ http://www.nabble.com/Maven---Users-f178.html http://maven.users.markmail.org/ Maven Developer List dev-subscribe@maven.apache.org dev-unsubscribe@maven.apache.org dev@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-dev http://www.mail-archive.com/dev@maven.apache.org/ http://www.nabble.com/Maven-Developers-f179.html http://maven.dev.markmail.org/ Maven Issues List issues-subscribe@maven.apache.org issues-unsubscribe@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-issues/ http://www.mail-archive.com/issues@maven.apache.org http://www.nabble.com/Maven---Issues-f15573.html http://maven.issues.markmail.org/ Maven Commits List commits-subscribe@maven.apache.org commits-unsubscribe@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-commits http://www.mail-archive.com/commits@maven.apache.org http://www.nabble.com/Maven---Commits-f15575.html http://maven.commits.markmail.org/ Maven Announcements List announce@maven.apache.org announce-subscribe@maven.apache.org announce-unsubscribe@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-announce/ http://www.mail-archive.com/announce@maven.apache.org http://www.nabble.com/Maven-Announcements-f15617.html http://maven.announce.markmail.org/ Maven Notifications List notifications-subscribe@maven.apache.org notifications-unsubscribe@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-notifications/ http://www.mail-archive.com/notifications@maven.apache.org http://www.nabble.com/Maven---Notifications-f15574.html http://maven.notifications.markmail.org/ scm:svn:http://svn.apache.org/repos/asf/maven/components/branches/maven-2.1.x scm:svn:https://svn.apache.org/repos/asf/maven/components/branches/maven-2.1.x http://svn.apache.org/viewvc/maven/components/branches/maven-2.1.x org.apache.maven.plugins maven-jar-plugin 2.1 org.apache.maven.plugins maven-compiler-plugin 2.0.2 maven-assembly-plugin 2.2 maven-shade-plugin 1.0 maven-surefire-plugin 2.3 maven-deploy-plugin 2.3 maven-install-plugin 2.1 maven-site-plugin 2.0-beta-5 maven-resources-plugin 2.2 maven-remote-resources-plugin 1.0-beta-2 maven-clean-plugin 2.1.1 maven-release-plugin 2.0-beta-7 https://svn.apache.org/repos/asf/maven/components/tags true install org.codehaus.modello modello-maven-plugin 1.0 site-docs pre-site xdoc xsd standard java xpp3-reader xpp3-writer org.codehaus.mojo clirr-maven-plugin 2.2.1 2.0.9 org/apache/maven/lifecycle/LifecycleExecutor* org/apache/maven/artifact/metadata/AbstractArtifactMetadata* org/apache/maven/artifact/metadata/ArtifactMetadataSource* org/apache/maven/project/MavenProjectBuilder* org/apache/maven/project/ProjectBuilderConfiguration* org/apache/maven/project/interpolation/ModelInterpolator* org/apache/maven/project/inheritance/ModelInheritanceAssembler* org/apache/maven/execution/MavenExecutionRequest* org/apache/maven/plugin/DefaultPluginManager* org/apache/maven/settings/io/xpp3/SettingsXpp3Reader* org/apache/maven/artifact/repository/metadata/io/xpp3/MetadataXpp3Reader* org/apache/maven/model/io/xpp3/MavenXpp3Reader* org/apache/maven/usability/plugin/io/xpp3/ParamdocXpp3Reader* org/apache/maven/profiles/io/xpp3/ProfilesXpp3Reader* org/apache/maven/plugin/registry/io/xpp3/PluginRegistryXpp3Reader* org/apache/maven/plugin/lifecycle/io/xpp3/LifecycleMappingsXpp3Reader* org/apache/maven/toolchain/model/io/xpp3/MavenToolchainsXpp3Reader* maven-artifact maven-artifact-manager maven-artifact-test maven-core maven-error-diagnostics maven-model maven-monitor maven-plugin-api maven-plugin-descriptor maven-plugin-parameter-documenter maven-plugin-registry maven-profile maven-project maven-reporting maven-repository-metadata maven-script maven-settings maven-toolchain apache-maven 2.1.0-SNAPSHOT 1.0-beta-5 2.1.0-SNAPSHOT junit junit debian test org.apache.maven maven-plugin-descriptor debian org.apache.maven maven-error-diagnostics debian org.apache.maven maven-model debian org.apache.maven maven-project debian org.apache.maven.reporting maven-reporting-api debian org.apache.maven maven-repository-metadata debian org.apache.maven maven-artifact debian org.apache.maven maven-artifact-manager debian org.apache.maven maven-artifact-test debian org.apache.maven maven-settings debian org.apache.maven maven-core debian org.apache.maven maven-toolchain debian org.apache.maven maven-plugin-parameter-documenter debian org.apache.maven maven-profile debian org.apache.maven maven-plugin-registry debian org.apache.maven maven-plugin-api debian org.apache.maven maven-monitor debian org.apache.maven maven-toolchain debian commons-cli commons-cli debian org.apache.maven.doxia doxia-sink-api debian org.apache.maven.doxia doxia-logging-api debian org.codehaus.plexus plexus-interpolation debian org.codehaus.plexus plexus-container-default 1.0-alpha org.codehaus.plexus plexus-utils debian org.sonatype.plexus plexus-sec-dispatcher debian org.apache.maven.wagon wagon-provider-api debian org.apache.maven.wagon wagon-ssh debian org.apache.maven.wagon wagon-ssh-external debian org.apache.maven.wagon wagon-file debian org.apache.maven.wagon wagon-webdav-jackrabbit debian org.apache.maven.wagon wagon-http-lightweight debian backport-util-concurrent backport-util-concurrent debian easymock easymock debian test classworlds classworlds debian apache.website scp://people.apache.org/www/maven.apache.org/ref/${project.version}/ quality-checks org.codehaus.mojo clirr-maven-plugin clirr-check verify check release org.codehaus.mojo clirr-maven-plugin check run-its maven-core-it-runner reporting org.codehaus.mojo clirr-maven-plugin reporting-aggregate org.apache.maven.plugins maven-project-info-reports-plugin 2.1 org.apache.maven.plugins maven-jxr-plugin 2.1 true ${project.build.sourceEncoding} org.apache.maven.plugins maven-javadoc-plugin 2.5 http://java.sun.com/j2se/1.4.2/docs/api http://java.sun.com/j2ee/1.4/docs/api http://java.sun.com/j2se/1.5.0/docs/api http://commons.apache.org/collections/apidocs-COLLECTIONS_3_0/ http://commons.apache.org/dbcp/apidocs/ http://commons.apache.org/fileupload/apidocs/ http://commons.apache.org/httpclient/apidocs/ http://commons.apache.org/logging/apidocs/ http://commons.apache.org/pool/apidocs/ http://junit.sourceforge.net/javadoc/ http://logging.apache.org/log4j/1.2/apidocs/ http://jakarta.apache.org/regexp/apidocs/ http://velocity.apache.org/engine/releases/velocity-1.5/apidocs/ true maven-repo-helper-1.8.5/src/test/resources/servlet-api.pom0000644000000000000000000000201712247273474020505 0ustar 4.0.0 org.apache.tomcat servlet-api 2.5 javax.servlet package maven-repo-helper-1.8.5/src/test/resources/slf4j.xml0000644000000000000000000001726612247273474017315 0ustar 4.0.0 org.slf4j slf4j-parent 1.5.6 pom SLF4J http://www.slf4j.org QOS.ch http://www.qos.ch 2005 slf4j-api slf4j-simple slf4j-nop slf4j-jdk14 slf4j-log4j12 slf4j-jcl slf4j-ext jcl-over-slf4j jcl104-over-slf4j log4j-over-slf4j jul-to-slf4j integration slf4j-site slf4j-migrator junit junit 3.8.1 test org.slf4j slf4j-api ${project.version} log4j log4j 1.2.14 src/main/resources true org.apache.maven.plugins maven-compiler-plugin 1.3 1.3 org.apache.maven.plugins maven-surefire-plugin once plain false **/AllTest.java **/PackageTest.java org.apache.maven.plugins maven-source-plugin package jar org.apache.maven.plugins maven-javadoc-plugin true org.slf4j.migrator:org.slf4j.migrator.* http://java.sun.com/j2se/1.5.0/docs/api SLF4J packages org.slf4j:org.slf4j.* SLF4J extensions org.slf4j.profiler:org.slf4j.ext:org.slf4j.instrumentation:org.slf4j.agent Jakarta Commons Logging packages org.apache.commons.* Apache log4j org.apache.log4j java.util.logging (JUL) to SLF4J bridge org.slf4j.bridge skipTests true osgi osgi-over-slf4j slf4j-osgi-test-bundle slf4j-osgi-integration-test m2apache.snapshots http://people.apache.org/repo/m2-snapshot-repository false true springframework.org Springframework Maven SNAPSHOT Repository http://static.springframework.org/maven2-snapshots/ true apache.snapshots Apache Snapshot Plugin Repository http://people.apache.org/repo/m2-snapshot-repository false true apache.snapshots Apache Snapshot Plugin Repository http://people.apache.org/repo/m2-snapshot-repository false true org.apache.maven.plugins maven-site-plugin org.apache.maven.plugins maven-project-info-reports-plugin maven-assembly-plugin 2.1 src/main/assembly/source.xml slf4j-${project.version} false target/site/dist/ org.apache.maven.plugins maven-jxr-plugin jxr test-jxr true target/site/api/ true scm:svn:http://svn.slf4j.org/repos/slf4j/trunk scm:svn:https://svn.slf4j.org/repos/slf4j/trunk http://svn.slf4j.org/viewvc/slf4j/trunk/ pixie scp://pixie/var/www/www.slf4j.org/htdocs/ pixie scp://pixie/var/mvnrepo/ maven-repo-helper-1.8.5/src/test/resources/maven-packager-utils.transformed0000644000000000000000000000336012247273474024024 0ustar 4.0.0 org.debian.maven maven-packager-utils 1.2 maven-plugin org.debian.maven maven-debian 1.2 1.2 maven-repo-helper Maven Packager Utilities org.apache.maven maven-plugin-api debian org.apache.maven maven-artifact debian junit junit 3.x test org.apache.maven maven-project debian org.apache.velocity velocity debian org.debian.maven maven-repo-helper commons-io commons-io debian test maven-repo-helper-1.8.5/src/test/resources/doxia-module-fml.xml0000644000000000000000000000751612247273474021433 0ustar 4.0.0 doxia-modules org.apache.maven.doxia 1.1.2 ../pom.xml doxia-module-fml Doxia :: FML Module A Doxia module for FML source documents. org.codehaus.plexus plexus-utils org.apache.maven.doxia doxia-test-docs test xerces xercesImpl 2.8.1 test org.codehaus.modello modello-maven-plugin descriptor generate-sources java src/main/mdo/fml.mdo 1.0.0 reporting org.apache.maven.plugins maven-antrun-plugin site run xsddoc xsddoc 1.0 xalan xalan 2.7.1 maven-repo-helper-1.8.5/src/test/resources/plexus-components/0000755000000000000000000000000012247273474021240 5ustar maven-repo-helper-1.8.5/src/test/resources/plexus-components/plexus-digest/0000755000000000000000000000000012247273474024035 5ustar maven-repo-helper-1.8.5/src/test/resources/plexus-components/plexus-digest/pom.xml0000644000000000000000000000166612247273474025363 0ustar 4.0.0 org.codehaus.plexus plexus-components 1.1.18 plexus-digest 1.2-SNAPSHOT Plexus Digest / Hashcode Components org.codehaus.plexus plexus-utils org.codehaus.plexus plexus-container-default test junit junit maven-repo-helper-1.8.5/src/test/resources/plexus-components/plexus-velocity/0000755000000000000000000000000012247273474024414 5ustar maven-repo-helper-1.8.5/src/test/resources/plexus-components/plexus-velocity/pom.xml0000644000000000000000000000360612247273474025736 0ustar 4.0.0 plexus-components org.codehaus.plexus 1.1.18 plexus-velocity 1.1.9-SNAPSHOT Plexus Velocity Component scm:svn:http://svn.codehaus.org/plexus/plexus-components/trunk/plexus-velocity scm:svn:https://svn.codehaus.org/plexus/plexus-components/trunk/plexus-velocity http://fisheye.codehaus.org/browse/plexus/plexus-components/trunk/plexus-velocity org.codehaus.plexus plexus-container-default commons-collections commons-collections 3.1 org.apache.velocity velocity 1.5 maven-repo-helper-1.8.5/src/test/resources/plexus-components/plexus-cli/0000755000000000000000000000000012247273474023325 5ustar maven-repo-helper-1.8.5/src/test/resources/plexus-components/plexus-cli/pom.xml0000644000000000000000000000261112247273474024642 0ustar 4.0.0 plexus-components org.codehaus.plexus 1.1.18 org.codehaus.plexus plexus-cli 1.6-SNAPSHOT Plexus CLI Easily create CLIs with Plexus components org.codehaus.plexus plexus-container-default 1.0-alpha-34 org.codehaus.plexus plexus-utils commons-cli commons-cli 1.0 commons-lang commons-lang commons-logging commons-logging maven-repo-helper-1.8.5/src/test/resources/plexus-components/plexus-i18n/0000755000000000000000000000000012247273474023335 5ustar maven-repo-helper-1.8.5/src/test/resources/plexus-components/plexus-i18n/pom.xml0000644000000000000000000000145512247273474024657 0ustar 4.0.0 plexus-components org.codehaus.plexus 1.1.18 plexus-i18n 1.0-beta-11-SNAPSHOT Plexus I18N Component org.codehaus.plexus plexus-container-default org.codehaus.plexus plexus-utils maven-repo-helper-1.8.5/src/test/resources/plexus-components/plexus-interactivity/0000755000000000000000000000000012247273474025454 5ustar maven-repo-helper-1.8.5/src/test/resources/plexus-components/plexus-interactivity/pom.xml0000644000000000000000000000126412247273474026774 0ustar 4.0.0 plexus-components org.codehaus.plexus 1.1.18 plexus-interactivity 1.0-alpha-7-SNAPSHOT pom Plexus Interactivity Handler Component plexus-interactivity-api plexus-interactivity-jline maven-repo-helper-1.8.5/src/test/resources/plexus-components/plexus-resources/0000755000000000000000000000000012247273474024570 5ustar maven-repo-helper-1.8.5/src/test/resources/plexus-components/plexus-resources/pom.xml0000644000000000000000000000245712247273474026115 0ustar 4.0.0 org.codehaus.plexus plexus-components 1.1.18 plexus-resources 1.0-SNAPSHOT Plexus Resource Component A component to transparently retrieve resources from the filesystem, classpath or internet. scm:svn:http://svn.codehaus.org/plexus/plexus-components/trunk/plexus-resources scm:svn:https://svn.codehaus.org/plexus/plexus-components/trunk/plexus-resources http://fisheye.codehaus.org/browse/plexus/plexus-components/trunk/plexus-resources org.codehaus.plexus plexus-utils org.codehaus.plexus plexus-container-default maven-repo-helper-1.8.5/src/test/resources/plexus-components/pom.xml0000644000000000000000000000522312247273474022557 0ustar 4.0.0 org.codehaus.plexus plexus 3.0.1 ../pom/pom.xml plexus-components 1.1.20-SNAPSHOT pom Plexus Components http://plexus.codehaus.org/plexus-components plexus-cli plexus-digest plexus-i18n plexus-interactivity plexus-resources plexus-velocity scm:git:git@github.com:sonatype/plexus-components.git scm:git:git@github.com:sonatype/plexus-components.git http://github.com/sonatype/plexus-components JIRA http://jira.codehaus.org/browse/PLXCOMP org.codehaus.plexus plexus-container-default 1.0-alpha-9-stable-1 org.codehaus.plexus plexus-utils 3.0 junit junit 3.8.2 test org.codehaus.plexus plexus-component-metadata generate-metadata parent-release maven-release-plugin -N -Pplexus-release maven-repo-helper-1.8.5/src/test/resources/mojo-parent.pom0000644000000000000000000006316112247273474020514 0ustar 4.0.0 org.codehaus codehaus-parent 3 org.codehaus.mojo mojo-parent 27 pom Codehaus Mojo Parent http://mojo.codehaus.org Codehaus http://codehaus.org Development List dev-subscribe@mojo.codehaus.org dev-unsubscribe@mojo.codehaus.org dev@mojo.codehaus.org http://archive.codehaus.org/lists/org.codehaus.mojo.dev http://www.nabble.com/mojo---dev-f11981.html http://markmail.org/list/org.codehaus.mojo.dev User List user-subscribe@mojo.codehaus.org user-unsubscribe@mojo.codehaus.org user@mojo.codehaus.org http://archive.codehaus.org/lists/org.codehaus.mojo.user http://www.nabble.com/mojo---user-f11980.html http://markmail.org/list/org.codehaus.mojo.user Commits List scm-subscribe@mojo.codehaus.org scm-unsubscribe@mojo.codehaus.org http://archive.codehaus.org/lists/org.codehaus.mojo.scm http://markmail.org/list/org.codehaus.mojo.scm scm:svn:http://svn.codehaus.org/mojo/tags/mojo-parent-27 scm:svn:https://svn.codehaus.org/mojo/tags/mojo-parent-27 http://fisheye.codehaus.org/browse/mojo/tags/mojo-parent-27 jira http://jira.codehaus.org/browse/MOJO hudson https://grid.sonatype.org/ci/job/mojo/ codehaus.org Mojo Website dav:https://dav.codehaus.org/mojo/ UTF-8 1.4 UTF-8 true true org.apache.maven maven-plugin-api 2.0 junit junit 3.8.2 test codehaus.org Maven Central Development Repository http://snapshots.repository.codehaus.org false codehaus.org Maven Central Development Plugin Repository http://snapshots.repository.codehaus.org false org.apache.maven.wagon wagon-webdav 1.0-beta-2 org.apache.maven.plugins maven-antrun-plugin 1.3 org.apache.maven.plugins maven-assembly-plugin 2.2-beta-5 org.apache.maven.plugins maven-checkstyle-plugin 2.5 org.apache.maven.plugins maven-clean-plugin 2.4.1 org.apache.maven.plugins maven-compiler-plugin 2.3.2 ${project.build.sourceEncoding} ${mojo.java.target} ${mojo.java.target} org.apache.maven.plugins maven-deploy-plugin 2.5 org.apache.maven.plugins maven-enforcer-plugin 1.0-beta-1 org.apache.maven.plugins maven-install-plugin 2.3.1 org.apache.maven.plugins maven-invoker-plugin 1.5 org.apache.maven.plugins maven-jar-plugin 2.3.1 org.apache.maven.plugins maven-javadoc-plugin 2.7 org.apache.maven.plugins maven-jxr-plugin 2.2 org.apache.maven.plugins maven-plugin-plugin 2.6 help-mojo helpmojo org.apache.maven.plugins maven-pmd-plugin 2.5 org.apache.maven.plugins maven-project-info-reports-plugin 2.2 org.apache.maven.plugins maven-release-plugin 2.0 https://svn.codehaus.org/mojo/tags false -Pmojo-release org.apache.maven.plugins maven-resources-plugin 2.4.3 org.apache.maven.plugins maven-site-plugin 2.1.1 org.apache.maven.doxia doxia-module-xhtml 1.1.3 commons-logging commons-logging org.apache.maven.plugins maven-source-plugin 2.1.2 org.apache.maven.plugins maven-surefire-plugin 2.6 ${surefire.redirectTestOutputToFile} org.apache.maven.plugins maven-surefire-report-plugin 2.6 org.codehaus.mojo cobertura-maven-plugin 2.4 org.codehaus.plexus plexus-maven-plugin 1.3.8 org.codehaus.mojo taglist-maven-plugin 2.4 maven-enforcer-plugin mojo-enforcer-rules verify enforce org.codehaus.plexus:plexus-component-api The plexus-component-api conflicts with the plexus-container-default used by Maven. You probably added a dependency that is missing the exclusions. Mojo is synchronized with repo1.maven.org. The rules for repo1.maven.org are that pom.xml files should not include repository definitions. If repository definitions are included, they must be limited to SNAPSHOT only repositories. true true codehaus.org apache.snapshots codehaus-snapshots codehaus.org apache.snapshots Best Practice is to always define plugin versions! true true org.codehaus.mojo cobertura-maven-plugin clean org.apache.maven.plugins maven-plugin-plugin 2.6 ${mojo.java.target} org.apache.maven.plugins maven-project-info-reports-plugin 2.2 cim index issue-tracking mailing-list project-team scm summary mojo-release org.apache.maven.plugins maven-assembly-plugin org.apache.apache.resources apache-source-release-assembly-descriptor 1.0.2 org.codehaus.plexus plexus-utils 2.0.1 attach-source-release-distro package single true source-release gnu org.apache.maven.plugins maven-deploy-plugin true org.apache.maven.plugins maven-source-plugin attach-sources jar-no-fork org.apache.maven.plugins maven-javadoc-plugin attach-javadocs jar org.apache.maven.plugins maven-gpg-plugin 1.1 sign-artifacts verify sign reporting skipReports !true org.apache.maven.plugins maven-checkstyle-plugin 2.5 config/maven_checks.xml config/maven-header.txt org.apache.maven.plugins maven-javadoc-plugin 2.7 true http://download-llnw.oracle.com/javaee/1.4/api/ http://download-llnw.oracle.com/javase/1.5.0/docs/api/ http://commons.apache.org/collections/apidocs-COLLECTIONS_3_0/ http://commons.apache.org/dbcp/apidocs/ http://commons.apache.org/fileupload/apidocs/ http://commons.apache.org/httpclient/apidocs/ http://commons.apache.org/logging/apidocs/ http://commons.apache.org/pool/apidocs/ http://junit.sourceforge.net/javadoc/ http://logging.apache.org/log4j/1.2/apidocs/ http://jakarta.apache.org/regexp/apidocs/ http://velocity.apache.org/engine/releases/velocity-1.5/apidocs/ http://maven.apache.org/ref/current/maven-artifact/apidocs/ http://maven.apache.org/ref/current/maven-artifact-manager/apidocs/ http://maven.apache.org/ref/current/maven-model/apidocs/ http://maven.apache.org/ref/current/maven-plugin-api/apidocs/ http://maven.apache.org/ref/current/maven-project/apidocs/ http://maven.apache.org/ref/current/maven-reporting/maven-reporting-api/apidocs/ http://maven.apache.org/ref/current/maven-settings/apidocs/ org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.2 org.codehaus.plexus plexus-component-javadoc 1.5.4 javadoc test-javadoc org.apache.maven.plugins maven-jxr-plugin 2.2 ${project.build.sourceEncoding} ${project.reporting.outputEncoding} org.apache.maven.plugins maven-pmd-plugin 2.5 ${mojo.java.target} http://svn.codehaus.org/mojo/tags/mojo-parent-22/src/main/config/pmd/mojo_rules.xml ${project.build.directory}/generated-sources/antlr ${project.build.directory}/generated-sources/javacc ${project.build.directory}/generated-sources/modello ${project.build.directory}/generated-sources/plugin org.apache.maven.plugins maven-project-info-reports-plugin 2.2 cim dependencies dependency-convergence dependency-management index issue-tracking license mailing-list plugin-management project-team scm summary org.apache.maven.plugins maven-surefire-report-plugin 2.6 report org.codehaus.mojo cobertura-maven-plugin 2.4 **/HelpMojo.class org.codehaus.mojo taglist-maven-plugin 2.4 maven-3 ${basedir} 3.0-beta-2 org.apache.maven.plugins maven-site-plugin ${sitePluginVersion} org.apache.maven.plugins maven-site-plugin ${sitePluginVersion} false attach-descriptor attach-descriptor maven-repo-helper-1.8.5/src/test/resources/plexus-utils2.pom0000644000000000000000000000625612247273474021023 0ustar 4.0.0 org.codehaus.plexus plexus 2.0.6 ../pom/pom.xml plexus-utils 2.0.5 Plexus Common Utilities A collection of various utility classes to ease working with strings, files, command lines, XML and more. http://plexus.codehaus.org/plexus-utils scm:svn:http://svn.codehaus.org/plexus/plexus-utils/tags/plexus-utils-2.0.5 scm:svn:https://svn.codehaus.org/plexus/plexus-utils/tags/plexus-utils-2.0.5 http://fisheye.codehaus.org/browse/plexus/plexus-utils/tags/plexus-utils-2.0.5 JIRA http://jira.codehaus.org/browse/PLXUTILS org.apache.maven.plugins maven-compiler-plugin 1.3 1.3 org.apache.maven.plugins maven-surefire-plugin true org/codehaus/plexus/util/FileBasedTestCase.java **/Test*.java JAVA_HOME ${JAVA_HOME} M2_HOME ${M2_HOME} org.apache.maven.plugins maven-release-plugin https://svn.codehaus.org/plexus/plexus-utils/tags/ maven-repo-helper-1.8.5/src/test/resources/slf4j.cleaned0000644000000000000000000000401712247273474020076 0ustar 4.0.0 org.slf4j slf4j-parent debian pom 3.8.1 1.5.6 libslf4j-java SLF4J http://www.slf4j.org QOS.ch http://www.qos.ch 2005 slf4j-api slf4j-simple slf4j-nop slf4j-jdk14 slf4j-log4j12 slf4j-jcl slf4j-ext jcl-over-slf4j jcl104-over-slf4j log4j-over-slf4j jul-to-slf4j integration slf4j-site slf4j-migrator junit junit debian test org.slf4j slf4j-api debian log4j log4j debian scm:svn:http://svn.slf4j.org/repos/slf4j/trunk scm:svn:https://svn.slf4j.org/repos/slf4j/trunk http://svn.slf4j.org/viewvc/slf4j/trunk/ maven-repo-helper-1.8.5/src/test/resources/hibernate-validator-tck-runner.pom0000644000000000000000000002615212247273474024272 0ustar hibernate-validator-parent org.hibernate 4.0.2.GA 4.0.0 hibernate-validator-tck-runner Hibernate Validator TCK Runner Aggregates dependencies and run's the JSR-303 TCK javax.validation validation-api org.hibernate hibernate-validator ${version} org.slf4j slf4j-log4j12 runtime org.testng testng jdk15 org.hibernate.jsr303.tck jsr303-tck 1.0.1.GA org.jboss.test-harness jboss-test-harness-jboss-as-51 1.0.0 /opt/java/jboss-5.1.0.GA org.hibernate.validator.HibernateValidator org.apache.maven.plugins maven-dependency-plugin copy generate-test-sources copy true org.hibernate.jsr303.tck jsr303-tck xml suite false javax.validation validation-api true ${project.build.directory}/dependency/lib org.hibernate hibernate-validator true ${project.build.directory}/dependency/lib org.slf4j slf4j-log4j12 true ${project.build.directory}/dependency/lib org.apache.maven.plugins maven-surefire-plugin ${project.build.directory}/dependency/jsr303-tck-suite.xml -Xmx128m once validation.provider ${validation.provider} org.apache.maven.plugins maven-surefire-report-plugin generate-test-report test report-only ${project.build.directory}/surefire-reports test-report incontainer-debug debug -Xnoagent -Djava.compiler=NONE -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005 incontainer incontainer org.apache.maven.plugins maven-surefire-plugin ${project.build.directory}/dependency/jsr303-tck-suite.xml validation.provider ${validation.provider} org.jboss.testharness.standalone false jboss.home ${jboss.home} org.jboss.testharness.container.javaOpts -Xms128m -Xmx384m -XX:MaxPermSize=128m -Dorg.jboss.resolver.warning=true -Dvalidation.provider=${validation.provider} ${remote.debug} org.jboss.testharness.container.forceRestart true org.jboss.testharness.runIntegrationTests true org.jboss.testharness.libraryDirectory target/dependency/lib org.jboss.testharness.outputDirectory target write-artifacts-to-disk dumpArtifacts org.codehaus.mojo exec-maven-plugin generate-jsr-303-artifacts test-compile java test org.jboss.testharness.api.TCK dumpArtifacts true org.jboss.testharness.outputDirectory target/jsr303-artifacts org.jboss.testharness.libraryDirectory target/jsr303-artifacts/dependencies maven-repo-helper-1.8.5/src/test/resources/antlr3-parent.xml0000644000000000000000000002055412247273474020757 0ustar 4.0.0 org.antlr antlr-master pom 3.2 ANTLR Master build control POM http://maven.apache.org runtime/Java tool antlr3-maven-plugin gunit gunit-maven-plugin antlr-repo ANTLR Testing repository scpexe://antlr.org/home/mavensync/antlr-repo antlr-snapshot ANTLR Testing Snapshot Repository scpexe://antlr.org/home/mavensync/antlr-snapshot antlr-snapshot ANTLR Testing Snapshot Repository http://antlr.org/antlr-snapshot true always junit junit 4.5 test antlr antlr 2.7.7 compile org.antlr stringtemplate 3.2.1 compile install antlr.config src/main/resources true org.codehaus.mojo buildnumber-maven-plugin {0,date,MMM dd, yyyy} {0,time,kk:mm:ss} timestamp validate create maven-compiler-plugin 1.5 jsr14 src maven-surefire-plugin org.codehaus.mojo findbugs-maven-plugin true true true maven-assembly-plugin false antlrjar.xml antlrsources.xml org.antlr.Tool org.apache.maven.wagon wagon-ssh-external 1.0-beta-2 maven-repo-helper-1.8.5/src/test/resources/maven.xml0000644000000000000000000005345612247273474017402 0ustar 4.0.0 org.apache.maven maven-parent 11 ../pom/maven/pom.xml maven 2.1.0-SNAPSHOT pom Maven Maven is a project development management and comprehension tool. Based on the concept of a project object model: builds, dependency management, documentation creation, site publication, and distribution publication are all controlled from the declarative file. Maven can be extended by plugins to utilise a number of other development tools for reporting or the build process. http://maven.apache.org 2001 jira http://jira.codehaus.org/browse/MNG Maven User List users-subscribe@maven.apache.org users-unsubscribe@maven.apache.org users@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-users http://www.mail-archive.com/users@maven.apache.org/ http://www.nabble.com/Maven---Users-f178.html http://maven.users.markmail.org/ Maven Developer List dev-subscribe@maven.apache.org dev-unsubscribe@maven.apache.org dev@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-dev http://www.mail-archive.com/dev@maven.apache.org/ http://www.nabble.com/Maven-Developers-f179.html http://maven.dev.markmail.org/ Maven Issues List issues-subscribe@maven.apache.org issues-unsubscribe@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-issues/ http://www.mail-archive.com/issues@maven.apache.org http://www.nabble.com/Maven---Issues-f15573.html http://maven.issues.markmail.org/ Maven Commits List commits-subscribe@maven.apache.org commits-unsubscribe@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-commits http://www.mail-archive.com/commits@maven.apache.org http://www.nabble.com/Maven---Commits-f15575.html http://maven.commits.markmail.org/ Maven Announcements List announce@maven.apache.org announce-subscribe@maven.apache.org announce-unsubscribe@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-announce/ http://www.mail-archive.com/announce@maven.apache.org http://www.nabble.com/Maven-Announcements-f15617.html http://maven.announce.markmail.org/ Maven Notifications List notifications-subscribe@maven.apache.org notifications-unsubscribe@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-notifications/ http://www.mail-archive.com/notifications@maven.apache.org http://www.nabble.com/Maven---Notifications-f15574.html http://maven.notifications.markmail.org/ scm:svn:http://svn.apache.org/repos/asf/maven/components/branches/maven-2.1.x scm:svn:https://svn.apache.org/repos/asf/maven/components/branches/maven-2.1.x http://svn.apache.org/viewvc/maven/components/branches/maven-2.1.x org.apache.maven.plugins maven-jar-plugin 2.1 org.apache.maven.plugins maven-compiler-plugin 2.0.2 maven-assembly-plugin 2.2-beta-1 maven-shade-plugin 1.0 maven-surefire-plugin 2.3 maven-deploy-plugin 2.3 maven-install-plugin 2.1 maven-site-plugin 2.0-beta-5 maven-resources-plugin 2.2 maven-remote-resources-plugin 1.0-beta-2 maven-clean-plugin 2.1.1 maven-release-plugin 2.0-beta-7 https://svn.apache.org/repos/asf/maven/components/tags true install org.codehaus.modello modello-maven-plugin 1.0 site-docs pre-site xdoc xsd standard java xpp3-reader xpp3-writer org.codehaus.mojo clirr-maven-plugin 2.2.1 2.0.9 org/apache/maven/lifecycle/LifecycleExecutor* org/apache/maven/artifact/metadata/AbstractArtifactMetadata* org/apache/maven/artifact/metadata/ArtifactMetadataSource* org/apache/maven/project/MavenProjectBuilder* org/apache/maven/project/ProjectBuilderConfiguration* org/apache/maven/project/interpolation/ModelInterpolator* org/apache/maven/project/inheritance/ModelInheritanceAssembler* org/apache/maven/execution/MavenExecutionRequest* org/apache/maven/plugin/DefaultPluginManager* org/apache/maven/settings/io/xpp3/SettingsXpp3Reader* org/apache/maven/artifact/repository/metadata/io/xpp3/MetadataXpp3Reader* org/apache/maven/model/io/xpp3/MavenXpp3Reader* org/apache/maven/usability/plugin/io/xpp3/ParamdocXpp3Reader* org/apache/maven/profiles/io/xpp3/ProfilesXpp3Reader* org/apache/maven/plugin/registry/io/xpp3/PluginRegistryXpp3Reader* org/apache/maven/plugin/lifecycle/io/xpp3/LifecycleMappingsXpp3Reader* org/apache/maven/toolchain/model/io/xpp3/MavenToolchainsXpp3Reader* maven-artifact maven-artifact-manager maven-artifact-test maven-core maven-error-diagnostics maven-model maven-monitor maven-plugin-api maven-plugin-descriptor maven-plugin-parameter-documenter maven-plugin-registry maven-profile maven-project maven-reporting maven-repository-metadata maven-script maven-settings maven-toolchain apache-maven 2.1.0-SNAPSHOT 1.0-beta-5 junit junit 3.8.1 test org.apache.maven maven-plugin-descriptor ${mavenVersion} org.apache.maven maven-error-diagnostics ${mavenVersion} org.apache.maven maven-model ${mavenVersion} org.apache.maven maven-project ${mavenVersion} org.apache.maven.reporting maven-reporting-api ${mavenVersion} org.apache.maven maven-repository-metadata ${mavenVersion} org.apache.maven maven-artifact ${mavenVersion} org.apache.maven maven-artifact-manager ${mavenVersion} org.apache.maven maven-artifact-test ${mavenVersion} org.apache.maven maven-settings ${mavenVersion} org.apache.maven maven-core ${mavenVersion} org.apache.maven maven-toolchain ${mavenVersion} org.apache.maven maven-plugin-parameter-documenter ${mavenVersion} org.apache.maven maven-profile ${mavenVersion} org.apache.maven maven-plugin-registry ${mavenVersion} org.apache.maven maven-plugin-api ${mavenVersion} org.apache.maven maven-monitor ${mavenVersion} org.apache.maven maven-toolchain ${mavenVersion} commons-cli commons-cli 1.0 org.apache.maven.doxia doxia-sink-api 1.1 org.apache.maven.doxia doxia-logging-api 1.1 org.codehaus.plexus plexus-interpolation 1.8.1 org.codehaus.plexus plexus-container-default 1.0-alpha-9-stable-1 org.codehaus.plexus plexus-utils 1.5.6 org.sonatype.plexus plexus-sec-dispatcher 1.1 org.apache.maven.wagon wagon-provider-api ${wagonVersion} org.apache.maven.wagon wagon-ssh ${wagonVersion} org.apache.maven.wagon wagon-ssh-external ${wagonVersion} org.apache.maven.wagon wagon-file ${wagonVersion} org.apache.maven.wagon wagon-webdav-jackrabbit ${wagonVersion} org.apache.maven.wagon wagon-http-lightweight ${wagonVersion} backport-util-concurrent backport-util-concurrent 3.1 easymock easymock 1.2_Java1.3 test classworlds classworlds 1.1 apache.website scp://people.apache.org/www/maven.apache.org/ref/${project.version}/ quality-checks org.codehaus.mojo clirr-maven-plugin clirr-check verify check release org.codehaus.mojo clirr-maven-plugin check run-its maven-core-it-runner reporting org.codehaus.mojo clirr-maven-plugin reporting-aggregate org.apache.maven.plugins maven-project-info-reports-plugin 2.1 org.apache.maven.plugins maven-jxr-plugin 2.1 true ${project.build.sourceEncoding} org.apache.maven.plugins maven-javadoc-plugin 2.5 http://java.sun.com/j2se/1.4.2/docs/api http://java.sun.com/j2ee/1.4/docs/api http://java.sun.com/j2se/1.5.0/docs/api http://commons.apache.org/collections/apidocs-COLLECTIONS_3_0/ http://commons.apache.org/dbcp/apidocs/ http://commons.apache.org/fileupload/apidocs/ http://commons.apache.org/httpclient/apidocs/ http://commons.apache.org/logging/apidocs/ http://commons.apache.org/pool/apidocs/ http://junit.sourceforge.net/javadoc/ http://logging.apache.org/log4j/1.2/apidocs/ http://jakarta.apache.org/regexp/apidocs/ http://velocity.apache.org/engine/releases/velocity-1.5/apidocs/ true maven-repo-helper-1.8.5/src/test/resources/commons-validator.xml0000644000000000000000000002150212247273474021715 0ustar 4.0.0 commons-validator commons-validator Validator 1.3.1 Commons Validator provides the building blocks for both client side validation and server side data validation. It may be used standalone or with a framework like Struts. http://jakarta.apache.org/commons/${pom.artifactId.substring(8)}/ http://issues.apache.org/jira/
commons-dev@jakarta.apache.org
2002 Commons Dev List commons-dev-subscribe@jakarta.apache.org commons-dev-unsubscribe@jakarta.apache.org http://mail-archives.apache.org/mod_mbox/jakarta-commons-dev/ Commons User List commons-user-subscribe@jakarta.apache.org commons-user-unsubscribe@jakarta.apache.org http://mail-archives.apache.org/mod_mbox/jakarta-commons-user/ mrdon Don Brown mrdon@apache.org martinc Martin Cooper martinc@apache.org dgraham David Graham dgraham@apache.org husted Ted Husted husted@apache.org rleland Rob Leland rleland at apache.org craigmcc Craig McClanahan craigmcc@apache.org jmitchell James Mitchell jmitchell NOSPAM apache.org EdgeTech, Inc niallp Niall Pemberton turner James Turner turner@apache.org dwinterfeldt David Winterfeldt dwinterfeldt@apache.org bayard Henri Yandell Saul Q Yuan Add Shane Bailey Dave Derry Tim O'Brien Scott Clasen ticktock@speakeasy.net> Marcus Brito Finish Padma Ginnaram Thomas Jacob thomas.jacob@sinnerschrader.com Adam Kramer Greg Ludington Bjorn-H. Moritz David Neuer DavidNeuer@nascopgh.com Kurt Post Arun Mammen Thomas Steven Fines steven.fines@cotelligent.com Didier Romelot didier.romelot@renault.com Steve Stair Jeremy Tan jeremytan@scualum.com 94RGt2 lmagee@biziworks.com.au Nacho G. Mac Dowell Mark Lowe mark.lowe@boxstuff.com The Apache Software License, Version 2.0 /LICENSE.txt scm:svn:http://svn.apache.org/repos/asf/jakarta/commons/proper/${pom.artifactId.substring(8)}/trunk http://svn.apache.org/viewvc The Apache Software Foundation http://jakarta.apache.org src/share src/test META-INF ${basedir} NOTICE.txt ${pom.build.unitTestSourceDirectory} **/*.xml maven-surefire-plugin **/*Test.java **/routines/BaseCalendarValidatorTest.java **/routines/BaseNumberValidatorTest.java maven-xdoc-plugin 1.9.2 <strong>Site Only</strong> - v1.9.2 (minimum) required for building the Validator Site documentation. maven-changelog-plugin 1.8.2 <strong>Site Only</strong> - v1.8.2 (minimum) required for building the Validator Site documentation. maven-changes-plugin 1.6 <strong>Site Only</strong> - v1.6 (minimum) required for building the Validator Site documentation. maven-plugins maven-cobertura-plugin 1.1.1 test Required only for generating test coverage reports. commons-beanutils commons-beanutils 1.7.0 commons-digester commons-digester 1.6 commons-logging commons-logging 1.0.4 oro oro 2.0.8 true xml-apis xml-apis 2.0.2 provided junit junit 3.8.1 test default Default Repository file:///www/jakarta.apache.org/builds/jakarta-commons/${pom.artifactId.substring(8)}/ default Default Site scp://people.apache.org//www/jakarta.apache.org/commons/${pom.artifactId.substring(8)}/ converted
maven-repo-helper-1.8.5/src/test/resources/plexus-components.transformed0000644000000000000000000000437712247273474023521 0ustar 4.0.0 org.codehaus.plexus plexus-components debian pom 1.1.20-SNAPSHOT libplexus-components-java Plexus Components http://plexus.codehaus.org/plexus-components scm:git:git@github.com:sonatype/plexus-components.git scm:git:git@github.com:sonatype/plexus-components.git http://github.com/sonatype/plexus-components JIRA http://jira.codehaus.org/browse/PLXCOMP org.codehaus.plexus plexus-container-default debian org.codehaus.plexus plexus-utils debian junit junit debian test org.codehaus.plexus plexus-component-metadata generate-metadata parent-release maven-release-plugin -N -Pplexus-release maven-repo-helper-1.8.5/src/test/resources/bndlib.pom0000644000000000000000000000316212247273474017506 0ustar 4.0.0 biz.aQute bndlib 1.43.0 A library for manipulating and generating bundles aQute Bundle Tool Library http://www.aQute.biz/Code/Bnd git://github.com/bnd/bnd.git git://github.com/bnd/bnd.git git://github.com/bnd/bnd.git aQute SARL http://www.aQute.biz Peter.Kriens@aQute.biz Peter.Kriens Peter.Kriens@aQute.biz aQute All files contained in this JAR are licensed under the Apache 2.0 license, unless noted differently in their source (see swing2swt). http://www.opensource.org/licenses/apache2.0.php repo maven-repo-helper-1.8.5/src/test/resources/antlr3.poms0000644000000000000000000000027612247273474017645 0ustar pom.xml --no-parent runtime/Java/pom.xml tool/pom.xml antlr3-maven-plugin/pom.xml gunit/pom.xml --package=libantlr3-gunit-java gunit-maven-plugin/pom.xml --package=antlr3-gunit-maven-plugin maven-repo-helper-1.8.5/src/test/resources/hibernate-validator-tck-runner.transformed0000644000000000000000000001736412247273474026030 0ustar 4.0.0 org.hibernate hibernate-validator-tck-runner 4.0.2.GA jar org.hibernate hibernate-validator-parent 4.0.2.GA Hibernate Validator TCK Runner Aggregates dependencies and run's the JSR-303 TCK javax.validation validation-api debian org.hibernate hibernate-validator debian org.slf4j slf4j-log4j12 runtime debian org.testng testng jdk15 debian org.hibernate.jsr303.tck jsr303-tck debian org.jboss.test-harness jboss-test-harness-jboss-as-51 debian /opt/java/jboss-5.1.0.GA org.hibernate.validator.HibernateValidator 4.0.2.GA libhibernate-validator-java org.apache.maven.plugins maven-dependency-plugin copy generate-test-sources copy true org.hibernate.jsr303.tck jsr303-tck xml suite false javax.validation validation-api true ${project.build.directory}/dependency/lib org.hibernate hibernate-validator true ${project.build.directory}/dependency/lib org.slf4j slf4j-log4j12 true ${project.build.directory}/dependency/lib org.apache.maven.plugins maven-surefire-plugin ${project.build.directory}/dependency/jsr303-tck-suite.xml -Xmx128m once validation.provider ${validation.provider} org.apache.maven.plugins maven-surefire-report-plugin generate-test-report test report-only ${project.build.directory}/surefire-reports test-report 2.4.3 incontainer-debug debug -Xnoagent -Djava.compiler=NONE -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005 incontainer incontainer org.apache.maven.plugins maven-surefire-plugin ${project.build.directory}/dependency/jsr303-tck-suite.xml validation.provider ${validation.provider} org.jboss.testharness.standalone false jboss.home ${jboss.home} org.jboss.testharness.container.javaOpts -Xms128m -Xmx384m -XX:MaxPermSize=128m -Dorg.jboss.resolver.warning=true -Dvalidation.provider=${validation.provider} ${remote.debug} org.jboss.testharness.container.forceRestart true org.jboss.testharness.runIntegrationTests true org.jboss.testharness.libraryDirectory target/dependency/lib org.jboss.testharness.outputDirectory target write-artifacts-to-disk dumpArtifacts org.codehaus.mojo exec-maven-plugin generate-jsr-303-artifacts test-compile java test org.jboss.testharness.api.TCK dumpArtifacts true org.jboss.testharness.outputDirectory target/jsr303-artifacts org.jboss.testharness.libraryDirectory target/jsr303-artifacts/dependencies maven-repo-helper-1.8.5/src/test/resources/maven-javadoc-plugin.xml0000644000000000000000000004514712247273474022301 0ustar 4.0.0 org.apache.maven.plugins maven-plugins 11 maven-javadoc-plugin 2.5 maven-plugin Maven Javadoc Plugin The Maven Javadoc Plugin is a plugin that uses the javadoc tool for generating javadocs for the specified project. 2004 2.0.9 scm:svn:http://svn.apache.org/repos/asf/maven/plugins/tags/maven-javadoc-plugin-2.5 scm:svn:https://svn.apache.org/repos/asf/maven/plugins/tags/maven-javadoc-plugin-2.5 http://svn.apache.org/viewvc/maven/plugins/tags/maven-javadoc-plugin-2.5 jira http://jira.codehaus.org/browse/MJAVADOC 1.0-alpha-11 1.0-alpha-11 1.0-beta-2 org.apache.maven maven-core 2.0.9 org.apache.maven maven-project 2.0.9 org.apache.maven maven-model 2.0.9 org.apache.maven maven-settings 2.0.9 org.apache.maven maven-plugin-api 2.0.9 org.apache.maven.reporting maven-reporting-api 2.0.9 org.apache.maven maven-artifact 2.0.9 org.apache.maven maven-artifact-manager 2.0.9 org.apache.maven maven-archiver 2.3 org.apache.maven.doxia doxia-sink-api ${doxiaVersion} org.apache.maven.doxia doxia-site-renderer ${doxia-sitetoolsVersion} org.apache.maven.wagon wagon-provider-api ${wagonVersion} commons-lang commons-lang 2.1 org.codehaus.plexus plexus-container-default 1.0-alpha-9 org.codehaus.plexus plexus-archiver 1.0-alpha-9 org.codehaus.plexus plexus-container-default org.codehaus.plexus plexus-component-api org.apache.maven maven-toolchain 1.0 plexus plexus-utils org.codehaus.plexus plexus-utils 1.5.6 junit junit 3.8.2 test org.apache.maven.plugin-testing maven-plugin-testing-harness 1.2 test org.apache.maven.plugins maven-plugin-plugin 2.4.3 org.codehaus.modello modello-maven-plugin 1.0-alpha-21 org.codehaus.modello modello-maven-plugin java 1.0.0 src/main/mdo/javadocOptions.mdo maven-project-info-reports-plugin 2.1 run-its org.apache.maven.plugins maven-invoker-plugin 1.2.1 src/it ${project.build.directory}/it **/MJAVADOC-110/pom.xml **/MJAVADOC-126/pom.xml **/MJAVADOC-137/pom.xml **/MJAVADOC-172/pom.xml **/MJAVADOC-180/pom.xml **/MJAVADOC-194/pom.xml **/MJAVADOC-206/pom.xml verify.bsh ${basedir}/target/local-repo src/it/settings.xml true integration-test install run reporting org.codehaus.mojo l10n-maven-plugin 1.0-alpha-1 de fr org.apache.maven.plugins maven-changes-plugin 2.0 Type,Key,Summary,Assignee,Status,Resolution,Fix Version true Closed Type,Key 1000 jira-report org.apache.maven.plugins maven-plugin-plugin 2.4.3 org.apache.maven.plugins maven-javadoc-plugin 2.4 org.apache.maven.tools.plugin.javadoc.MojoAggregatorTypeTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.apache.maven.tools.plugin.javadoc.MojoComponentFieldTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.apache.maven.tools.plugin.javadoc.MojoConfiguratorTypeTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.apache.maven.tools.plugin.javadoc.MojoExecuteTypeTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.apache.maven.tools.plugin.javadoc.MojoExecutionStrategyTypeTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.apache.maven.tools.plugin.javadoc.MojoGoalTypeTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.apache.maven.tools.plugin.javadoc.MojoInheritByDefaultTypeTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.apache.maven.tools.plugin.javadoc.MojoInstantiationStrategyTypeTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.apache.maven.tools.plugin.javadoc.MojoParameterFieldTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.apache.maven.tools.plugin.javadoc.MojoPhaseTypeTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.apache.maven.tools.plugin.javadoc.MojoReadOnlyFieldTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.apache.maven.tools.plugin.javadoc.MojoRequiredFieldTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.apache.maven.tools.plugin.javadoc.MojoRequiresDependencyResolutionTypeTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.apache.maven.tools.plugin.javadoc.MojoRequiresDirectInvocationTypeTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.apache.maven.tools.plugin.javadoc.MojoRequiresOnLineTypeTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.apache.maven.tools.plugin.javadoc.MojoRequiresProjectTypeTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.apache.maven.tools.plugin.javadoc.MojoRequiresReportsTypeTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.codehaus.plexus.javadoc.PlexusComponentTaglet org.codehaus.plexus plexus-javadoc 1.0 org.codehaus.plexus.javadoc.PlexusConfigurationTaglet org.codehaus.plexus plexus-javadoc 1.0 org.codehaus.plexus.javadoc.PlexusRequirementTaglet org.codehaus.plexus plexus-javadoc 1.0 maven-repo-helper-1.8.5/src/test/resources/servlet-api.cleaned0000644000000000000000000000277112247273474021314 0ustar 4.0.0 javax.servlet servlet-api 2.5 jar s/org.apache.tomcat/javax.servlet/ servlet-api jar s/.*/2.5/ * * 2.5 libservlet2.5-java javax.servlet package maven-repo-helper-1.8.5/src/test/resources/plexus-archiver.pom0000644000000000000000000000304612247273474021376 0ustar 4.0.0 plexus-components org.codehaus.plexus 1.1.14 plexus-archiver 1.0-alpha-12 Plexus Archiver Component Dan Tran Richard van der Hoff org.codehaus.plexus plexus-container-default org.codehaus.plexus plexus-utils org.codehaus.plexus plexus-io 1.0-alpha-4 scm:svn:http://svn.codehaus.org/plexus/plexus-components/tags/plexus-archiver-1.0-alpha-12 scm:svn:https://svn.codehaus.org/plexus/plexus-components/tags/plexus-archiver-1.0-alpha-12 http://fisheye.codehaus.org/browse/plexus/plexus-components/tags/plexus-archiver-1.0-alpha-12 maven-repo-helper-1.8.5/src/test/resources/hibernate-validator.pom0000644000000000000000000002576012247273474022210 0ustar hibernate-validator-parent org.hibernate 4.0.2.GA ../pom.xml 4.0.0 org.hibernate hibernate-validator Hibernate Validator site http://validator.hibernate.org javax.validation validation-api org.slf4j slf4j-api com.googlecode.jtype jtype 0.1.0 org.slf4j slf4j-log4j12 runtime true org.hibernate.java-persistence jpa-api 2.0.Beta-20090815 true org.testng testng test jdk15 test src/main/resources true src/main/xsd META-INF true org.apache.maven.plugins maven-source-plugin attach-sources jar org.codehaus.mojo jaxb2-maven-plugin xjc org.hibernate.validator.xml ${basedir}/target/generated-sources true org.apache.maven.plugins maven-surefire-plugin ${basedir}/src/test/suite/unit-tests.xml org.apache.maven.plugins maven-surefire-report-plugin generate-test-report test report-only ${project.build.directory}/surefire-reports test-report org.apache.maven.plugins maven-shade-plugin package shade com.googlecode.jtype:jtype com.googlecode.jtype org.hibernate.validator.jtype org.jboss.maven.plugins maven-jdocbook-plugin 2.2.0 true org.hibernate hibernate-jdocbook-style 2.0.0 jdocbook-style master.xml ${basedir}/src/main/docbook en-US ${basedir}/src/main/docbook/en-US/images pdf classpath:/xslt/org/hibernate/jdocbook/xslt/pdf.xsl hibernate_reference.pdf html_single classpath:/xslt/org/hibernate/jdocbook/xslt/xhtml-single.xsl index.html html classpath:/xslt/org/hibernate/jdocbook/xslt/xhtml.xsl index.html true saxon 1.72.0 - make-doc site resources generate org.jboss.maven.plugins maven-jdocbook-style-plugin 2.0.0 maven-assembly-plugin src/main/assembly/dist.xml make-assembly site assembly org.twdata.maven maven-cli-plugin 0.6.3.CR3 org.apache.maven.plugins maven-project-info-reports-plugin 2.0.1 jaxb 1.5 javax.xml.bind jaxb-api 2.1 com.sun.xml.bind jaxb-impl 2.1.3 maven-repo-helper-1.8.5/src/test/resources/apache.pom0000644000000000000000000003335512247273474017504 0ustar 4.0.0 org.apache apache 7 pom The Apache Software Foundation The Apache Software Foundation provides support for the Apache community of open-source software projects. The Apache projects are characterized by a collaborative, consensus based development process, an open and pragmatic software license, and a desire to create high quality software that leads the way in its field. We consider ourselves not simply a group of projects sharing a server, but rather a community of developers and users. The Apache Software License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0.txt repo The Apache Software Foundation http://www.apache.org/ http://www.apache.org/ apache.snapshots Apache Snapshot Repository http://repository.apache.org/snapshots false apache.releases.https Apache Release Distribution Repository https://repository.apache.org/service/local/staging/deploy/maven2 apache.snapshots.https ${distMgmtSnapshotsName} ${distMgmtSnapshotsUrl} Apache Announce List announce-subscribe@apache.org announce-unsubscribe@apache.org announce@apache.org http://mail-archives.apache.org/mod_mbox/www-announce/ Apache Development Snapshot Repository https://repository.apache.org/content/repositories/snapshots http://www.apache.org/images/asf_logo_wide.gif UTF-8 source-release scm:svn:http://svn.apache.org/repos/asf/maven/pom/tags/apache-7 scm:svn:https://svn.apache.org/repos/asf/maven/pom/tags/apache-7 http://svn.apache.org/viewvc/maven/pom/tags/apache-7 org.apache.maven.plugins maven-antrun-plugin 1.3 org.apache.maven.plugins maven-assembly-plugin 2.2-beta-5 org.apache.maven.plugins maven-clean-plugin 2.3 org.apache.maven.plugins maven-compiler-plugin 2.0.2 1.4 1.4 ${project.build.sourceEncoding} org.apache.maven.plugins maven-deploy-plugin 2.5 org.apache.maven.plugins maven-docck-plugin 1.0 org.apache.maven.plugins maven-enforcer-plugin 1.0-beta-1 org.apache.maven.plugins maven-gpg-plugin 1.0-alpha-4 org.apache.maven.plugins maven-install-plugin 2.3 org.apache.maven.plugins maven-invoker-plugin 1.5 org.apache.maven.plugins maven-jar-plugin 2.3 true true org.apache.maven.plugins maven-javadoc-plugin 2.5 org.apache.maven.plugins maven-plugin-plugin 2.5.1 org.apache.maven.plugins maven-release-plugin 2.0-beta-9 false deploy -Papache-release org.apache.maven.plugins maven-remote-resources-plugin 1.1 org.apache.maven.plugins maven-resources-plugin 2.4 ${project.build.sourceEncoding} org.apache.maven.plugins maven-scm-plugin 1.2 org.apache.maven.plugins maven-site-plugin 2.0.1 org.apache.maven.plugins maven-source-plugin 2.1.1 org.apache.maven.plugins maven-surefire-plugin 2.4.3 org.codehaus.mojo clirr-maven-plugin 2.2.2 org.codehaus.plexus plexus-maven-plugin 1.3.8 org.codehaus.modello modello-maven-plugin 1.1 org.apache.maven.plugins maven-remote-resources-plugin process org.apache:apache-jar-resource-bundle:1.4 maven-project-info-reports-plugin 2.1.2 apache-release maven-assembly-plugin org.apache.apache.resources apache-source-release-assembly-descriptor 1.0.2 source-release-assembly package single true ${sourceReleaseAssemblyDescriptor} gnu org.apache.maven.plugins maven-gpg-plugin ${gpg.passphrase} sign true org.apache.maven.plugins maven-deploy-plugin true org.apache.maven.plugins maven-source-plugin attach-sources jar org.apache.maven.plugins maven-javadoc-plugin ${project.build.sourceEncoding} attach-javadocs jar maven-repo-helper-1.8.5/src/test/resources/antlr3-tools.transformed0000644000000000000000000000577712247273474022364 0ustar 4.0.0 org.antlr antlr 3.2 jar org.antlr antlr-master 3.2 3.2 libantlr3-java ANTLR Grammar Tool http://antlr.org org.antlr antlr-runtime debian compile junit junit 4.x test install org.antlr antlr3-maven-plugin 3.2 target/generated-sources/antlr/org/antlr/grammar/v3 antlr org.codehaus.mojo antlr-maven-plugin src/main/antlr2/org/antlr/grammar/v2 antlr.g codegen.g, antlr.print.g, assign.types.g, buildnfa.g, define.g generate 2.1 maven-compiler-plugin 1.5 1.5 src maven-repo-helper-1.8.5/src/test/resources/maven-javadoc-plugin.transformed0000644000000000000000000004006612247273474024020 0ustar 4.0.0 org.apache.maven.plugins maven-javadoc-plugin 2.5 maven-plugin Maven Javadoc Plugin The Maven Javadoc Plugin is a plugin that uses the javadoc tool for generating javadocs for the specified project. 2004 2.0.9 scm:svn:http://svn.apache.org/repos/asf/maven/plugins/tags/maven-javadoc-plugin-2.5 scm:svn:https://svn.apache.org/repos/asf/maven/plugins/tags/maven-javadoc-plugin-2.5 http://svn.apache.org/viewvc/maven/plugins/tags/maven-javadoc-plugin-2.5 jira http://jira.codehaus.org/browse/MJAVADOC 1.0-alpha-11 1.0-alpha-11 1.0-beta-2 2.5 org.apache.maven maven-core debian org.apache.maven maven-project debian org.apache.maven maven-model debian org.apache.maven maven-settings debian org.apache.maven maven-plugin-api debian org.apache.maven.reporting maven-reporting-api debian org.apache.maven maven-artifact debian org.apache.maven maven-artifact-manager debian org.apache.maven maven-archiver debian org.apache.maven.doxia doxia-sink-api debian org.apache.maven.doxia doxia-site-renderer debian org.apache.maven.wagon wagon-provider-api debian commons-lang commons-lang debian org.codehaus.plexus plexus-container-default debian org.codehaus.plexus plexus-archiver debian org.codehaus.plexus plexus-container-default org.codehaus.plexus plexus-component-api org.apache.maven maven-toolchain debian plexus plexus-utils org.codehaus.plexus plexus-utils debian junit junit debian test org.apache.maven.plugin-testing maven-plugin-testing-harness debian test org.apache.maven.plugins maven-plugin-plugin 2.5 org.codehaus.modello modello-maven-plugin 1.0.1 org.codehaus.modello modello-maven-plugin java 1.0.0 src/main/mdo/javadocOptions.mdo maven-project-info-reports-plugin 2.1 run-its org.apache.maven.plugins maven-invoker-plugin 1.2.1 src/it ${project.build.directory}/it **/MJAVADOC-110/pom.xml **/MJAVADOC-126/pom.xml **/MJAVADOC-137/pom.xml **/MJAVADOC-172/pom.xml **/MJAVADOC-180/pom.xml **/MJAVADOC-194/pom.xml **/MJAVADOC-206/pom.xml verify.bsh ${basedir}/target/local-repo src/it/settings.xml true integration-test install run reporting org.codehaus.mojo l10n-maven-plugin 1.0-alpha-1 de fr org.apache.maven.plugins maven-changes-plugin 2.0 Type,Key,Summary,Assignee,Status,Resolution,Fix Version true Closed Type,Key 1000 jira-report org.apache.maven.plugins maven-plugin-plugin 2.5 org.apache.maven.plugins maven-javadoc-plugin 2.4 org.apache.maven.tools.plugin.javadoc.MojoAggregatorTypeTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.apache.maven.tools.plugin.javadoc.MojoComponentFieldTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.apache.maven.tools.plugin.javadoc.MojoConfiguratorTypeTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.apache.maven.tools.plugin.javadoc.MojoExecuteTypeTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.apache.maven.tools.plugin.javadoc.MojoExecutionStrategyTypeTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.apache.maven.tools.plugin.javadoc.MojoGoalTypeTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.apache.maven.tools.plugin.javadoc.MojoInheritByDefaultTypeTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.apache.maven.tools.plugin.javadoc.MojoInstantiationStrategyTypeTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.apache.maven.tools.plugin.javadoc.MojoParameterFieldTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.apache.maven.tools.plugin.javadoc.MojoPhaseTypeTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.apache.maven.tools.plugin.javadoc.MojoReadOnlyFieldTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.apache.maven.tools.plugin.javadoc.MojoRequiredFieldTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.apache.maven.tools.plugin.javadoc.MojoRequiresDependencyResolutionTypeTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.apache.maven.tools.plugin.javadoc.MojoRequiresDirectInvocationTypeTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.apache.maven.tools.plugin.javadoc.MojoRequiresOnLineTypeTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.apache.maven.tools.plugin.javadoc.MojoRequiresProjectTypeTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.apache.maven.tools.plugin.javadoc.MojoRequiresReportsTypeTaglet org.apache.maven.plugin-tools maven-plugin-tools-javadoc 2.4.3 org.codehaus.plexus.javadoc.PlexusComponentTaglet org.codehaus.plexus plexus-javadoc 1.0 org.codehaus.plexus.javadoc.PlexusConfigurationTaglet org.codehaus.plexus plexus-javadoc 1.0 org.codehaus.plexus.javadoc.PlexusRequirementTaglet org.codehaus.plexus plexus-javadoc 1.0 maven-repo-helper-1.8.5/src/test/resources/plexus-utils2.transformed0000644000000000000000000000572712247273474022556 0ustar 4.0.0 org.codehaus.plexus plexus-utils 2.0.5 jar org.codehaus.plexus plexus 2.x ../pom/pom.xml 2.0.5 libplexus-utils2-java Plexus Common Utilities A collection of various utility classes to ease working with strings, files, command lines, XML and more. http://plexus.codehaus.org/plexus-utils scm:svn:http://svn.codehaus.org/plexus/plexus-utils/tags/plexus-utils-2.0.5 scm:svn:https://svn.codehaus.org/plexus/plexus-utils/tags/plexus-utils-2.0.5 http://fisheye.codehaus.org/browse/plexus/plexus-utils/tags/plexus-utils-2.0.5 JIRA http://jira.codehaus.org/browse/PLXUTILS org.apache.maven.plugins maven-compiler-plugin 1.3 1.3 org.apache.maven.plugins maven-surefire-plugin true org/codehaus/plexus/util/FileBasedTestCase.java **/Test*.java JAVA_HOME ${JAVA_HOME} M2_HOME ${M2_HOME} maven-repo-helper-1.8.5/src/test/resources/mojo-parent.cleaned0000644000000000000000000002607012247273474021312 0ustar 4.0.0 org.codehaus.mojo mojo-parent debian pom org.codehaus codehaus-parent debian Codehaus Mojo Parent http://mojo.codehaus.org Codehaus http://codehaus.org Development List dev-subscribe@mojo.codehaus.org dev-unsubscribe@mojo.codehaus.org dev@mojo.codehaus.org http://archive.codehaus.org/lists/org.codehaus.mojo.dev http://www.nabble.com/mojo---dev-f11981.html http://markmail.org/list/org.codehaus.mojo.dev User List user-subscribe@mojo.codehaus.org user-unsubscribe@mojo.codehaus.org user@mojo.codehaus.org http://archive.codehaus.org/lists/org.codehaus.mojo.user http://www.nabble.com/mojo---user-f11980.html http://markmail.org/list/org.codehaus.mojo.user Commits List scm-subscribe@mojo.codehaus.org scm-unsubscribe@mojo.codehaus.org http://archive.codehaus.org/lists/org.codehaus.mojo.scm http://markmail.org/list/org.codehaus.mojo.scm scm:svn:http://svn.codehaus.org/mojo/tags/mojo-parent-27 scm:svn:https://svn.codehaus.org/mojo/tags/mojo-parent-27 http://fisheye.codehaus.org/browse/mojo/tags/mojo-parent-27 jira http://jira.codehaus.org/browse/MOJO UTF-8 1.4 UTF-8 true true org.codehaus.mojo mojo-parent pom s/.*/debian/ * * 27 libmojo-parent-java org.apache.maven maven-plugin-api 2.x junit junit 3.x test org.apache.maven.plugins maven-antrun-plugin org.apache.maven.plugins maven-assembly-plugin org.apache.maven.plugins maven-clean-plugin org.apache.maven.plugins maven-compiler-plugin ${project.build.sourceEncoding} ${mojo.java.target} ${mojo.java.target} org.apache.maven.plugins maven-deploy-plugin org.apache.maven.plugins maven-enforcer-plugin org.apache.maven.plugins maven-install-plugin org.apache.maven.plugins maven-invoker-plugin org.apache.maven.plugins maven-jar-plugin org.apache.maven.plugins maven-javadoc-plugin org.apache.maven.plugins maven-plugin-plugin help-mojo helpmojo org.apache.maven.plugins maven-project-info-reports-plugin org.apache.maven.plugins maven-release-plugin https://svn.codehaus.org/mojo/tags false -Pmojo-release org.apache.maven.plugins maven-resources-plugin org.apache.maven.plugins maven-site-plugin org.apache.maven.doxia doxia-module-xhtml 1.x org.apache.maven.doxia doxia-module-xhtml org.apache.maven.plugins maven-source-plugin org.apache.maven.plugins maven-surefire-plugin ${surefire.redirectTestOutputToFile} org.apache.maven.plugins maven-surefire-report-plugin org.codehaus.plexus plexus-maven-plugin org.codehaus.mojo taglist-maven-plugin maven-enforcer-plugin mojo-enforcer-rules verify enforce org.codehaus.plexus:plexus-component-api The plexus-component-api conflicts with the plexus-container-default used by Maven. You probably added a dependency that is missing the exclusions. Mojo is synchronized with repo1.maven.org. The rules for repo1.maven.org are that pom.xml files should not include repository definitions. If repository definitions are included, they must be limited to SNAPSHOT only repositories. true true codehaus.org apache.snapshots codehaus-snapshots codehaus.org apache.snapshots Best Practice is to always define plugin versions! true true org.apache.maven.plugins maven-plugin-plugin ${mojo.java.target} org.apache.maven.plugins maven-project-info-reports-plugin cim index issue-tracking mailing-list project-team scm summary maven-repo-helper-1.8.5/src/test/resources/antlr3-parent.transformed0000644000000000000000000001123212247273474022474 0ustar 4.0.0 org.antlr antlr-master 3.2 pom 3.2 libantlr3-java ANTLR Master build control POM http://maven.apache.org runtime/Java tool antlr3-maven-plugin antlr-repo ANTLR Testing repository scpexe://antlr.org/home/mavensync/antlr-repo antlr-snapshot ANTLR Testing Snapshot Repository scpexe://antlr.org/home/mavensync/antlr-snapshot antlr-snapshot ANTLR Testing Snapshot Repository http://antlr.org/antlr-snapshot true always junit junit 4.x test antlr antlr 2.x compile org.antlr stringtemplate 3.x compile install antlr.config src/main/resources true maven-compiler-plugin 1.5 jsr14 src maven-surefire-plugin maven-repo-helper-1.8.5/src/test/resources/plexus-active-collections.cleaned0000644000000000000000000000322212247273474024156 0ustar 4.0.0 org.codehaus.plexus plexus-active-collections debian jar 3.8.1 1.0-alpha-22 1.0-alpha-22 1.0-beta-2 libplexus-active-collections-java Plexus Container-Backed Active Collections org.codehaus.plexus plexus-component-api debian provided org.codehaus.plexus plexus-container-default 1.0-alpha scm:svn:http://svn.codehaus.org/plexus/tags/plexus-active-collections-1.0-beta-2 scm:svn:https://svn.codehaus.org/plexus/tags/plexus-active-collections-1.0-beta-2 maven-repo-helper-1.8.5/src/test/resources/modello-core.keep.cleaned0000644000000000000000000000157712247273474022370 0ustar 4.0.0 org.codehaus.modello modello-core 1.0-alpha-22 jar org.codehaus.modello modello 1.0-alpha-22 1.0-alpha-22 libmodello-java Modello Core org.codehaus.plexus plexus-container-default maven-repo-helper-1.8.5/src/test/resources/hibernate-validator-parent.cleaned0000644000000000000000000000537212247273474024274 0ustar 4.0.0 org.hibernate hibernate-validator-parent debian pom 4.0.2.GA libhibernate-validator-java Hibernate Validator Parent http://validator.hibernate.org Hibernate's Bean Validation (JSR-303) reference implementation. epbernard Emmanuel Bernard emmanuel@hibernate.org JBoss, a division of Red Hat http://in.relation.to/Bloggers/Emmanuel hardy.ferentschik Hardy Ferentschik hferents@redhat.com JBoss, a division of Red Hat http://in.relation.to/Bloggers/Hardy hibernate-dev hibernate-dev@lists.jboss.org hibernate-validator hibernate-validator-archetype hibernate-validator-legacy hibernate-validator-tck-runner javax.validation validation-api debian org.slf4j slf4j-api debian org.slf4j slf4j-log4j12 debian org.testng testng debian jdk15 JIRA http://opensource.atlassian.com/projects/hibernate/browse/HV 2007 Apache License, Version 2.0 license.txt scm:svn:https://svn.jboss.org/repos/hibernate/validator/tags/v4_0_2_GA http://fisheye.jboss.org/browse/Hibernate/validator/tags/v4_0_2_GA maven-repo-helper-1.8.5/src/test/resources/maven-packager-utils.pom0000644000000000000000000000352512247273474022276 0ustar 4.0.0 maven-debian org.debian.maven 1.2 maven-packager-utils maven-plugin Maven Packager Utilities org.apache.maven maven-plugin-api 2.2.1 org.apache.maven maven-artifact 2.2.1 junit junit 3.8.2 test org.apache.maven maven-project 2.2.1 org.apache.velocity velocity 1.6.2 org.debian.maven maven-repo-helper commons-io commons-io 1.4 test maven-repo-helper-1.8.5/src/test/resources/commons-validator.cleaned0000644000000000000000000001447412247273474022522 0ustar 4.0.0 commons-validator commons-validator debian jar 1.7.0 1.6 1.0.4 3.8.1 1.3.1 2.0.8 libcommons-validator-java 2.0.2 Validator Commons Validator provides the building blocks for both client side validation and server side data validation. It may be used standalone or with a framework likeStruts. http://jakarta.apache.org/commons/${pom.artifactId.substring(8)}/ http://issues.apache.org/jira/ 2002 Commons Dev List commons-dev-subscribe@jakarta.apache.org commons-dev-unsubscribe@jakarta.apache.org http://mail-archives.apache.org/mod_mbox/jakarta-commons-dev/ Commons User List commons-user-subscribe@jakarta.apache.org commons-user-unsubscribe@jakarta.apache.org http://mail-archives.apache.org/mod_mbox/jakarta-commons-user/ mrdon Don Brown mrdon@apache.org martinc Martin Cooper martinc@apache.org dgraham David Graham dgraham@apache.org husted Ted Husted husted@apache.org rleland Rob Leland rleland at apache.org craigmcc Craig McClanahan craigmcc@apache.org jmitchell James Mitchell jmitchell NOSPAM apache.org EdgeTech, Inc niallp Niall Pemberton turner James Turner turner@apache.org dwinterfeldt David Winterfeldt dwinterfeldt@apache.org bayard Henri Yandell Saul Q Yuan Add Shane Bailey Dave Derry Tim O'Brien Scott Clasen ticktock@speakeasy.net> Marcus Brito Finish Padma Ginnaram Thomas Jacob thomas.jacob@sinnerschrader.com Adam Kramer Greg Ludington Bjorn-H. Moritz David Neuer DavidNeuer@nascopgh.com Kurt Post Arun Mammen Thomas Steven Fines steven.fines@cotelligent.com Didier Romelot didier.romelot@renault.com Steve Stair Jeremy Tan jeremytan@scualum.com 94RGt2 lmagee@biziworks.com.au Nacho G. Mac Dowell Mark Lowe mark.lowe@boxstuff.com The Apache Software License, Version 2.0 /LICENSE.txt scm:svn:http://svn.apache.org/repos/asf/jakarta/commons/proper/${pom.artifactId.substring(8)}/trunk http://svn.apache.org/viewvc The Apache Software Foundation http://jakarta.apache.org commons-beanutils commons-beanutils debian commons-digester commons-digester debian commons-logging commons-logging debian oro oro debian true xml-apis xml-apis debian provided maven-repo-helper-1.8.5/src/test/resources/wagon-http-lightweight.xml0000644000000000000000000000202012247273474022656 0ustar 4.0.0 org.apache.maven.wagon wagon-providers 1.0-beta-5 ../pom.xml wagon-http-lightweight Maven Wagon Lightweight HTTP Provider Wagon that gets and puts artifacts through http using standard Java library ${pom.groupId} wagon-http-shared ${pom.version} commons-httpclient commons-httpclient maven-repo-helper-1.8.5/src/test/resources/antlr-maven-plugin.pom0000644000000000000000000001736212247273474022003 0ustar org.codehaus.mojo mojo 15 4.0.0 antlr-maven-plugin 2.1 maven-plugin Maven ANTLR Plugin Maven Plugin for Antlr v2 2004 The Apache Software License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0.txt repo 2.0.2 scm:svn:https://svn.codehaus.org/mojo/tags/antlr-maven-plugin-2.1 scm:svn:https://svn.codehaus.org/mojo/tags/antlr-maven-plugin-2.1 https://svn.codehaus.org/mojo/tags/antlr-maven-plugin-2.1 jira http://jira.codehaus.org/browse/MANTLR vsiveton Vincent Siveton vsiveton@apache.org ASF Java Developer -5 org.apache.maven maven-project 2.0.2 plexus plexus-utils org.apache.maven.reporting maven-reporting-impl 2.0.2 plexus plexus-utils org.apache.maven maven-plugin-api 2.0.2 plexus plexus-utils org.codehaus.plexus plexus-i18n 1.0-beta-6 org.codehaus.plexus plexus-utils 1.4.1 org.apache.maven.wagon wagon-provider-api 1.0-beta-1 org.apache.maven.shared maven-plugin-testing-harness 1.1 test maven-jar-plugin 2.1 maven-compiler-plugin 2.0.2 maven-resources-plugin 2.2 maven-surefire-plugin 2.3 maven-clean-plugin 2.2 org.codehaus.modello modello-maven-plugin 1.0-alpha-8 java 1.0.0 src/main/mdo/antlrOptions.mdo org.apache.maven.plugins maven-site-plugin 2.0-beta-5 integration-tests maven.test.skip !true org.apache.maven.plugins maven-clean-plugin src/it **/target org.apache.maven.plugins maven-install-plugin 2.2 it-test pre-integration-test install-file ${project.build.directory}/${project.build.finalName}.jar ${project.groupId} ${project.artifactId} ${project.version} ${project.packaging} ${basedir}/pom.xml true ${project.build.directory}/local-repo it-local-repo org.apache.maven.plugins maven-invoker-plugin 1.0 true true src/it **/pom.xml verify.bsh site ${project.build.directory}/local-repo integration-test integration-test run maven-repo-helper-1.8.5/src/test/resources/plexus-container-default.cleaned0000644000000000000000000000304512247273474023776 0ustar 4.0.0 org.codehaus.plexus plexus-container-default 1.0-alpha jar 1.1-alpha-2 3.8.1 org.codehaus.plexus plexus-container-default jar s/1\.0-alpha-.*/1.0-alpha/ * * 1.0.4 1.0-alpha-9-stable-1 libplexus-container-default-java Default Plexus Container junit junit debian compile org.codehaus.plexus plexus-utils debian classworlds classworlds debian maven-repo-helper-1.8.5/src/test/resources/modello-core.cleaned0000644000000000000000000000162112247273474021433 0ustar 4.0.0 org.codehaus.modello modello-core debian jar org.codehaus.modello modello debian 1.0-alpha-22 libmodello-java Modello Core org.codehaus.plexus plexus-container-default maven-repo-helper-1.8.5/src/test/resources/plexus-container-default.transformed0000644000000000000000000000431612247273474024731 0ustar 4.0.0 org.codehaus.plexus plexus-container-default 1.0-alpha jar org.codehaus.plexus plexus-containers debian org.codehaus.plexus plexus-container-default jar s/1\.0-alpha-.*/1.0-alpha/ * * 1.0-alpha-9-stable-1 Default Plexus Container maven-surefire-plugin **/Test*.java **/Abstract*.java org.apache.maven.wagon wagon-webdav debian junit junit debian compile org.codehaus.plexus plexus-utils debian classworlds classworlds debian codehaus.org Plexus Central Repository dav:https://dav.codehaus.org/repository/plexus codehaus.org Plexus Central Development Repository dav:https://dav.codehaus.org/snapshots.repository/plexus codehaus.org dav:https://dav.codehaus.org/plexus maven-repo-helper-1.8.5/src/test/resources/plexus-archiver.cleaned0000644000000000000000000000336712247273474022204 0ustar 4.0.0 org.codehaus.plexus plexus-archiver debian jar 1.0-alpha-4 1.0-alpha-12 libplexus-archiver-java Plexus Archiver Component Dan Tran Richard van der Hoff org.codehaus.plexus plexus-container-default debian org.codehaus.plexus plexus-utils debian org.codehaus.plexus plexus-io debian scm:svn:http://svn.codehaus.org/plexus/plexus-components/tags/plexus-archiver-1.0-alpha-12 scm:svn:https://svn.codehaus.org/plexus/plexus-components/tags/plexus-archiver-1.0-alpha-12 http://fisheye.codehaus.org/browse/plexus/plexus-components/tags/plexus-archiver-1.0-alpha-12 maven-repo-helper-1.8.5/src/test/resources/repository/0000755000000000000000000000000012247273474017754 5ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/0000755000000000000000000000000012247273474020543 5ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/clojure/0000755000000000000000000000000012247273474022206 5ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/clojure/clojure/0000755000000000000000000000000012247273474023651 5ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/clojure/clojure/1.2.1/0000755000000000000000000000000012247273474024310 5ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/clojure/clojure/1.2.1/clojure-1.2.1.pom0000644000000000000000000000172112247273474027126 0ustar 4.0.0 org.clojure clojure 1.2.1 jar * clojure * s/([0-9]+)\.([0-9]+).*/$1.$2.x/ * * 1.2.1 clojure1.2 clojure http://clojure.org/ Clojure core environment and runtime library. Eclipse Public License 1.0 http://opensource.org/licenses/eclipse-1.0.php repo maven-repo-helper-1.8.5/src/test/resources/repository/org/codehaus/0000755000000000000000000000000012247273474022336 5ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/codehaus/mojo/0000755000000000000000000000000012247273474023302 5ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/codehaus/mojo/antlr-maven-plugin/0000755000000000000000000000000012247273474027022 5ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/codehaus/mojo/antlr-maven-plugin/2.1/0000755000000000000000000000000012247273474027322 5ustar ././@LongLink0000644000000000000000000000017212247273574011657 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/codehaus/mojo/antlr-maven-plugin/2.1/antlr-maven-plugin-2.1.pommaven-repo-helper-1.8.5/src/test/resources/repository/org/codehaus/mojo/antlr-maven-plugin/2.1/antlr0000644000000000000000000001002712247273474030365 0ustar 4.0.0 org.codehaus.mojo antlr-maven-plugin 2.1 maven-plugin 2.0.2 2.0.2 2.0.2 1.1 1.0-beta-1 1.0-beta-6 1.4.1 2.1 libantlr-maven-plugin-java Maven ANTLR Plugin Maven Plugin for Antlr v2 2004 The Apache Software License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0.txt repo scm:svn:https://svn.codehaus.org/mojo/tags/antlr-maven-plugin-2.1 scm:svn:https://svn.codehaus.org/mojo/tags/antlr-maven-plugin-2.1 https://svn.codehaus.org/mojo/tags/antlr-maven-plugin-2.1 jira http://jira.codehaus.org/browse/MANTLR vsiveton Vincent Siveton vsiveton@apache.org ASF Java Developer -5 org.apache.maven maven-project debian plexus plexus-utils org.apache.maven.reporting maven-reporting-impl debian plexus plexus-utils org.apache.maven maven-plugin-api debian plexus plexus-utils org.codehaus.plexus plexus-i18n debian org.codehaus.plexus plexus-utils debian org.apache.maven.wagon wagon-provider-api debian ././@LongLink0000644000000000000000000000017212247273574011657 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/codehaus/mojo/antlr-maven-plugin/2.1/antlr-maven-plugin-2.1.jarmaven-repo-helper-1.8.5/src/test/resources/repository/org/codehaus/mojo/antlr-maven-plugin/2.1/antlr0000644000000000000000000000000012247273474030353 0ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/codehaus/modello/0000755000000000000000000000000012247273474023771 5ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/codehaus/modello/modello-maven-plugin/0000755000000000000000000000000012247273474030024 5ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/codehaus/modello/modello-maven-plugin/1.1/0000755000000000000000000000000012247273474030323 5ustar ././@LongLink0000644000000000000000000000020112247273574011650 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/codehaus/modello/modello-maven-plugin/1.1/modello-maven-plugin-1.1.jarmaven-repo-helper-1.8.5/src/test/resources/repository/org/codehaus/modello/modello-maven-plugin/1.1/0000644000000000000000000000000012247273474030313 0ustar ././@LongLink0000644000000000000000000000020112247273574011650 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/codehaus/modello/modello-maven-plugin/1.1/modello-maven-plugin-1.1.pommaven-repo-helper-1.8.5/src/test/resources/repository/org/codehaus/modello/modello-maven-plugin/1.1/0000644000000000000000000000526712247273474030337 0ustar 4.0.0 org.codehaus.modello modello-maven-plugin 1.1 maven-plugin 1.1 libmodello-maven-plugin-java Modello Maven Plugin Modello Maven Plugin enables the use of Modello in Maven builds. org.apache.maven maven-plugin-api org.codehaus.modello modello-core org.apache.maven maven-project org.codehaus.plexus plexus-container-default org.codehaus.plexus plexus-utils org.codehaus.modello modello-plugin-converters runtime org.codehaus.modello modello-plugin-dom4j runtime org.codehaus.modello modello-plugin-java org.codehaus.modello modello-plugin-jdom runtime org.codehaus.modello modello-plugin-stax runtime org.codehaus.modello modello-plugin-xdoc runtime org.codehaus.modello modello-plugin-xpp3 runtime org.codehaus.modello modello-plugin-xsd runtime org.sonatype.plexus plexus-build-api maven-repo-helper-1.8.5/src/test/resources/repository/org/antlr/0000755000000000000000000000000012247273474021663 5ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/antlr/antlr-master/0000755000000000000000000000000012247273474024274 5ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/antlr/antlr-master/3.x/0000755000000000000000000000000012247273474024704 5ustar ././@LongLink0000644000000000000000000000014612247273574011660 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/antlr/antlr-master/3.x/antlr-master-3.x.pommaven-repo-helper-1.8.5/src/test/resources/repository/org/antlr/antlr-master/3.x/antlr-master-3.x.po0000644000000000000000000001135412247273474030267 0ustar 4.0.0 org.antlr antlr-master 3.x pom 3.2 libantlr3-java org.antlr antlr-master * s/3\..*/3.x/ * ANTLR Master build control POM http://maven.apache.org runtime/Java tool antlr3-maven-plugin antlr-repo ANTLR Testing repository scpexe://antlr.org/home/mavensync/antlr-repo antlr-snapshot ANTLR Testing Snapshot Repository scpexe://antlr.org/home/mavensync/antlr-snapshot antlr-snapshot ANTLR Testing Snapshot Repository http://antlr.org/antlr-snapshot true always junit junit 4.x test antlr antlr 2.x compile org.antlr stringtemplate 3.x compile install antlr.config src/main/resources true maven-compiler-plugin 1.5 jsr14 src maven-surefire-plugin maven-repo-helper-1.8.5/src/test/resources/repository/org/antlr/antlr-master/3.2/0000755000000000000000000000000012247273474024576 5ustar ././@LongLink0000644000000000000000000000014612247273574011660 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/antlr/antlr-master/3.2/antlr-master-3.2.pommaven-repo-helper-1.8.5/src/test/resources/repository/org/antlr/antlr-master/3.2/antlr-master-3.2.po0000644000000000000000000001135412247273474030053 0ustar 4.0.0 org.antlr antlr-master 3.2 pom 3.2 libantlr3-java org.antlr antlr-master * s/3\..*/3.x/ * ANTLR Master build control POM http://maven.apache.org runtime/Java tool antlr3-maven-plugin antlr-repo ANTLR Testing repository scpexe://antlr.org/home/mavensync/antlr-repo antlr-snapshot ANTLR Testing Snapshot Repository scpexe://antlr.org/home/mavensync/antlr-snapshot antlr-snapshot ANTLR Testing Snapshot Repository http://antlr.org/antlr-snapshot true always junit junit 4.x test antlr antlr 2.x compile org.antlr stringtemplate 3.x compile install antlr.config src/main/resources true maven-compiler-plugin 1.5 jsr14 src maven-surefire-plugin maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/0000755000000000000000000000000012247273474021764 5ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/bcel/0000755000000000000000000000000012247273474022671 5ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/bcel/bcel/0000755000000000000000000000000012247273474023576 5ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/bcel/bcel/5.2/0000755000000000000000000000000012247273474024102 5ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/bcel/bcel/5.2/bcel-5.2.jar0000644000000000000000000000000012247273474025775 0ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/bcel/bcel/5.2/bcel-5.2.pom0000644000000000000000000000153112247273474026026 0ustar 4.0.0 org.apache.bcel bcel 5.2 jar 5.2 libbcel-java jakarta-regexp jakarta-regexp debian maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/bcel/bcel/5.x/0000755000000000000000000000000012247273474024210 5ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/bcel/bcel/5.x/bcel-5.x.jar0000644000000000000000000000000012247273474026211 0ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/bcel/bcel/5.x/bcel-5.x.pom0000644000000000000000000000153112247273474026242 0ustar 4.0.0 org.apache.bcel bcel 5.x jar 5.2 libbcel-java jakarta-regexp jakarta-regexp debian maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/ant/0000755000000000000000000000000012247273474022546 5ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/ant/ant-parent/0000755000000000000000000000000012247273474024617 5ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/ant/ant-parent/1.7.1/0000755000000000000000000000000012247273474025263 5ustar ././@LongLink0000644000000000000000000000015312247273574011656 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/ant/ant-parent/1.7.1/ant-parent-1.7.1.pommaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/ant/ant-parent/1.7.1/ant-parent-1.70000644000000000000000000000541112247273474027563 0ustar 4.0.0 org.apache.ant ant-parent 1.7.1 pom 1.7.1 ant master POM Apache Ant http://ant.apache.org/ 2000 Apache Software Foundation scm:svn:http://svn.apache.org/repos/asf/ant/core/trunk scm:svn:https://svn.apache.org/repos/asf/jant/core/trunk http://svn.apache.org/repos/asf/ant/core/trunk Ant Developers List dev-subscribe@ant.apache.org dev-unsubscribe@ant.apache.org dev@ant.apache.org http://mail-archives.apache.org/mod_mbox/ant-dev Ant Users List user-subscribe@ant.apache.org user-unsubscribe@ant.apache.org user@ant.apache.org http://mail-archives.apache.org/mod_mbox/ant-user bugzilla http://issues.apache.org/bugzilla/ ant ant-antlr ant-apache-bcel ant-apache-bsf ant-apache-log4j ant-apache-oro ant-apache-regexp ant-apache-resolver ant-commons-logging ant-commons-net ant-jai ant-javamail ant-jdepend ant-jmf ant-jsch ant-junit ant-launcher ant-netrexx ant-nodeps ant-starteam ant-stylebook ant-swing ant-testutil ant-trax ant-weblogic junit junit 3.x test maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/ant/ant-parent/debian/0000755000000000000000000000000012247273474026041 5ustar ././@LongLink0000644000000000000000000000015512247273574011660 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/ant/ant-parent/debian/ant-parent-debian.pommaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/ant/ant-parent/debian/ant-parent-de0000644000000000000000000000541212247273474030425 0ustar 4.0.0 org.apache.ant ant-parent debian pom 1.7.1 ant master POM Apache Ant http://ant.apache.org/ 2000 Apache Software Foundation scm:svn:http://svn.apache.org/repos/asf/ant/core/trunk scm:svn:https://svn.apache.org/repos/asf/jant/core/trunk http://svn.apache.org/repos/asf/ant/core/trunk Ant Developers List dev-subscribe@ant.apache.org dev-unsubscribe@ant.apache.org dev@ant.apache.org http://mail-archives.apache.org/mod_mbox/ant-dev Ant Users List user-subscribe@ant.apache.org user-unsubscribe@ant.apache.org user@ant.apache.org http://mail-archives.apache.org/mod_mbox/ant-user bugzilla http://issues.apache.org/bugzilla/ ant ant-antlr ant-apache-bcel ant-apache-bsf ant-apache-log4j ant-apache-oro ant-apache-regexp ant-apache-resolver ant-commons-logging ant-commons-net ant-jai ant-javamail ant-jdepend ant-jmf ant-jsch ant-junit ant-launcher ant-netrexx ant-nodeps ant-starteam ant-stylebook ant-swing ant-testutil ant-trax ant-weblogic junit junit 3.x test maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/ant/ant-apache-bcel/0000755000000000000000000000000012247273474025452 5ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/ant/ant-apache-bcel/1.7.1/0000755000000000000000000000000012247273474026116 5ustar ././@LongLink0000644000000000000000000000016512247273574011661 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/ant/ant-apache-bcel/1.7.1/ant-apache-bcel-1.7.1.jarmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/ant/ant-apache-bcel/1.7.1/ant-apach0000644000000000000000000000000012247273474027663 0ustar ././@LongLink0000644000000000000000000000016512247273574011661 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/ant/ant-apache-bcel/1.7.1/ant-apache-bcel-1.7.1.pommaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/ant/ant-apache-bcel/1.7.1/ant-apach0000644000000000000000000000213012247273474027671 0ustar 4.0.0 org.apache.ant ant-apache-bcel 1.7.1 jar org.apache.ant ant-parent 1.7.1 1.7.1 ant-optional org.apache.ant ant debian compile org.apache.bcel bcel 5.x compile maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/ant/ant-apache-bcel/debian/0000755000000000000000000000000012247273474026674 5ustar ././@LongLink0000644000000000000000000000016712247273574011663 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/ant/ant-apache-bcel/debian/ant-apache-bcel-debian.jarmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/ant/ant-apache-bcel/debian/ant-apac0000644000000000000000000000000012247273474030271 0ustar ././@LongLink0000644000000000000000000000016712247273574011663 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/ant/ant-apache-bcel/debian/ant-apache-bcel-debian.pommaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/ant/ant-apache-bcel/debian/ant-apac0000644000000000000000000000213212247273474030301 0ustar 4.0.0 org.apache.ant ant-apache-bcel debian jar org.apache.ant ant-parent debian 1.7.1 ant-optional org.apache.ant ant debian compile org.apache.bcel bcel 5.x compile maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/ant/ant/0000755000000000000000000000000012247273474023330 5ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/ant/ant/1.7.1/0000755000000000000000000000000012247273474023774 5ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/ant/ant/1.7.1/ant-1.7.1.pom0000644000000000000000000000255212247273474025741 0ustar 4.0.0 org.apache.ant ant 1.7.1 jar org.apache.ant ant-parent 1.7.1 1.7.1 ant org.apache.tools.ant Apache Ant org.apache.ant ant-launcher debian compile xerces xercesImpl debian true runtime xml-apis xml-apis debian true compile maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/ant/ant/1.7.1/ant-1.7.1.jar0000644000000000000000000000000012247273474025704 0ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/ant/ant/debian/0000755000000000000000000000000012247273474024552 5ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/ant/ant/debian/ant-debian.jar0000644000000000000000000000000012247273474027240 0ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/ant/ant/debian/ant-debian.pom0000644000000000000000000000255412247273474027277 0ustar 4.0.0 org.apache.ant ant debian jar org.apache.ant ant-parent debian 1.7.1 ant org.apache.tools.ant Apache Ant org.apache.ant ant-launcher debian compile xerces xercesImpl debian true runtime xml-apis xml-apis debian true compile maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/0000755000000000000000000000000012247273474023072 5ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/doxia/0000755000000000000000000000000012247273474024176 5ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/doxia/doxia-modules/0000755000000000000000000000000012247273474026750 5ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/doxia/doxia-modules/1.1.2/0000755000000000000000000000000012247273474027407 5ustar ././@LongLink0000644000000000000000000000017112247273574011656 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/doxia/doxia-modules/1.1.2/doxia-modules-1.1.2.pommaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/doxia/doxia-modules/1.1.2/dox0000644000000000000000000000274012247273474030127 0ustar 4.0.0 org.apache.maven.doxia doxia-modules 1.1.2 pom org.apache.maven.doxia doxia 1.1.2 1.1.2 libdoxia-java Doxia :: Modules Doxia modules for several markup languages. doxia-module-apt doxia-module-confluence doxia-module-docbook-simple doxia-module-fml doxia-module-fo doxia-module-itext doxia-module-latex doxia-module-rtf doxia-module-twiki doxia-module-xdoc doxia-module-xhtml org.apache.maven.doxia doxia-core org.apache.maven.doxia doxia-sink-api maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/doxia/doxia-modules/debian/0000755000000000000000000000000012247273474030172 5ustar ././@LongLink0000644000000000000000000000017312247273574011660 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/doxia/doxia-modules/debian/doxia-modules-debian.pommaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/doxia/doxia-modules/debian/do0000644000000000000000000000274212247273474030524 0ustar 4.0.0 org.apache.maven.doxia doxia-modules debian pom org.apache.maven.doxia doxia debian 1.1.2 libdoxia-java Doxia :: Modules Doxia modules for several markup languages. doxia-module-apt doxia-module-confluence doxia-module-docbook-simple doxia-module-fml doxia-module-fo doxia-module-itext doxia-module-latex doxia-module-rtf doxia-module-twiki doxia-module-xdoc doxia-module-xhtml org.apache.maven.doxia doxia-core org.apache.maven.doxia doxia-sink-api maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/doxia/doxia/0000755000000000000000000000000012247273474025302 5ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/doxia/doxia/1.1.2/0000755000000000000000000000000012247273474025741 5ustar ././@LongLink0000644000000000000000000000015112247273574011654 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/doxia/doxia/1.1.2/doxia-1.1.2.pommaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/doxia/doxia/1.1.2/doxia-1.1.20000644000000000000000000001567012247273474027436 0ustar 4.0.0 org.apache.maven.doxia doxia 1.1.2 pom Doxia Doxia is a content generation framework that provides powerful techniques for generating static and dynamic content, supporting a variety of markup languages. http://maven.apache.org/doxia/doxia 2005 Doxia Developer List doxia-dev@maven.apache.org doxia-dev-subscribe@maven.apache.org doxia-dev-unsubscribe@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-doxia-dev/ http://www.mail-archive.com/doxia-dev@maven.apache.org http://www.nabble.com/Doxia---dev-f11816.html http://maven.doxia.dev.markmail.org/ Doxia User List doxia-users@maven.apache.org doxia-users-subscribe@maven.apache.org doxia-users-unsubscribe@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-doxia-users/ http://www.mail-archive.com/doxia-users@maven.apache.org http://www.nabble.com/Doxia---Users-f14483.html http://maven.doxia.users.markmail.org/ Doxia Commits List doxia-commits-subscribe@maven.apache.org doxia-commits-unsubscribe@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-doxia-commits/ http://www.mail-archive.com/doxia-commits@maven.apache.org http://maven.doxia.commits.markmail.org/ Maven Issues List issues-subscribe@maven.apache.org issues-unsubscribe@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-issues/ http://www.mail-archive.com/issues@maven.apache.org http://www.nabble.com/Maven---Issues-f15573.html http://maven.issues.markmail.org/ doxia-logging-api doxia-sink-api doxia-test-docs doxia-core doxia-modules doxia-book doxia-maven-plugin scm:svn:http://svn.apache.org/repos/asf/maven/doxia/doxia/tags/doxia-1.1.2 scm:svn:https://svn.apache.org/repos/asf/maven/doxia/doxia/tags/doxia-1.1.2 http://svn.apache.org/viewcvs.cgi/maven/doxia/doxia/tags/doxia-1.1.2 jira http://jira.codehaus.org/browse/DOXIA ${project.version} 1.1.2 libdoxia-java org.apache.maven.doxia doxia-sink-api debian org.apache.maven.doxia doxia-logging-api debian org.apache.maven.doxia doxia-test-docs debian org.apache.maven.doxia doxia-core debian org.apache.maven.doxia doxia-module-apt debian org.apache.maven.doxia doxia-module-confluence debian org.apache.maven.doxia doxia-module-docbook-simple debian org.apache.maven.doxia doxia-module-fml debian org.apache.maven.doxia doxia-module-fo debian org.apache.maven.doxia doxia-module-latex debian org.apache.maven.doxia doxia-module-itext debian org.apache.maven.doxia doxia-module-rtf debian org.apache.maven.doxia doxia-module-twiki debian org.apache.maven.doxia doxia-module-xdoc debian org.apache.maven.doxia doxia-module-xhtml debian org.apache.maven.doxia doxia-book debian org.apache.maven.doxia doxia-maven-plugin debian org.codehaus.plexus plexus-container-default debian org.codehaus.plexus plexus-utils debian junit junit 3.x test maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/doxia/doxia/debian/0000755000000000000000000000000012247273474026524 5ustar ././@LongLink0000644000000000000000000000015312247273574011656 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/doxia/doxia/debian/doxia-debian.pommaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/doxia/doxia/debian/doxia-debi0000644000000000000000000001567112247273474030466 0ustar 4.0.0 org.apache.maven.doxia doxia debian pom Doxia Doxia is a content generation framework that provides powerful techniques for generating static and dynamic content, supporting a variety of markup languages. http://maven.apache.org/doxia/doxia 2005 Doxia Developer List doxia-dev@maven.apache.org doxia-dev-subscribe@maven.apache.org doxia-dev-unsubscribe@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-doxia-dev/ http://www.mail-archive.com/doxia-dev@maven.apache.org http://www.nabble.com/Doxia---dev-f11816.html http://maven.doxia.dev.markmail.org/ Doxia User List doxia-users@maven.apache.org doxia-users-subscribe@maven.apache.org doxia-users-unsubscribe@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-doxia-users/ http://www.mail-archive.com/doxia-users@maven.apache.org http://www.nabble.com/Doxia---Users-f14483.html http://maven.doxia.users.markmail.org/ Doxia Commits List doxia-commits-subscribe@maven.apache.org doxia-commits-unsubscribe@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-doxia-commits/ http://www.mail-archive.com/doxia-commits@maven.apache.org http://maven.doxia.commits.markmail.org/ Maven Issues List issues-subscribe@maven.apache.org issues-unsubscribe@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-issues/ http://www.mail-archive.com/issues@maven.apache.org http://www.nabble.com/Maven---Issues-f15573.html http://maven.issues.markmail.org/ doxia-logging-api doxia-sink-api doxia-test-docs doxia-core doxia-modules doxia-book doxia-maven-plugin scm:svn:http://svn.apache.org/repos/asf/maven/doxia/doxia/tags/doxia-1.1.2 scm:svn:https://svn.apache.org/repos/asf/maven/doxia/doxia/tags/doxia-1.1.2 http://svn.apache.org/viewcvs.cgi/maven/doxia/doxia/tags/doxia-1.1.2 jira http://jira.codehaus.org/browse/DOXIA ${project.version} 1.1.2 libdoxia-java org.apache.maven.doxia doxia-sink-api debian org.apache.maven.doxia doxia-logging-api debian org.apache.maven.doxia doxia-test-docs debian org.apache.maven.doxia doxia-core debian org.apache.maven.doxia doxia-module-apt debian org.apache.maven.doxia doxia-module-confluence debian org.apache.maven.doxia doxia-module-docbook-simple debian org.apache.maven.doxia doxia-module-fml debian org.apache.maven.doxia doxia-module-fo debian org.apache.maven.doxia doxia-module-latex debian org.apache.maven.doxia doxia-module-itext debian org.apache.maven.doxia doxia-module-rtf debian org.apache.maven.doxia doxia-module-twiki debian org.apache.maven.doxia doxia-module-xdoc debian org.apache.maven.doxia doxia-module-xhtml debian org.apache.maven.doxia doxia-book debian org.apache.maven.doxia doxia-maven-plugin debian org.codehaus.plexus plexus-container-default debian org.codehaus.plexus plexus-utils debian junit junit 3.x test maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/0000755000000000000000000000000012247273474024553 5ustar ././@LongLink0000644000000000000000000000015512247273574011660 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-surefire-report-plugin/maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-surefire-report0000755000000000000000000000000012247273474030735 5ustar ././@LongLink0000644000000000000000000000016312247273574011657 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-surefire-report-plugin/2.4.3/maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-surefire-report0000755000000000000000000000000012247273474030735 5ustar ././@LongLink0000644000000000000000000000023112247273574011653 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-surefire-report-plugin/2.4.3/maven-surefire-report-plugin-2.4.3.jarmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-surefire-report0000644000000000000000000000000012247273474030725 0ustar ././@LongLink0000644000000000000000000000023112247273574011653 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-surefire-report-plugin/2.4.3/maven-surefire-report-plugin-2.4.3.pommaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-surefire-report0000644000000000000000000000235512247273474030744 0ustar 4.0.0 org.apache.maven.plugins maven-surefire-report-plugin 2.4.3 maven-plugin 2.4.3 libsurefire-java Maven Surefire Report Plugin jruiz Johnny Ruiz III jruiz@exist.com org.apache.maven.reporting maven-reporting-api debian org.apache.maven.reporting maven-reporting-impl debian maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-clean-plugin/0000755000000000000000000000000012247273474030235 5ustar ././@LongLink0000644000000000000000000000014712247273574011661 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-clean-plugin/2.3/maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-clean-plugin/2.0000755000000000000000000000000012247273474030375 5ustar ././@LongLink0000644000000000000000000000020112247273574011650 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-clean-plugin/2.3/maven-clean-plugin-2.3.jarmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-clean-plugin/2.0000644000000000000000000000000012247273474030365 0ustar ././@LongLink0000644000000000000000000000020112247273574011650 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-clean-plugin/2.3/maven-clean-plugin-2.3.pommaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-clean-plugin/2.0000644000000000000000000000363412247273474030405 0ustar 4.0.0 org.apache.maven.plugins maven-clean-plugin 2.3 maven-plugin 2.3 libmaven-clean-plugin-java Maven Clean Plugin The Maven Clean Plugin is a plugin that removes files generated at build-time in a project's directory. 2001 Jesse McConnell scm:svn:http://svn.apache.org/repos/asf/maven/plugins/tags/maven-clean-plugin-2.3 scm:svn:https://svn.apache.org/repos/asf/maven/plugins/tags/maven-clean-plugin-2.3 http://svn.apache.org/viewvc/maven/plugins/tags/maven-clean-plugin-2.3 JIRA http://jira.codehaus.org/browse/MCLEAN org.apache.maven maven-project debian org.apache.maven maven-plugin-api debian org.apache.maven.shared file-management debian org.codehaus.plexus plexus-utils debian ././@LongLink0000644000000000000000000000014612247273574011660 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-compiler-plugin/maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-compiler-plugin0000755000000000000000000000000012247273474030706 5ustar ././@LongLink0000644000000000000000000000015412247273574011657 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-compiler-plugin/2.0.2/maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-compiler-plugin0000755000000000000000000000000012247273474030706 5ustar ././@LongLink0000644000000000000000000000021312247273574011653 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-compiler-plugin/2.0.2/maven-compiler-plugin-2.0.2.jarmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-compiler-plugin0000644000000000000000000000000012247273474030676 0ustar ././@LongLink0000644000000000000000000000021312247273574011653 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-compiler-plugin/2.0.2/maven-compiler-plugin-2.0.2.pommaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-compiler-plugin0000644000000000000000000000404712247273474030715 0ustar 4.0.0 org.apache.maven.plugins maven-compiler-plugin 2.0.2 maven-plugin 2.0.2 libmaven-compiler-plugin-java Maven Compiler Plugin 2001 JIRA http://jira.codehaus.org/browse/MCOMPILER org.apache.maven maven-plugin-api debian org.codehaus.plexus plexus-utils debian org.codehaus.plexus plexus-compiler-api debian org.codehaus.plexus plexus-compiler-manager debian org.codehaus.plexus plexus-compiler-javac debian runtime org.apache.maven maven-artifact debian scm:svn:https://svn.apache.org/repos/asf/maven/plugins/tags/maven-compiler-plugin-2.0.2 scm:svn:https://svn.apache.org/repos/asf/maven/plugins/tags/maven-compiler-plugin-2.0.2 https://svn.apache.org/repos/asf/maven/plugins/tags/maven-compiler-plugin-2.0.2 ././@LongLink0000644000000000000000000000014612247273574011660 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-surefire-plugin/maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-surefire-plugin0000755000000000000000000000000012247273474030720 5ustar ././@LongLink0000644000000000000000000000015412247273574011657 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-surefire-plugin/2.4.3/maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-surefire-plugin0000755000000000000000000000000012247273474030720 5ustar ././@LongLink0000644000000000000000000000021312247273574011653 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-surefire-plugin/2.4.3/maven-surefire-plugin-2.4.3.jarmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-surefire-plugin0000644000000000000000000000000012247273474030710 0ustar ././@LongLink0000644000000000000000000000021312247273574011653 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-surefire-plugin/2.4.3/maven-surefire-plugin-2.4.3.pommaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-surefire-plugin0000644000000000000000000000763612247273474030736 0ustar 4.0.0 org.apache.maven.plugins maven-surefire-plugin 2.4.3 maven-plugin 2.4.3 libsurefire-java Maven Surefire Plugin Maven User List users-subscribe@maven.apache.org users-unsubscribe@maven.apache.org users@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-users http://www.mail-archive.com/users@maven.apache.org/ http://www.nabble.com/Maven---Users-f178.html Maven Developer List dev-subscribe@maven.apache.org dev-unsubscribe@maven.apache.org dev@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-dev Maven Commits List commits-subscribe@maven.apache.org commits-unsubscribe@maven.apache.org commits@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-dev Maven Announcements List announce@maven.apache.org announce-subscribe@maven.apache.org announce-unsubscribe@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-announce/ Maven Issues List issues@maven.apache.org issues-subscribe@maven.apache.org issues-unsubscribe@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-issues/ Maven Notifications List notifications@maven.apache.org notifications-subscribe@maven.apache.org notifications-unsubscribe@maven.apache.org http://mail-archives.apache.org/mod_mbox/maven-notifications/ Joakim Erdfelt joakim@erdfelt.com org.apache.maven maven-plugin-api debian org.apache.maven.surefire surefire-booter org.codehaus.plexus plexus-utils org.apache.maven maven-artifact debian org.apache.maven maven-project debian org.apache.maven maven-core debian org.apache.maven maven-toolchain debian maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-shade-plugin/0000755000000000000000000000000012247273474030237 5ustar ././@LongLink0000644000000000000000000000015112247273574011654 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-shade-plugin/1.2.1/maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-shade-plugin/1.0000755000000000000000000000000012247273474030376 5ustar ././@LongLink0000644000000000000000000000020512247273574011654 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-shade-plugin/1.2.1/maven-shade-plugin-1.2.1.pommaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-shade-plugin/1.0000644000000000000000000000526112247273474030404 0ustar 4.0.0 org.apache.maven.plugins maven-shade-plugin 1.2.1 maven-plugin Maven Shade Plugin Repackages the project classes together with their dependencies into a single uber-jar, optionally renaming classes. scm:svn:http://svn.apache.org/repos/asf/maven/plugins/tags/maven-shade-plugin-1.2.1 scm:svn:https://svn.apache.org/repos/asf/maven/plugins/tags/maven-shade-plugin-1.2.1 http://svn.apache.org/viewvc/maven/plugins/tags/maven-shade-plugin-1.2.1 jira http://jira.codehaus.org/browse/MSHADE 2.0.6 ${project.version} 1.2.1 libmaven-shade-plugin-java org.apache.maven maven-plugin-api debian org.apache.maven maven-model debian org.apache.maven maven-project debian org.apache.maven maven-artifact debian org.codehaus.plexus plexus-container-default 1.0-alpha org.codehaus.plexus plexus-utils debian asm asm 3.x asm asm-commons 3.x org.jdom jdom debian org.apache.maven.shared maven-dependency-tree debian ././@LongLink0000644000000000000000000000020512247273574011654 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-shade-plugin/1.2.1/maven-shade-plugin-1.2.1.jarmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-shade-plugin/1.0000644000000000000000000000000012247273474030366 0ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-site-plugin/0000755000000000000000000000000012247273474030117 5ustar ././@LongLink0000644000000000000000000000014612247273574011660 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-site-plugin/2.1/maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-site-plugin/2.10000755000000000000000000000000012247273474030340 5ustar ././@LongLink0000644000000000000000000000017712247273574011664 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-site-plugin/2.1/maven-site-plugin-2.1.jarmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-site-plugin/2.10000644000000000000000000000000012247273474030330 0ustar ././@LongLink0000644000000000000000000000017712247273574011664 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-site-plugin/2.1/maven-site-plugin-2.1.pommaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-site-plugin/2.10000644000000000000000000002046612247273474030352 0ustar 4.0.0 org.apache.maven.plugins maven-site-plugin 2.1 maven-plugin Maven Site Plugin The Maven Site Plugin is a plugin that generates a site for the current project. Naoki Nose ikkoan@mail.goo.ne.jp Japanese translator Michael Wechner michael.wechner@wyona.com German translator Christian Schulte cs@schulte.it German translator Piotr Bzdyl piotr@bzdyl.net Polish translator Domingos Creado dcreado@users.sf.net Brazilian Portuguese translator John Allen john_h_allen@hotmail.com Laszlo Hornyak Kocka laszlo.hornyak@gmail.com Hungarian translator Hermod Opstvedt hermod.opstvedt@dnbnor.no Norwegian translator Yue Ni ni2yue4@gmail.com Chinese translator Arturo Vazquez vaz@root.com.mx Spanish translator Woonsan Ko woon_san@yahoo.com Korean translator Martin Vysny mvy@whitestein.com Slovak translator Petr Ferschmann pferschmann@softeu.com Czech translator Kristian Mandrup kristian@mandrup.dk Danish translator Samuel Santos samaxes@gmail.com Portuguese translator scm:svn:http://svn.apache.org/repos/asf/maven/plugins/tags/maven-site-plugin-2.1 scm:svn:https://svn.apache.org/repos/asf/maven/plugins/tags/maven-site-plugin-2.1 http://svn.apache.org/viewvc/maven/plugins/tags/maven-site-plugin-2.1 JIRA http://jira.codehaus.org/browse/MSITE 1.1.2 1.1.2 2.0.6 1.0-beta-4 2.1 libmaven-site-plugin-java org.apache.maven maven-artifact debian org.apache.maven maven-artifact-manager debian org.apache.maven maven-model debian org.apache.maven maven-plugin-api debian org.apache.maven maven-project debian org.apache.maven maven-settings debian org.apache.maven.reporting maven-reporting-api debian org.apache.maven.doxia doxia-module-xhtml debian org.apache.maven.doxia doxia-sink-api debian org.apache.maven.doxia doxia-logging-api debian org.apache.maven.doxia doxia-module-apt debian runtime org.apache.maven.doxia doxia-module-xdoc debian org.apache.maven.doxia doxia-module-fml debian runtime org.apache.maven.doxia doxia-decoration-model debian org.codehaus.plexus plexus-component-api org.codehaus.plexus plexus-container-default org.apache.maven.doxia doxia-site-renderer debian org.codehaus.plexus plexus-component-api org.codehaus.plexus plexus-container-default org.apache.maven.shared maven-doxia-tools debian org.apache.maven.wagon wagon-provider-api debian org.codehaus.plexus plexus-archiver debian org.codehaus.plexus plexus-container-default debian org.codehaus.plexus plexus-i18n debian org.codehaus.plexus plexus-component-api org.codehaus.plexus plexus-velocity debian commons-collections commons-collections org.codehaus.plexus plexus-component-api velocity velocity org.codehaus.plexus plexus-utils debian org.apache.velocity velocity debian org.mortbay.jetty jetty 6.x maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-jar-plugin/0000755000000000000000000000000012247273474027727 5ustar maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-jar-plugin/2.2/0000755000000000000000000000000012247273474030230 5ustar ././@LongLink0000644000000000000000000000017512247273574011662 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-jar-plugin/2.2/maven-jar-plugin-2.2.jarmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-jar-plugin/2.2/0000644000000000000000000000000012247273474030220 0ustar ././@LongLink0000644000000000000000000000017512247273574011662 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-jar-plugin/2.2/maven-jar-plugin-2.2.pommaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-jar-plugin/2.2/0000644000000000000000000000566712247273474030250 0ustar 4.0.0 org.apache.maven.plugins maven-jar-plugin 2.2 maven-plugin 2.2 libmaven-jar-plugin-java Maven Jar Plugin JIRA http://jira.codehaus.org/browse/MJAR scm:svn:http://svn.apache.org/repos/asf/maven/plugins/tags/maven-jar-plugin-2.2 scm:svn:https://svn.apache.org/repos/asf/maven/plugins/tags/maven-jar-plugin-2.2 http://svn.apache.org/viewvc/maven/plugins/tags/maven-jar-plugin-2.2 Jerome Lacoste jerome@coffeebreaks.org CoffeeBreaks http://www.coffeebreaks.org +1 Java Developer org.apache.maven maven-plugin-api debian org.apache.maven maven-project debian org.apache.maven maven-archiver debian org.codehaus.plexus plexus-archiver debian org.codehaus.plexus plexus-container-default org.codehaus.plexus plexus-component-api org.codehaus.plexus plexus-io debian org.codehaus.plexus plexus-container-default org.codehaus.plexus plexus-component-api commons-lang commons-lang debian org.codehaus.plexus plexus-utils debian ././@LongLink0000644000000000000000000000014712247273574011661 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-resources-plugin/maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-resources-plugi0000755000000000000000000000000012247273474030730 5ustar ././@LongLink0000644000000000000000000000015312247273574011656 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-resources-plugin/2.3/maven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-resources-plugi0000755000000000000000000000000012247273474030730 5ustar ././@LongLink0000644000000000000000000000021112247273574011651 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-resources-plugin/2.3/maven-resources-plugin-2.3.jarmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-resources-plugi0000644000000000000000000000000012247273474030720 0ustar ././@LongLink0000644000000000000000000000021112247273574011651 Lustar rootrootmaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-resources-plugin/2.3/maven-resources-plugin-2.3.pommaven-repo-helper-1.8.5/src/test/resources/repository/org/apache/maven/plugins/maven-resources-plugi0000644000000000000000000000424312247273474030735 0ustar 4.0.0 org.apache.maven.plugins maven-resources-plugin 2.3 maven-plugin 2.3 libmaven-resources-plugin-java Maven Resources Plugin The Resources Plugin handles the copying of project resources to the output directory. There are two different kinds of resources: main resources and test resources. The difference is that the main resources are the resources associated to the main source code while the test resources are associated to the test source code. Thus, this allows the separation of resources for the main source code and its unit tests. 2001 scm:svn:http://svn.apache.org/repos/asf/maven/plugins/tags/maven-resources-plugin-2.3 scm:svn:https://svn.apache.org/repos/asf/maven/plugins/tags/maven-resources-plugin-2.3 http://svn.apache.org/viewvc/maven/plugins/tags/maven-resources-plugin-2.3 JIRA http://jira.codehaus.org/browse/MRESOURCES org.apache.maven maven-plugin-api debian org.apache.maven maven-project debian org.codehaus.plexus plexus-utils debian org.apache.maven.shared maven-filtering debian maven-repo-helper-1.8.5/src/test/resources/repository/root.dir0000644000000000000000000000000012247273474021425 0ustar maven-repo-helper-1.8.5/src/test/resources/antlr3.transformed0000644000000000000000000000554012247273474021212 0ustar 4.0.0 org.antlr antlr-runtime 3.2 jar org.antlr antlr-master 3.2 3.2 libantlr3-java org.antlr antlr-master pom 3.2 *, org.antlr antlr-runtime jar 3.2 * Antlr 3 Runtime A framework for constructing recognizers, compilers, and translators from grammatical descriptions containing Java, C#, C++, or Python actions. http://www.antlr.org Terence Parr USFCA http://www.cs.usfca.edu parrt@antlr.org Project Leader Developer - Java Target PST Jim Idle Temporal Wave LLC http://www.temporal-wave.com jimi@temporal-wave.com Developer - Maven stuff Developer - C Target PST http://fisheye2.cenqua.com/browse/antlr http://fisheye2.cenqua.com/browse/antlr antlr-repo ANTLR Testing repository scpexe://antlr.org/home/mavensync/antlr-repo antlr-snapshot ANTLR Testing Snapshot Repository scpexe://antlr.org/home/mavensync/antlr-snapshot org.antlr stringtemplate 3.x compile install org.apache.maven.wagon wagon-ssh-external debian maven-compiler-plugin 2.0.2 1.5 jsr14 maven-repo-helper-1.8.5/src/test/resources/maven-core.xml0000644000000000000000000002047312247273474020321 0ustar 4.0.0 org.apache.maven maven 2.1.1-SNAPSHOT maven-core Maven Core org.apache.maven maven-settings org.apache.maven.wagon wagon-file runtime org.apache.maven maven-plugin-parameter-documenter org.apache.maven.wagon wagon-webdav-jackrabbit runtime org.apache.maven.wagon wagon-http-lightweight runtime org.apache.maven.reporting maven-reporting-api org.apache.maven maven-profile org.apache.maven maven-model org.apache.maven maven-artifact org.apache.maven.wagon wagon-provider-api org.codehaus.plexus plexus-container-default org.apache.maven maven-repository-metadata org.apache.maven maven-error-diagnostics org.apache.maven maven-project commons-cli commons-cli commons-lang commons-lang commons-logging commons-logging org.apache.maven maven-plugin-api org.apache.maven.wagon wagon-ssh-external runtime org.apache.maven maven-plugin-descriptor org.codehaus.plexus plexus-interactivity-api 1.0-alpha-4 plexus-utils plexus plexus-container-default org.codehaus.plexus org.apache.maven maven-artifact-manager org.apache.maven maven-monitor org.apache.maven.wagon wagon-ssh org.codehaus.plexus plexus-utils classworlds classworlds org.sonatype.plexus plexus-sec-dispatcher src/main/resources true org.codehaus.mojo l10n-maven-plugin 1.0-alpha-1 el de es fr ja nl no pl zh_CN include-site org.apache.maven.plugins maven-scm-plugin scm:svn:http://svn.apache.org/repos/asf/maven/site/trunk ${project.build.directory}/maven-site initialize checkout org.apache.maven.plugins maven-invoker-plugin ${project.build.directory}/maven-site ${project.build.directory}/maven-site/pom.xml clean site initialize initialize run buildnumber .svn org.codehaus.mojo buildnumber-maven-plugin 1.0-beta-1 generate-resources create false false maven-repo-helper-1.8.5/src/test/resources/hibernate-validator-parent.pom0000644000000000000000000002333312247273474023471 0ustar 4.0.0 org.hibernate hibernate-validator-parent pom 4.0.2.GA Hibernate Validator Parent http://validator.hibernate.org Hibernate's Bean Validation (JSR-303) reference implementation. epbernard Emmanuel Bernard emmanuel@hibernate.org JBoss, a division of Red Hat http://in.relation.to/Bloggers/Emmanuel hardy.ferentschik Hardy Ferentschik hferents@redhat.com JBoss, a division of Red Hat http://in.relation.to/Bloggers/Hardy hibernate-dev hibernate-dev@lists.jboss.org hibernate-validator hibernate-validator-archetype hibernate-validator-legacy hibernate-validator-tck-runner javax.validation validation-api 1.0.0.GA org.slf4j slf4j-api 1.5.6 org.slf4j slf4j-log4j12 1.5.6 org.testng testng 5.8 jdk15 org.apache.maven.wagon wagon-webdav 1.0-beta-2 org.apache.maven.plugins maven-jar-plugin 2.2 ${pom.artifactId} ${pom.version} ${pom.groupId} ${pom.groupId} ${pom.url} Bean Validation org.apache.maven.plugins maven-compiler-plugin 2.0.2 1.5 1.5 org.apache.maven.plugins maven-surefire-plugin always true **/*Test.java maven-source-plugin attach-sources jar maven-assembly-plugin project org.apache.maven.plugins maven-release-plugin 2.0-beta-9 clean install true true true package site assembly:assembly deploy Hudson http://hudson.qa.jboss.com/hudson/job/beanvalidation JIRA http://opensource.atlassian.com/projects/hibernate/browse/HV 2007 Apache License, Version 2.0 license.txt scm:svn:https://svn.jboss.org/repos/hibernate/validator/tags/v4_0_2_GA http://fisheye.jboss.org/browse/Hibernate/validator/tags/v4_0_2_GA repository.jboss.org file://${maven.repository.root} snapshots.jboss.org JBoss Snapshot Repository dav:https://snapshots.jboss.org/maven2 org.apache.maven.plugins maven-project-info-reports-plugin 2.0.1 maven-javadoc-plugin html todo a ToDo: javadoc org.codehaus.mojo jxr-maven-plugin maven-surefire-plugin maven-clover-plugin org.apache.maven.plugins maven-pmd-plugin 1.5 org.codehaus.mojo taglist-maven-plugin org.codehaus.mojo changelog-maven-plugin org.codehaus.mojo changes-maven-plugin maven-repo-helper-1.8.5/src/test/resources/libplexus-components-java.poms0000644000000000000000000000371212247273474023551 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 --no-parent --has-package-version plexus-archiver/pom.xml --ignore plexus-cli/pom.xml --ignore plexus-compiler/pom.xml --ignore plexus-digest/pom.xml --ignore plexus-i18n/pom.xml --ignore plexus-interactivity/pom.xml --ignore plexus-interpolation/pom.xml --ignore plexus-io/pom.xml --ignore plexus-resources/pom.xml --ignore plexus-velocity/pom.xml --ignore maven-repo-helper-1.8.5/src/test/resources/wagon-http-lightweight.cleaned0000644000000000000000000000254712247273474023467 0ustar 4.0.0 org.apache.maven.wagon wagon-http-lightweight debian jar org.apache.maven.wagon wagon-providers debian 1.0-beta-5 1.0-beta-5 libwagon-java Maven Wagon Lightweight HTTP Provider Wagon that gets and puts artifacts through http using standard Java library org.apache.maven.wagon wagon-http-shared debian commons-httpclient commons-httpclient maven-repo-helper-1.8.5/src/test/resources/plexus-utils2.cleaned0000644000000000000000000000400512247273474021611 0ustar 4.0.0 org.codehaus.plexus plexus-utils 2.x jar org.codehaus.plexus plexus 2.x org.codehaus.plexus plexus-utils jar s/2\..*/2.x/ * * 2.0.5 libplexus-utils2-java Plexus Common Utilities A collection of various utility classes to ease working with strings, files, command lines, XML and more. http://plexus.codehaus.org/plexus-utils scm:svn:http://svn.codehaus.org/plexus/plexus-utils/tags/plexus-utils-2.0.5 scm:svn:https://svn.codehaus.org/plexus/plexus-utils/tags/plexus-utils-2.0.5 http://fisheye.codehaus.org/browse/plexus/plexus-utils/tags/plexus-utils-2.0.5 JIRA http://jira.codehaus.org/browse/PLXUTILS maven-repo-helper-1.8.5/src/test/java/0000755000000000000000000000000012247273474014444 5ustar maven-repo-helper-1.8.5/src/test/java/org/0000755000000000000000000000000012247273474015233 5ustar maven-repo-helper-1.8.5/src/test/java/org/debian/0000755000000000000000000000000012247273474016455 5ustar maven-repo-helper-1.8.5/src/test/java/org/debian/maven/0000755000000000000000000000000012247273474017563 5ustar maven-repo-helper-1.8.5/src/test/java/org/debian/maven/repo/0000755000000000000000000000000012247273474020530 5ustar maven-repo-helper-1.8.5/src/test/java/org/debian/maven/repo/POMTransformerTest.java0000644000000000000000000003552612247273474025124 0ustar /* * Copyright 2009 Ludovic Claude. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.debian.maven.repo; import java.io.File; import java.io.IOException; import org.custommonkey.xmlunit.XMLUnit; import org.debian.maven.TemporaryPomFolder; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.xml.sax.SAXException; import static org.custommonkey.xmlunit.XMLAssert.assertXMLEqual; import static org.debian.maven.TemporaryPomFolder.basename; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertNull; import static org.debian.maven.repo.POMInfo.DependencyType.*; import static org.debian.maven.repo.DependencyRuleSetFiles.RulesType.*; public class POMTransformerTest { @Rule public TemporaryPomFolder tmpDir = new TemporaryPomFolder(); private POMTransformer instance; @Before public void setUp() { XMLUnit.setIgnoreWhitespace(true); instance = new POMTransformer(); } @Test public void testTransformMavenPom() throws Exception { File pom = tmpDir.usePom("maven.xml"); boolean noParent = true; instance.getRulesFiles().addDefaultRules(); instance.getRulesFiles().get(RULES).add(new DependencyRule("org.codehaus.plexus plexus-container-default jar s/1\\.0-alpha-.*/1.0-alpha/")); instance.getRulesFiles().get(RULES).add(new DependencyRule("org.apache.maven.plugins maven-assembly-plugin maven-plugin s/.*/2.2/")); instance.transformPom(pom, tmpDir.updatedPom(), noParent, true, false, false, null, null); assertCleanedXMLEqual(); } @Test public void testTransformMavenCorePom() throws Exception { File pom = tmpDir.usePom("maven-core.xml"); boolean noParent = false; instance.getRulesFiles().addDefaultRules(); instance.getRulesFiles().get(RULES).add(new DependencyRule("org.codehaus.plexus plexus-container-default jar s/1\\.0-alpha-.*/1.0-alpha/")); instance.transformPom(pom, tmpDir.updatedPom(), noParent, true, false, false, null, "maven2"); assertCleanedXMLEqual(); } @Test public void testTransformMavenJavadocPluginPom() throws Exception { XMLUnit.setIgnoreComments(true); File pom = tmpDir.usePom("maven-javadoc-plugin.xml"); boolean noParent = true; instance.getRulesFiles().addDefaultRules(); instance.getRulesFiles().get(RULES).add(new DependencyRule("org.codehaus.modello modello-maven-plugin maven-plugin s/.*/1.0.1/")); instance.getRulesFiles().get(RULES).add(new DependencyRule("org.codehaus.mojo clirr-maven-plugin * *")); instance.getRulesFiles().get(RULES).add(new DependencyRule("org.apache.bcel bcel jar s/5\\..*/5.x/")); instance.getRulesFiles().get(RULES).add(new DependencyRule("* maven-plugin-plugin maven-plugin s/.*/2.5/")); POMInfo transformedPOM = instance.transformPom(pom, tmpDir.updatedPom(), noParent, true, false, false, null, null); assertCleanedXMLEqual(); assertNull(transformedPOM.getParent()); } @Test public void testTransformModelloPom() throws Exception { File pom = tmpDir.usePom("modello-core.xml"); boolean noParent = false; instance.getRulesFiles().addDefaultRules(); instance.transformPom(pom, tmpDir.updatedPom(), noParent, true, false, false, null, "libmodello-java"); assertCleanedXMLEqual(); } @Test public void testTransformPlexusContainerDefaultPom() throws Exception { File pom = tmpDir.usePom("plexus-container-default.xml"); instance.getRulesFiles().addDefaultRules(); instance.getRulesFiles().get(RULES).add(new DependencyRule("org.codehaus.plexus plexus-container-default jar s/1\\.0-alpha-.*/1.0-alpha/")); instance.transformPom(pom, tmpDir.updatedPom()); assertCleanedXMLEqual(); } @Test public void testTransformDoxiaFmlPom() throws Exception { File pom = tmpDir.usePom("doxia-module-fml.xml"); boolean noParent = false; instance.setRepository(getRepository()); instance.getRulesFiles().addDefaultRules(); instance.transformPom(pom, tmpDir.updatedPom(), noParent, true, true, false, null, "libdoxia-java"); assertCleanedXMLEqual(); } @Test public void testTransformAntlr3Pom() throws Exception { File pom = tmpDir.usePom("antlr3.xml"); boolean noParent = false; instance.setRepository(getRepository()); instance.getRulesFiles().addDefaultRules(); instance.getRulesFiles().get(RULES).add(new DependencyRule("org.antlr stringtemplate * s/3\\..*/3.x/ *")); instance.getRulesFiles().get(RULES).add(new DependencyRule("antlr antlr jar s/2\\..*/2.x/ *")); instance.getRulesFiles().get(RULES).add(new DependencyRule("junit junit jar s/4\\..*/4.x/ *")); instance.getRulesFiles().get(RULES).add(new DependencyRule("org.antlr antlr3-maven-plugin maven-plugin s/.*/3.2/")); instance.getRulesFiles().get(RULES).add(new DependencyRule("org.antlr stringtemplate jar s/3\\..*/3.x/ *")); instance.getRulesFiles().get(IGNORE).add(new DependencyRule("org.codehaus.mojo findbugs-maven-plugin maven-plugin *")); POMInfo transformedPOM = instance.transformPom(pom, tmpDir.updatedPom(), noParent, true, true, true, null, "libantlr3-java"); assertCleanedXMLEqual(); assertEquals("3.2", transformedPOM.getParent().getVersion()); assertEquals(1, transformedPOM.getDependencies().get(DEPENDENCIES).size()); assertTrue(transformedPOM.getDependencies().get(DEPENDENCIES).contains(new Dependency("org.antlr", "stringtemplate", "jar", "3.x"))); assertEquals(1, transformedPOM.getDependencies().get(EXTENSIONS).size()); assertTrue(transformedPOM.getDependencies().get(EXTENSIONS).contains(new Dependency("org.apache.maven.wagon", "wagon-ssh-external", "jar", "debian"))); assertEquals(1, transformedPOM.getDependencies().get(PLUGINS).size()); assertTrue(transformedPOM.getDependencies().get(PLUGINS).contains(new Dependency("org.apache.maven.plugins", "maven-compiler-plugin", "maven-plugin", "2.0.2"))); } @Test public void testTransformAntlr3ParentPom() throws Exception { File pom = tmpDir.usePom("antlr3-parent.xml"); boolean noParent = false; instance.getRulesFiles().addDefaultRules(); instance.getRulesFiles().get(RULES).add(new DependencyRule("org.antlr stringtemplate * s/3\\..*/3.x/ *")); instance.getRulesFiles().get(RULES).add(new DependencyRule("antlr antlr jar s/2\\..*/2.x/ *")); instance.getRulesFiles().get(RULES).add(new DependencyRule("junit junit jar s/4\\..*/4.x/ *")); instance.getRulesFiles().get(RULES).add(new DependencyRule("org.antlr stringtemplate jar s/3\\..*/3.x/ *")); instance.getRulesFiles().get(RULES).add(new DependencyRule("org.antlr antlr3-maven-plugin maven-plugin s/.*/3.2/")); instance.getRulesFiles().get(IGNORE).add(new DependencyRule("org.codehaus.mojo findbugs-maven-plugin maven-plugin *")); instance.getRulesFiles().get(IGNORE).add(new DependencyRule("org.codehaus.mojo buildnumber-maven-plugin maven-plugin *")); instance.getRulesFiles().get(IGNORE).add(new DependencyRule("* maven-assembly-plugin maven-plugin *")); instance.getRulesFiles().get(IGNORE).add(new DependencyRule("org.apache.maven.wagon * * *")); instance.addIgnoreModule(pom, "gunit"); instance.addIgnoreModule(pom, "gunit-maven-plugin"); instance.transformPom(pom, tmpDir.updatedPom(), noParent, true, true, false, null, "libantlr3-java"); assertCleanedXMLEqual(); } @Test public void testTransformAntlr3ToolsPom() throws Exception { XMLUnit.setIgnoreComments(true); File pom = tmpDir.usePom("antlr3-tools.xml"); boolean noParent = false; instance.setRepository(getRepository()); instance.getRulesFiles().addDefaultRules(); instance.getRulesFiles().get(RULES).add(new DependencyRule("org.antlr stringtemplate * s/3\\..*/3.x/ *")); instance.getRulesFiles().get(RULES).add(new DependencyRule("antlr antlr jar s/2\\..*/2.x/ *")); instance.getRulesFiles().get(RULES).add(new DependencyRule("junit junit jar s/4\\..*/4.x/ *")); instance.getRulesFiles().get(RULES).add(new DependencyRule("org.antlr stringtemplate jar s/3\\..*/3.x/ *")); instance.getRulesFiles().get(RULES).add(new DependencyRule("org.antlr antlr3-maven-plugin maven-plugin s/.*/3.2/")); instance.usePluginVersionsFromRepository(); //instance.getRulesFiles().get(RULES).add(new DependencyRule("org.codehaus.mojo antlr-maven-plugin maven-plugin s/.*/2.1/")); instance.getRulesFiles().get(IGNORE).add(new DependencyRule("org.codehaus.mojo findbugs-maven-plugin maven-plugin *")); instance.getRulesFiles().get(IGNORE).add(new DependencyRule("org.codehaus.mojo buildnumber-maven-plugin maven-plugin *")); instance.getRulesFiles().get(IGNORE).add(new DependencyRule("* maven-assembly-plugin maven-plugin *")); instance.getRulesFiles().get(IGNORE).add(new DependencyRule("org.apache.maven.wagon * * *")); instance.addIgnoreModule(pom, "gunit"); instance.addIgnoreModule(pom, "gunit-maven-plugin"); instance.transformPom(pom, tmpDir.updatedPom(), noParent, true, true, true, null, "libantlr3-java"); assertCleanedXMLEqual(); } @Test public void testTransformHivernateValidatorTckRunnerPom() throws Exception { File pom = tmpDir.usePom("hibernate-validator-tck-runner.pom"); boolean noParent = false; instance.setRepository(getRepository()); instance.getRulesFiles().addDefaultRules(); instance.usePluginVersionsFromRepository(); instance.transformPom(pom, tmpDir.updatedPom(), noParent, true, true, true, null, "libhibernate-validator-java"); assertCleanedXMLEqual(); } @Test public void testTransformHivernateValidatorPom() throws Exception { File pom = tmpDir.usePom("hibernate-validator.pom"); boolean noParent = false; instance.setRepository(getRepository()); instance.getRulesFiles().addDefaultRules(); instance.usePluginVersionsFromRepository(); instance.transformPom(pom, tmpDir.updatedPom(), noParent, true, true, true, null, "libhibernate-validator-java"); assertCleanedXMLEqual(); } @Test public void testTransformPlexusUtils2Pom() throws Exception { File pom = tmpDir.usePom("plexus-utils2.pom"); boolean noParent = false; instance.getRulesFiles().addDefaultRules(); instance.getRulesFiles().get(RULES).add(new DependencyRule("org.codehaus.plexus plexus-utils jar s/2\\../2.x/ * *")); instance.getRulesFiles().get(RULES).add(new DependencyRule("org.codehaus.plexus plexus pom s/2\\..*/2.x/ * *")); instance.getRulesFiles().get(IGNORE).add(new DependencyRule("org.apache.maven.plugins maven-release-plugin * *")); POMInfo transformedPOM = instance.transformPom(pom, tmpDir.updatedPom(), noParent, true, true, false, null, "libplexus-utils2-java"); assertCleanedXMLEqual(); assertEquals("2.x", transformedPOM.getParent().getVersion()); } @Test public void testTransformAntlrMavenPluginPom() throws Exception { File pom = tmpDir.usePom("antlr-maven-plugin.pom"); boolean noParent = true; instance.setRepository(getRepository()); instance.getRulesFiles().addDefaultRules(); instance.usePluginVersionsFromRepository(); instance.getRulesFiles().get(RULES).add(new DependencyRule("s/org.apache.maven.shared/org.apache.maven.plugin-testing/ maven-plugin-testing * s/.*/debian/ *")); instance.getRulesFiles().get(RULES).add(new DependencyRule("s/org.apache.maven.shared/org.apache.maven.plugin-testing/ maven-plugin-testing-harness * s/.*/debian/ *")); instance.getRulesFiles().get(RULES).add(new DependencyRule("s/org.apache.maven.shared/org.apache.maven.plugin-testing/ maven-plugin-testing-tools * s/.*/debian/ *")); instance.getRulesFiles().get(RULES).add(new DependencyRule("s/org.apache.maven.shared/org.apache.maven.plugin-testing/ maven-test-tools * s/.*/debian/ *")); POMInfo transformedPom = instance.transformPom(pom, tmpDir.updatedPom(), noParent, true, true, false, null, "libantlr-maven-plugin-java"); assertCleanedXMLEqual(); assertEquals("2.3", transformedPom.getDependencies().get(PLUGIN_MANAGEMENT).get(2).getVersion()); } @Test public void testTransformMavenPackagerUtilsPom() throws Exception { File pom = tmpDir.usePom("maven-packager-utils.pom"); boolean noParent = false; instance.getRulesFiles().addDefaultRules(); instance.getRulesFiles().get(RULES).add(new DependencyRule("junit junit jar s/3\\..*/3.x/")); instance.getRulesFiles().get(RULES).add(new DependencyRule("org.codehaus.plexus plexus-container-default jar s/1\\.0-alpha-.*/1.0-alpha/")); POMInfo transformedPOM = instance.transformPom(pom, tmpDir.updatedPom(), noParent, true, true, true, null, "maven-repo-helper"); assertCleanedXMLEqual(); assertEquals("1.2", transformedPOM.getParent().getVersion()); } @Test public void testTransformPlexusComponentsPomUsingListOfPoms() throws Exception { tmpDir.usePom("libplexus-components-java.poms"); instance.setVerbose(true); instance.setRepository(getRepository()); instance.getRulesFiles().addDefaultRules(); instance.usePluginVersionsFromRepository(); ListOfPOMs listOfPoms = new ListOfPOMs(TemporaryPomFolder.getFileInClasspath("libplexus-components-java.poms")); listOfPoms.setBaseDir(TemporaryPomFolder.getFileInClasspath("plexus-components/pom.xml").getParentFile()); instance.setListOfPOMs(listOfPoms); instance.transformPoms("libplexus-components-java", false, null); assertXMLEqual(tmpDir.read("plexus-components.transformed"), tmpDir.read("plexus-components/pom.xml")); } private Repository getRepository() { Repository repo = new Repository(TemporaryPomFolder.getFileInClasspath("repository/root.dir").getParentFile()); repo.scan(); return repo; } private void assertCleanedXMLEqual() throws SAXException, IOException { assertXMLEqual(tmpDir.read(basename(tmpDir.pomInUse)+".transformed"), tmpDir.read(tmpDir.updatedPom())); } } maven-repo-helper-1.8.5/src/test/java/org/debian/maven/repo/RuleTest.java0000644000000000000000000000755112247273474023152 0ustar /* * Copyright 2009 Ludovic Claude. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.debian.maven.repo; import org.junit.Test; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; public class RuleTest { /** * Test of match method, of class Rule. */ @Test public void testMatch() { Rule simple = new Rule("test"); assertFalse(simple.match("xxx")); assertTrue(simple.match("test")); assertFalse(simple.match("test2")); Rule simpleReplace = new Rule("s/test/foo/"); assertFalse(simpleReplace.match("xxx")); assertTrue(simpleReplace.match("test")); assertFalse(simpleReplace.match("test2")); Rule complexReplace = new Rule("s/test(.*)/foo$1/"); assertFalse(complexReplace.match("xxx")); assertTrue(complexReplace.match("test")); assertTrue(complexReplace.match("test2")); Rule complexReplace2 = new Rule("s/.*/debian/"); assertTrue(complexReplace2.match("xxx")); assertTrue(complexReplace2.match("test")); assertTrue(complexReplace2.match("test2")); Rule generic = new Rule("*"); assertTrue(generic.match("xxx")); assertTrue(generic.match("test")); assertTrue(generic.match("test2")); Rule generic2 = new Rule("test*"); assertFalse(generic2.match("xxx")); assertTrue(generic2.match("test")); assertTrue(generic2.match("test2")); } /** * Test of apply method, of class Rule. */ @Test public void testApply() { Rule simple = new Rule("test"); assertEquals("test", simple.apply("test")); Rule simpleReplace = new Rule("s/test/foo/"); assertEquals("foo", simpleReplace.apply("test")); Rule complexReplace = new Rule("s/test(.*)/foo$1/"); assertEquals("foo", complexReplace.apply("test")); assertEquals("foo2", complexReplace.apply("test2")); Rule complexReplace2 = new Rule("s/.*/debian/"); assertEquals("debian", complexReplace2.apply("xxx")); assertEquals("debian", complexReplace2.apply("test")); assertEquals("debian", complexReplace2.apply("test2")); Rule generic = new Rule("*"); assertEquals("xxx", generic.apply("xxx")); assertEquals("test", generic.apply("test")); assertEquals("test2", generic.apply("test2")); Rule generic2 = new Rule("test*"); assertEquals("test", generic2.apply("test")); assertEquals("test2", generic2.apply("test2")); } /** * Test of apply method, of class Rule. */ @Test public void testIsGeneric() { Rule simple = new Rule("test"); assertFalse(simple.isGeneric()); Rule simpleWithDot = new Rule("test.stuff"); assertFalse(simpleWithDot.isGeneric()); Rule simpleReplace = new Rule("s/test/foo/"); assertFalse(simpleReplace.isGeneric()); Rule complexReplace = new Rule("s/test(.*)/foo$1/"); assertTrue(complexReplace.isGeneric()); Rule complexReplace2 = new Rule("s/.*/debian/"); assertTrue(complexReplace2.isGeneric()); Rule generic = new Rule("*"); assertTrue(generic.isGeneric()); Rule generic2 = new Rule("test*"); assertTrue(generic2.isGeneric()); } } maven-repo-helper-1.8.5/src/test/java/org/debian/maven/repo/ListOfPOMsTest.java0000644000000000000000000000773012247273474024201 0ustar /* * Copyright 2009 Ludovic Claude. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.debian.maven.repo; import java.io.File; import java.util.ArrayList; import java.util.List; import org.debian.maven.TemporaryPomFolder; import org.junit.Test; import static org.junit.Assert.*; public class ListOfPOMsTest { @Test public void testRead() { ListOfPOMs poms = new ListOfPOMs(TemporaryPomFolder.getFileInClasspath("antlr3.poms")); assertEquals(6, poms.getPomOptions().size()); assertTrue(poms.getPOMOptions("pom.xml").isNoParent()); assertFalse(poms.getPOMOptions("runtime/Java/pom.xml").isNoParent()); assertNull(poms.getPOMOptions("runtime/Java/pom.xml").getDestPackage()); assertEquals("libantlr3-gunit-java", poms.getPOMOptions("gunit/pom.xml").getDestPackage()); assertEquals("antlr3-gunit-maven-plugin", poms.getPOMOptions("gunit-maven-plugin/pom.xml").getDestPackage()); } @Test public void testGetFirstPOM() { ListOfPOMs poms = new ListOfPOMs(); assertNull("first pom", poms.getFirstPOM()); poms = new ListOfPOMs(); poms.setListOfPOMsFile(TemporaryPomFolder.getFileInClasspath("antlr3.poms")); assertEquals("pom.xml", poms.getFirstPOM()); assertEquals("pom.xml", poms.getFirstPOM()); } @Test public void testAddPom() { File pom = new File("pom.xml"); ListOfPOMs poms = new ListOfPOMs(); ListOfPOMs.POMOptions options = poms.getPOMOptions(pom); assertNull(options); poms.addPOM(pom); options = poms.getPOMOptions(pom); assertNotNull(options); } @Test public void testGetOrCreatePOMOptions() { ListOfPOMs poms = new ListOfPOMs(); ListOfPOMs.POMOptions options = poms.getOrCreatePOMOptions(new File("pom.xml")); assertNotNull(options); assertNotNull(poms.getFirstPOM()); ListOfPOMs.POMOptions options2 = poms.getOrCreatePOMOptions(new File("pom.xml")); assertTrue(options == options2); } @Test public void testContains() { File pom = new File("./pom.xml"); ListOfPOMs poms = new ListOfPOMs(); poms.addPOM(pom); assertTrue(poms.contains(pom)); } @Test public void testForeachPom() { ListOfPOMs poms = new ListOfPOMs(TemporaryPomFolder.getFileInClasspath("libplexus-components-java.poms")); final List pomFiles = new ArrayList(); final List ignoredPomFiles = new ArrayList(); poms.foreachPoms(new POMHandler() { @Override public void handlePOM(File pomFile, boolean noParent, boolean hasPackageVersion) throws Exception { pomFiles.add(pomFile); } @Override public void ignorePOM(File pomFile) throws Exception { ignoredPomFiles.add(pomFile); } }); assertFalse(pomFiles.isEmpty()); assertFalse(ignoredPomFiles.isEmpty()); } @Test public void testOptionsToString() { ListOfPOMs.POMOptions options = new ListOfPOMs.POMOptions(); options.setIgnore(true); options.setNoParent(true); assertEquals(" --ignore", options.toString()); options.setIgnore(false); options.setHasPackageVersion(true); assertEquals(" --no-parent --has-package-version", options.toString()); } } maven-repo-helper-1.8.5/src/test/java/org/debian/maven/repo/POMCleanerTest.java0000644000000000000000000004360412247273474024167 0ustar /* * Copyright 2009 Ludovic Claude. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.debian.maven.repo; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.util.Properties; import org.custommonkey.xmlunit.XMLUnit; import org.debian.maven.TemporaryPomFolder; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.xml.sax.SAXException; import static org.junit.Assert.assertEquals; import static org.custommonkey.xmlunit.XMLAssert.assertXMLEqual; import static org.debian.maven.TemporaryPomFolder.basename; import static org.debian.maven.repo.DependencyRuleSetFiles.RulesType.*; public class POMCleanerTest { @Rule public TemporaryPomFolder tmpDir = new TemporaryPomFolder(); private File pomProperties; private File specialDependencies; private POMCleaner instance; @Before public void setUp() { XMLUnit.setIgnoreWhitespace(true); instance = new POMCleaner(); } @Test public void testCleanMavenPom() throws Exception { pomProperties = tmpDir.newFile("pom.properties"); File pom = tmpDir.usePom("maven.xml"); boolean noParent = true; instance.getRulesFiles().addDefaultRules(); instance.getRulesFiles().get(RULES).add(new DependencyRule("org.codehaus.plexus plexus-container-default jar s/1\\.0-alpha-.*/1.0-alpha/")); instance.cleanPom(pom, tmpDir.updatedPom(), pomProperties, noParent, true, false, false, null, "maven2"); assertCleanedXMLEqual(); Properties pomInfo = new Properties(); pomInfo.load(new FileInputStream(pomProperties)); assertEquals("org.apache.maven", pomInfo.get("groupId")); assertEquals("maven", pomInfo.get("artifactId")); assertEquals("pom", pomInfo.get("type")); assertEquals("2.1.0-SNAPSHOT", pomInfo.get("version")); assertEquals("debian", pomInfo.get("debianVersion")); } @Test public void testCleanModelloPom() throws Exception { pomProperties = tmpDir.newFile("pom.properties"); File pom = tmpDir.usePom("modello-core.xml"); boolean noParent = false; instance.getRulesFiles().addDefaultRules(); instance.cleanPom(pom, tmpDir.updatedPom(), pomProperties, noParent, true, false, false, null, "libmodello-java"); assertCleanedXMLEqual(); Properties pomInfo = new Properties(); pomInfo.load(new FileInputStream(pomProperties)); assertEquals("org.codehaus.modello", pomInfo.get("groupId")); assertEquals("modello-core", pomInfo.get("artifactId")); assertEquals("jar", pomInfo.get("type")); assertEquals("1.0-alpha-22", pomInfo.get("version")); assertEquals("debian", pomInfo.get("debianVersion")); instance.cleanPom(pom, tmpDir.updatedPom(), pomProperties, noParent, false, true, true, null, "libmodello-java"); assertXMLEqual(tmpDir.read("modello-core.keep.cleaned"), tmpDir.read(tmpDir.updatedPom())); pomInfo = new Properties(); pomInfo.load(new FileInputStream(pomProperties)); assertEquals("org.codehaus.modello", pomInfo.get("groupId")); assertEquals("modello-core", pomInfo.get("artifactId")); assertEquals("jar", pomInfo.get("type")); assertEquals("1.0-alpha-22", pomInfo.get("version")); assertEquals("debian", pomInfo.get("debianVersion")); } @Test public void testCleanWagonPom() throws Exception { pomProperties = tmpDir.newFile("pom.properties"); File pom = tmpDir.usePom("wagon-http-lightweight.xml"); boolean noParent = false; instance.getRulesFiles().addDefaultRules(); instance.cleanPom(pom, tmpDir.updatedPom(), pomProperties, noParent, true, false, false, null, "libwagon-java"); assertCleanedXMLEqual(); Properties pomInfo = new Properties(); pomInfo.load(new FileInputStream(pomProperties)); assertEquals("org.apache.maven.wagon", pomInfo.get("groupId")); assertEquals("wagon-http-lightweight", pomInfo.get("artifactId")); assertEquals("jar", pomInfo.get("type")); assertEquals("1.0-beta-5", pomInfo.get("version")); assertEquals("debian", pomInfo.get("debianVersion")); } @Test public void testCleanPlexusContainerDefaultPom() throws Exception { pomProperties = tmpDir.newFile("pom.properties"); File pom = tmpDir.usePom("plexus-container-default.xml"); boolean noParent = true; instance.getRulesFiles().addDefaultRules(); instance.getRulesFiles().get(RULES).add(new DependencyRule("org.codehaus.plexus plexus-container-default jar s/1\\.0-alpha-.*/1.0-alpha/")); instance.cleanPom(pom, tmpDir.updatedPom(), pomProperties, noParent, true, false, false, null, "libplexus-container-default-java"); assertCleanedXMLEqual(); Properties pomInfo = new Properties(); pomInfo.load(new FileInputStream(pomProperties)); assertEquals("org.codehaus.plexus", pomInfo.get("groupId")); assertEquals("plexus-container-default", pomInfo.get("artifactId")); assertEquals("jar", pomInfo.get("type")); assertEquals("1.0-alpha-9-stable-1", pomInfo.get("version")); assertEquals("1.0-alpha", pomInfo.get("debianVersion")); } @Test public void testCleanPlexusActiveCollectionsPom() throws Exception { pomProperties = tmpDir.newFile("pom.properties"); File pom = tmpDir.usePom("plexus-active-collections.pom"); boolean noParent = true; instance.getRulesFiles().addDefaultRules(); instance.getRulesFiles().get(RULES).add(new DependencyRule("junit junit jar s/3\\..*/3.x/")); instance.getRulesFiles().get(RULES).add(new DependencyRule("org.codehaus.plexus plexus-container-default jar s/1\\.0-alpha.*/1.0-alpha/")); instance.getRulesFiles().get(RULES).add(new DependencyRule("org.codehaus.plexus plexus-maven-plugin maven-plugin s/.*/1.3.8/")); instance.cleanPom(pom, tmpDir.updatedPom(), pomProperties, noParent, true, false, false, null, "libplexus-active-collections-java"); assertCleanedXMLEqual(); Properties pomInfo = new Properties(); pomInfo.load(new FileInputStream(pomProperties)); assertEquals("org.codehaus.plexus", pomInfo.get("groupId")); assertEquals("plexus-active-collections", pomInfo.get("artifactId")); assertEquals("jar", pomInfo.get("type")); assertEquals("1.0-beta-2", pomInfo.get("version")); assertEquals("debian", pomInfo.get("debianVersion")); } @Test public void testCleanPlexusArchiverPom() throws Exception { pomProperties = tmpDir.newFile("pom.properties"); File pom = tmpDir.usePom("plexus-archiver.pom"); boolean noParent = true; instance.getRulesFiles().addDefaultRules(); instance.cleanPom(pom, tmpDir.updatedPom(), pomProperties, noParent, true, false, false, null, "libplexus-archiver-java"); assertCleanedXMLEqual(); Properties pomInfo = new Properties(); pomInfo.load(new FileInputStream(pomProperties)); assertEquals("org.codehaus.plexus", pomInfo.get("groupId")); assertEquals("plexus-archiver", pomInfo.get("artifactId")); assertEquals("jar", pomInfo.get("type")); assertEquals("1.0-alpha-12", pomInfo.get("version")); assertEquals("debian", pomInfo.get("debianVersion")); } @Test public void testCleanSlf4jPom() throws Exception { pomProperties = tmpDir.newFile("pom.properties"); File pom = tmpDir.usePom("slf4j.xml"); boolean noParent = true; instance.getRulesFiles().addDefaultRules(); instance.cleanPom(pom, tmpDir.updatedPom(), pomProperties, noParent, true, false, false, null, "libslf4j-java"); assertCleanedXMLEqual(); Properties pomInfo = new Properties(); pomInfo.load(new FileInputStream(pomProperties)); assertEquals("org.slf4j", pomInfo.get("groupId")); assertEquals("slf4j-parent", pomInfo.get("artifactId")); assertEquals("pom", pomInfo.get("type")); assertEquals("1.5.6", pomInfo.get("version")); assertEquals("debian", pomInfo.get("debianVersion")); } @Test public void testCleanCommonsValidatorPom() throws Exception { pomProperties = tmpDir.newFile("pom.properties"); File pom = tmpDir.usePom("commons-validator.xml"); boolean noParent = true; instance.getRulesFiles().addDefaultRules(); instance.getRulesFiles().get(RULES).add(new DependencyRule("junit junit jar s/3\\..*/3.x/")); instance.cleanPom(pom, tmpDir.updatedPom(), pomProperties, noParent, true, false, false, null, "libcommons-validator-java"); assertCleanedXMLEqual(); Properties pomInfo = new Properties(); pomInfo.load(new FileInputStream(pomProperties)); assertEquals("commons-validator", pomInfo.get("groupId")); assertEquals("commons-validator", pomInfo.get("artifactId")); assertEquals("jar", pomInfo.get("type")); assertEquals("1.3.1", pomInfo.get("version")); assertEquals("debian", pomInfo.get("debianVersion")); } @Test public void testCleanServletApiPom() throws Exception { pomProperties = tmpDir.newFile("pom.properties"); File pom = tmpDir.usePom("servlet-api.pom"); boolean noParent = true; instance.getRulesFiles().addDefaultRules(); instance.getRulesFiles().get(RULES).add(new DependencyRule("s/org.apache.tomcat/javax.servlet/ servlet-api jar s/.*/2.5/")); instance.cleanPom(pom, tmpDir.updatedPom(), pomProperties, noParent, true, false, false, null, "libservlet2.5-java"); assertCleanedXMLEqual(); Properties pomInfo = new Properties(); pomInfo.load(new FileInputStream(pomProperties)); assertEquals("javax.servlet", pomInfo.get("groupId")); assertEquals("servlet-api", pomInfo.get("artifactId")); assertEquals("jar", pomInfo.get("type")); assertEquals("2.5", pomInfo.get("version")); assertEquals("2.5", pomInfo.get("debianVersion")); } @Test public void testCleanHibernateValidatorParentPom() throws Exception { pomProperties = tmpDir.newFile("pom.properties"); File pom = tmpDir.usePom("hibernate-validator-parent.pom"); boolean noParent = true; instance.getRulesFiles().addDefaultRules(); instance.getRulesFiles().get(IGNORE).add(new DependencyRule("org.apache.maven.wagon wagon-webdav jar *")); instance.getRulesFiles().get(IGNORE).add(new DependencyRule("org.jboss.maven.plugins maven-jdocbook-plugin maven-plugin *")); instance.cleanPom(pom, tmpDir.updatedPom(), pomProperties, noParent, true, false, false, null, "libhibernate-validator-java"); assertCleanedXMLEqual(); Properties pomInfo = new Properties(); pomInfo.load(new FileInputStream(pomProperties)); assertEquals("org.hibernate", pomInfo.get("groupId")); assertEquals("hibernate-validator-parent", pomInfo.get("artifactId")); assertEquals("pom", pomInfo.get("type")); assertEquals("4.0.2.GA", pomInfo.get("version")); assertEquals("debian", pomInfo.get("debianVersion")); } @Test public void testCleanApacheParentPom() throws Exception { pomProperties = tmpDir.newFile("pom.properties"); File pom = tmpDir.usePom("apache.pom"); boolean noParent = true; instance.getRulesFiles().addDefaultRules(); instance.getRulesFiles().get(RULES).add(new DependencyRule("org.apache apache-jar-resource-bundle * s/1\\..*/1.x/")); instance.getRulesFiles().get(IGNORE).add(new DependencyRule("org.apache.maven.plugins maven-archetype-plugin * *")); instance.getRulesFiles().get(IGNORE).add(new DependencyRule("org.apache.maven.plugins changelog-maven-plugin * *")); instance.getRulesFiles().get(IGNORE).add(new DependencyRule("org.apache.maven.plugins maven-deploy-plugin * *")); instance.getRulesFiles().get(IGNORE).add(new DependencyRule("org.apache.maven.plugins maven-release-plugin * *")); instance.getRulesFiles().get(IGNORE).add(new DependencyRule("org.apache.maven.plugins maven-repository-plugin * *")); instance.getRulesFiles().get(IGNORE).add(new DependencyRule("org.apache.maven.plugins maven-scm-plugin * *")); instance.getRulesFiles().get(IGNORE).add(new DependencyRule("org.apache.maven.plugins maven-stage-plugin * *")); instance.getRulesFiles().get(IGNORE).add(new DependencyRule("org.apache.maven.plugins maven-eclipse-plugin * *")); instance.getRulesFiles().get(IGNORE).add(new DependencyRule("org.apache.maven.plugins maven-idea-plugin * *")); instance.getRulesFiles().get(IGNORE).add(new DependencyRule("org.apache.maven.plugins maven-source-plugin * *")); instance.addElementToKeep("build"); instance.addElementToKeep("reporting"); instance.cleanPom(pom, tmpDir.updatedPom(), pomProperties, noParent, false, false, false, null, "libmaven-parent-poms"); assertCleanedXMLEqual(); Properties pomInfo = new Properties(); pomInfo.load(new FileInputStream(pomProperties)); assertEquals("org.apache", pomInfo.get("groupId")); assertEquals("apache", pomInfo.get("artifactId")); assertEquals("pom", pomInfo.get("type")); assertEquals("7", pomInfo.get("version")); assertEquals("debian", pomInfo.get("debianVersion")); } @Test public void testCleanPlexusUtils2Pom() throws Exception { pomProperties = tmpDir.newFile("pom.properties"); File pom = tmpDir.usePom("plexus-utils2.pom"); boolean noParent = false; instance.getRulesFiles().addDefaultRules(); instance.getRulesFiles().get(RULES).add(new DependencyRule("org.codehaus.plexus plexus-utils jar s/2\\..*/2.x/ * *")); instance.getRulesFiles().get(RULES).add(new DependencyRule("org.codehaus.plexus plexus pom s/2\\..*/2.x/ * *")); instance.getRulesFiles().get(IGNORE).add(new DependencyRule("org.apache.maven.plugins maven-release-plugin * *")); instance.cleanPom(pom, tmpDir.updatedPom(), pomProperties, noParent, true, false, false, null, "libplexus-utils2-java"); assertCleanedXMLEqual(); Properties pomInfo = new Properties(); pomInfo.load(new FileInputStream(pomProperties)); assertEquals("org.codehaus.plexus", pomInfo.get("groupId")); assertEquals("plexus-utils", pomInfo.get("artifactId")); assertEquals("jar", pomInfo.get("type")); assertEquals("2.0.5", pomInfo.get("version")); assertEquals("2.x", pomInfo.get("debianVersion")); } @Test public void testCleanMojoParentPom() throws Exception { pomProperties = tmpDir.newFile("pom.properties"); File pom = tmpDir.usePom("mojo-parent.pom"); boolean noParent = false; instance.getRulesFiles().addDefaultRules(); instance.getRulesFiles().get(RULES).add(new DependencyRule("junit junit jar s/3\\..*/3.x/ * *")); instance.getRulesFiles().get(RULES).add(new DependencyRule("org.codehaus codehaus-parent pom s/.*/debian/ * *")); instance.getRulesFiles().get(RULES).add(new DependencyRule("org.codehaus.mojo mojo-parent pom s/.*/debian/ * *")); instance.getRulesFiles().get(RULES).add(new DependencyRule("org.apache.maven maven-plugin-api jar s/2\\..*/2.x/ * *")); instance.getRulesFiles().get(RULES).add(new DependencyRule("org.apache.maven.doxia doxia-module-xhtml jar s/1\\..*/1.x/ * *")); instance.getRulesFiles().get(IGNORE).add(new DependencyRule("org.apache.maven.plugins maven-checkstyle-plugin * * * *")); instance.getRulesFiles().get(IGNORE).add(new DependencyRule("org.apache.maven.plugins maven-jxr-plugin * * * *")); instance.getRulesFiles().get(IGNORE).add(new DependencyRule("org.apache.maven.plugins maven-pmd-plugin * * * *")); instance.getRulesFiles().get(IGNORE).add(new DependencyRule("org.apache.maven.wagon wagon-webdav * * * *")); instance.getRulesFiles().get(IGNORE).add(new DependencyRule("org.codehaus.mojo cobertura-maven-plugin * * * *")); instance.addElementToKeep("build"); instance.addElementToKeep("reporting"); instance.cleanPom(pom, tmpDir.updatedPom(), pomProperties, noParent, true, false, false, null, "libmojo-parent-java"); assertCleanedXMLEqual(); Properties pomInfo = new Properties(); pomInfo.load(new FileInputStream(pomProperties)); assertEquals("org.codehaus.mojo", pomInfo.get("groupId")); assertEquals("mojo-parent", pomInfo.get("artifactId")); assertEquals("pom", pomInfo.get("type")); assertEquals("27", pomInfo.get("version")); assertEquals("debian", pomInfo.get("debianVersion")); } @Test public void testMain() throws Exception { specialDependencies = tmpDir.newFile("special-cases.txt"); pomProperties = tmpDir.newFile("pom.properties"); File pom = tmpDir.usePom("maven.xml"); tmpDir.copyResource("maven.rules", specialDependencies); String[] args = {"--no-parent", "--has-package-version", "-pmaven2", "-r" + specialDependencies.getAbsolutePath(), pom.getAbsolutePath(), tmpDir.updatedPom().getAbsolutePath(), pomProperties.getAbsolutePath()}; POMCleaner.main(args); assertCleanedXMLEqual(); } private void assertCleanedXMLEqual() throws SAXException, IOException { assertXMLEqual(tmpDir.read(basename(tmpDir.pomInUse)+".cleaned"), tmpDir.read(tmpDir.updatedPom())); } }maven-repo-helper-1.8.5/src/test/java/org/debian/maven/repo/RepositoryTest.java0000644000000000000000000001251112247273474024412 0ustar /* * Copyright 2009 Ludovic Claude. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.debian.maven.repo; import javax.xml.stream.XMLStreamException; import org.debian.maven.TemporaryPomFolder; import org.debian.maven.repo.DependencyRuleSetFiles.RulesType; import org.junit.Test; import org.junit.Rule; import java.io.File; import java.io.IOException; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; public class RepositoryTest { @Rule public TemporaryPomFolder tmpDir = new TemporaryPomFolder(); @Test public void testScan() throws Exception { Repository repo = getRepository(); repo.scan(); assertEquals(25, repo.getResolvedPoms().size()); assertEquals(0, repo.getUnresolvedPoms().size()); assertEquals(0, repo.getPomsWithMissingParent().size()); assertEquals(2, repo.getPomsWithMissingVersions().size()); Dependency dependency = new Dependency("org.apache.ant", "ant-apache-bcel", "jar", "debian"); POMInfo pom = repo.getPOM(dependency); assertNotNull(pom); assertEquals(pom.getThisPom(), dependency); assertEquals(pom, repo.searchMatchingPOM(dependency)); } @Test public void testRegisterPom() throws Exception { Repository repo = getRepository(); repo.scan(); File pomFile = TemporaryPomFolder.getFileInClasspath("hibernate-validator.pom"); POMInfo pom = getAntlrPom(repo, pomFile); try { repo.registerPom(pomFile, pom); } catch (DependencyNotFoundException ignore) {} assertEquals(25, repo.getResolvedPoms().size()); assertEquals(1, repo.getUnresolvedPoms().size()); assertEquals(1, repo.getPomsWithMissingParent().size()); assertEquals(3, repo.getPomsWithMissingVersions().size()); assertEquals(pom, repo.getPOM(pom.getThisPom())); assertEquals(pom, repo.searchMatchingPOM(pom.getThisPom())); } @Test public void testSearchMatchingPOM() throws Exception { Repository repo = getRepository(); repo.scan(); Dependency antParentDep = new Dependency("org.apache.ant", "ant-parent", "pom", "1.7.1"); assertEquals(antParentDep, repo.searchMatchingPOM(antParentDep).getThisPom()); Dependency antParentDebianVersionDep = new Dependency("org.apache.ant", "ant-parent", "pom", "debian"); assertEquals(antParentDebianVersionDep, repo.searchMatchingPOM(antParentDebianVersionDep).getThisPom()); Dependency antParentDebianOtherVersionDep = new Dependency("org.apache.ant", "ant-parent", "pom", "1.8.3"); assertEquals(antParentDebianVersionDep, repo.searchMatchingPOM(antParentDebianOtherVersionDep).getThisPom()); Dependency antParentNoVersionDep = new Dependency("org.apache.ant", "ant-parent", "pom", null); assertEquals(antParentDebianVersionDep, repo.searchMatchingPOM(antParentNoVersionDep).getThisPom()); Dependency antlrToolsDep = new Dependency("org.antlr", "antlr", "jar", "3.x"); assertNull(repo.searchMatchingPOM(antlrToolsDep)); File pomFile = TemporaryPomFolder.getFileInClasspath("antlr3-tools.xml"); POMInfo pom = getAntlrPom(repo, pomFile); try { repo.registerPom(pomFile, pom); } catch (DependencyNotFoundException ignore) {} Dependency antlrPom = new Dependency("org.antlr", "antlr", "jar", "3.x"); assertEquals(antlrPom, repo.searchMatchingPOM(antlrPom).getThisPom()); Dependency antlrVersionPom = new Dependency("org.antlr", "antlr", "jar", "3.2"); assertEquals(antlrPom, repo.searchMatchingPOM(antlrVersionPom).getThisPom()); Dependency antlrOtherVersionPom = new Dependency("org.antlr", "antlr", "jar", "3.3.1"); assertEquals(antlrPom, repo.searchMatchingPOM(antlrOtherVersionPom).getThisPom()); Dependency antlrNonMatchingVersionPom = new Dependency("org.antlr", "antlr", "jar", "2.0"); assertNull(repo.searchMatchingPOM(antlrNonMatchingVersionPom)); Dependency antlrNoVersionPom = new Dependency("org.antlr", "antlr", "jar", null); assertNull(repo.searchMatchingPOM(antlrNoVersionPom)); } private POMInfo getAntlrPom(Repository repo, File pomFile) throws XMLStreamException, IOException { POMCleaner pomCleaner = new POMCleaner(); pomCleaner.getRulesFiles().addDefaultRules(); pomCleaner.getRulesFiles().get(RulesType.RULES).add(new DependencyRule("org.antlr * * s/3\\..*/3.x/")); POMInfo pom = pomCleaner.transformPom(pomFile, tmpDir.updatedPom()); return pom; } private Repository getRepository() { File baseDir = TemporaryPomFolder.getFileInClasspath("repository/root.dir"); baseDir = baseDir.getParentFile(); return new Repository(baseDir); } } maven-repo-helper-1.8.5/src/test/java/org/debian/maven/repo/DependencyRuleTest.java0000644000000000000000000000623112247273474025143 0ustar /* * Copyright 2009 Ludovic Claude. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.debian.maven.repo; import org.junit.Test; import static org.debian.maven.repo.DependencyRuleSet.*; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; public class DependencyRuleTest { /** * Test of matches method, of class DependencyRule. */ @Test public void testMatches() { DependencyRule generic = new DependencyRule(""); DependencyRule servlet23 = new DependencyRule("javax.servlet * * 2.3"); DependencyRule log4j12 = new DependencyRule("log4j log4j jar s/1\\.2\\..*/1.2.x/"); Dependency dependency = new Dependency("javax.servlet", "servlet-api", "jar", "2.3"); assertTrue(generic.matches(dependency)); assertTrue(servlet23.matches(dependency)); assertFalse(log4j12.matches(dependency)); Dependency dependencyNullVersion = new Dependency("javax.servlet", "servlet-api", "jar", null); assertTrue(generic.matches(dependencyNullVersion)); assertFalse(servlet23.matches(dependencyNullVersion)); assertFalse(log4j12.matches(dependencyNullVersion)); } /** * Test of apply method, of class DependencyRule. */ @Test public void testApply() { Dependency dependency = new Dependency("javax.servlet", "servlet-api", "jar", "2.3"); DependencyRule generic = new DependencyRule(""); DependencyRule servlet23 = new DependencyRule("javax.servlet * * 2.3"); assertEquals(new Dependency("javax.servlet", "servlet-api", "jar", "debian"), generic.apply(dependency)); assertEquals(new Dependency("javax.servlet", "servlet-api", "jar", "2.3"), servlet23.apply(dependency)); } /** * Test of compareTo method, of class DependencyRule. */ @Test public void testCompareTo() { DependencyRule generic = new DependencyRule(""); DependencyRule servlet23 = new DependencyRule("javax.servlet * * 2.3"); DependencyRule log4j12 = new DependencyRule("log4j log4j jar s/1\\.2\\..*/1.2.x/"); assertTrue(generic.compareTo(servlet23) > 0); assertTrue(generic.compareTo(log4j12) > 0); assertTrue(servlet23.compareTo(log4j12) > 0); assertTrue(servlet23.compareTo(generic) < 0); assertTrue(log4j12.compareTo(servlet23) < 0); assertEquals(0, servlet23.compareTo(servlet23)); } @Test public void testEquals() { DependencyRule mavenPlugin = new DependencyRule("* * maven-plugin * * *"); assertTrue(mavenPlugin.equals(MAVEN_PLUGINS_KEEP_VERSION_RULE)); } } maven-repo-helper-1.8.5/src/test/java/org/debian/maven/repo/POMReaderTest.java0000644000000000000000000005073212247273474024020 0ustar /* * Copyright 2009 Ludovic Claude. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.debian.maven.repo; import org.debian.maven.TemporaryPomFolder; import org.debian.maven.repo.POMReader.TreePath; import org.junit.Rule; import org.junit.Test; import static org.debian.maven.repo.POMInfo.DependencyType.*; import static org.junit.Assert.*; public class POMReaderTest { @Rule public TemporaryPomFolder tmpDir = new TemporaryPomFolder(); /** * Test of cleanPom method, of class POMReader. */ @Test public void testReadMavenPom() throws Exception { POMReader instance = new POMReader(); POMInfo info = instance.readPom(tmpDir.usePom("maven.xml")); assertNotNull(info.getParent()); assertEquals("org.apache.maven", info.getParent().getGroupId()); assertEquals("maven-parent", info.getParent().getArtifactId()); assertEquals("11", info.getParent().getVersion()); assertEquals("pom", info.getParent().getType()); assertEquals("org.apache.maven", info.getThisPom().getGroupId()); assertEquals("maven", info.getThisPom().getArtifactId()); assertEquals("2.1.0-SNAPSHOT", info.getThisPom().getVersion()); assertEquals("pom", info.getThisPom().getType()); assertEquals(1, info.getDependencies().get(DEPENDENCIES).size()); Dependency dependency = info.getDependencies().get(DEPENDENCIES).get(0); assertEquals("junit", dependency.getGroupId()); assertEquals("junit", dependency.getArtifactId()); assertEquals("3.8.1", dependency.getVersion()); assertEquals("jar", dependency.getType()); assertEquals(34, info.getDependencies().get(DEPENDENCY_MANAGEMENT_LIST).size()); dependency = info.getDependencies().get(DEPENDENCY_MANAGEMENT_LIST).get(0); assertEquals("org.apache.maven", dependency.getGroupId()); assertEquals("maven-plugin-descriptor", dependency.getArtifactId()); assertEquals("2.1.0-SNAPSHOT", dependency.getVersion()); assertEquals("jar", dependency.getType()); assertEquals(0, info.getDependencies().get(PROFILE_DEPENDENCIES).size()); assertEquals(0, info.getDependencies().get(PROFILE_DEPENDENCY_MANAGEMENT_LIST).size()); assertEquals(14, info.getDependencies().get(PLUGIN_MANAGEMENT).size()); dependency = info.getDependencies().get(PLUGIN_MANAGEMENT).get(0); assertEquals("org.apache.maven.plugins", dependency.getGroupId()); assertEquals("maven-jar-plugin", dependency.getArtifactId()); assertEquals("2.1", dependency.getVersion()); assertEquals("maven-plugin", dependency.getType()); assertEquals(0, info.getDependencies().get(PLUGINS).size()); assertEquals(0, info.getDependencies().get(REPORTING_PLUGINS).size()); assertEquals(2, info.getDependencies().get(PROFILE_PLUGINS).size()); dependency = info.getDependencies().get(PROFILE_PLUGINS).get(0); assertEquals("org.codehaus.mojo", dependency.getGroupId()); assertEquals("clirr-maven-plugin", dependency.getArtifactId()); assertEquals(null, dependency.getVersion()); assertEquals("maven-plugin", dependency.getType()); assertEquals(4, info.getDependencies().get(PROFILE_REPORTING_PLUGINS).size()); assertEquals(2, info.getProperties().size()); assertEquals("2.1.0-SNAPSHOT", info.getProperties().get("mavenVersion")); assertEquals("1.0-beta-5", info.getProperties().get("wagonVersion")); assertNotNull(info.getModules()); assertTrue(info.getModules().contains("maven-artifact")); assertTrue(info.getModules().contains("maven-core")); } @Test public void testReadHibernateValidatorTckRunner() throws Exception { POMReader instance = new POMReader(); POMInfo info = instance.readPom(tmpDir.usePom("hibernate-validator-tck-runner.pom")); assertNotNull(info.getParent()); assertEquals("org.hibernate", info.getParent().getGroupId()); assertEquals("hibernate-validator-parent", info.getParent().getArtifactId()); assertEquals("4.0.2.GA", info.getParent().getVersion()); assertEquals("pom", info.getParent().getType()); assertEquals("org.hibernate", info.getThisPom().getGroupId()); assertEquals("hibernate-validator-tck-runner", info.getThisPom().getArtifactId()); assertEquals("4.0.2.GA", info.getThisPom().getVersion()); assertEquals("jar", info.getThisPom().getType()); assertEquals(6, info.getDependencies().get(DEPENDENCIES).size()); Dependency dependency = info.getDependencies().get(DEPENDENCIES).get(5); assertEquals("org.jboss.test-harness", dependency.getGroupId()); assertEquals("jboss-test-harness-jboss-as-51", dependency.getArtifactId()); assertEquals("1.0.0", dependency.getVersion()); assertEquals("jar", dependency.getType()); assertEquals(0, info.getDependencies().get(DEPENDENCY_MANAGEMENT_LIST).size()); assertEquals(0, info.getDependencies().get(PROFILE_DEPENDENCIES).size()); assertEquals(0, info.getDependencies().get(PROFILE_DEPENDENCY_MANAGEMENT_LIST).size()); assertEquals(0, info.getDependencies().get(PLUGIN_MANAGEMENT).size()); assertEquals(3, info.getDependencies().get(PLUGINS).size()); dependency = info.getDependencies().get(PLUGINS).get(1); assertEquals("org.apache.maven.plugins", dependency.getGroupId()); assertEquals("maven-surefire-plugin", dependency.getArtifactId()); assertEquals(null, dependency.getVersion()); assertEquals("maven-plugin", dependency.getType()); assertEquals(2, info.getDependencies().get(PROFILE_PLUGINS).size()); assertEquals(3, info.getProperties().size()); assertEquals("/opt/java/jboss-5.1.0.GA", info.getProperties().get("jboss.home")); assertEquals("org.hibernate.validator.HibernateValidator", info.getProperties().get("validation.provider")); assertEquals("true", info.getProperties().get("remote.debug")); assertEquals(0, info.getModules().size()); } @Test public void testReadHibernateValidator() throws Exception { POMReader instance = new POMReader(); POMInfo info = instance.readPom(tmpDir.usePom("hibernate-validator.pom")); assertNotNull(info.getParent()); assertEquals("org.hibernate", info.getParent().getGroupId()); assertEquals("hibernate-validator-parent", info.getParent().getArtifactId()); assertEquals("4.0.2.GA", info.getParent().getVersion()); assertEquals("pom", info.getParent().getType()); assertEquals("org.hibernate", info.getThisPom().getGroupId()); assertEquals("hibernate-validator", info.getThisPom().getArtifactId()); assertEquals("4.0.2.GA", info.getThisPom().getVersion()); assertEquals("jar", info.getThisPom().getType()); assertEquals(6, info.getDependencies().get(DEPENDENCIES).size()); Dependency dependency = info.getDependencies().get(DEPENDENCIES).get(0); assertEquals("javax.validation", dependency.getGroupId()); assertEquals("validation-api", dependency.getArtifactId()); assertEquals(null, dependency.getVersion()); assertEquals("jar", dependency.getType()); assertEquals("runtime", dependency.getScope()); assertEquals(false, dependency.isOptional()); dependency = info.getDependencies().get(DEPENDENCIES).get(1); assertEquals("org.slf4j", dependency.getGroupId()); assertEquals("slf4j-api", dependency.getArtifactId()); assertEquals(null, dependency.getVersion()); assertEquals("jar", dependency.getType()); assertEquals("runtime", dependency.getScope()); assertEquals(false, dependency.isOptional()); dependency = info.getDependencies().get(DEPENDENCIES).get(2); assertEquals("com.googlecode.jtype", dependency.getGroupId()); assertEquals("jtype", dependency.getArtifactId()); assertEquals("0.1.0", dependency.getVersion()); assertEquals("jar", dependency.getType()); assertEquals("runtime", dependency.getScope()); assertEquals(false, dependency.isOptional()); dependency = info.getDependencies().get(DEPENDENCIES).get(3); assertEquals("org.slf4j", dependency.getGroupId()); assertEquals("slf4j-log4j12", dependency.getArtifactId()); assertEquals(null, dependency.getVersion()); assertEquals("jar", dependency.getType()); assertEquals("runtime", dependency.getScope()); assertEquals(true, dependency.isOptional()); dependency = info.getDependencies().get(DEPENDENCIES).get(4); assertEquals("org.hibernate.java-persistence", dependency.getGroupId()); assertEquals("jpa-api", dependency.getArtifactId()); assertEquals("2.0.Beta-20090815", dependency.getVersion()); assertEquals("jar", dependency.getType()); assertEquals("runtime", dependency.getScope()); assertEquals(true, dependency.isOptional()); dependency = info.getDependencies().get(DEPENDENCIES).get(5); assertEquals("org.testng", dependency.getGroupId()); assertEquals("testng", dependency.getArtifactId()); assertEquals(null, dependency.getVersion()); assertEquals("jar", dependency.getType()); assertEquals("test", dependency.getScope()); assertEquals(false, dependency.isOptional()); assertEquals("jdk15", dependency.getClassifier()); assertEquals(0, info.getDependencies().get(DEPENDENCY_MANAGEMENT_LIST).size()); assertEquals(2, info.getDependencies().get(PROFILE_DEPENDENCIES).size()); assertEquals(0, info.getDependencies().get(PROFILE_DEPENDENCY_MANAGEMENT_LIST).size()); assertEquals(0, info.getDependencies().get(PLUGIN_MANAGEMENT).size()); assertEquals(1, info.getDependencies().get(REPORTING_PLUGINS).size()); dependency = info.getDependencies().get(REPORTING_PLUGINS).get(0); assertEquals("org.apache.maven.plugins", dependency.getGroupId()); assertEquals("maven-project-info-reports-plugin", dependency.getArtifactId()); assertEquals("2.0.1", dependency.getVersion()); assertEquals("maven-plugin", dependency.getType()); assertEquals(9, info.getDependencies().get(PLUGINS).size()); dependency = info.getDependencies().get(PLUGINS).get(0); assertEquals("org.apache.maven.plugins", dependency.getGroupId()); assertEquals("maven-source-plugin", dependency.getArtifactId()); assertEquals(null, dependency.getVersion()); assertEquals("maven-plugin", dependency.getType()); dependency = info.getDependencies().get(PLUGINS).get(1); assertEquals("org.codehaus.mojo", dependency.getGroupId()); assertEquals("jaxb2-maven-plugin", dependency.getArtifactId()); assertEquals(null, dependency.getVersion()); assertEquals("maven-plugin", dependency.getType()); dependency = info.getDependencies().get(PLUGINS).get(2); assertEquals("org.apache.maven.plugins", dependency.getGroupId()); assertEquals("maven-surefire-plugin", dependency.getArtifactId()); assertEquals(null, dependency.getVersion()); assertEquals("maven-plugin", dependency.getType()); dependency = info.getDependencies().get(PLUGINS).get(3); assertEquals("org.apache.maven.plugins", dependency.getGroupId()); assertEquals("maven-surefire-report-plugin", dependency.getArtifactId()); assertEquals(null, dependency.getVersion()); assertEquals("maven-plugin", dependency.getType()); dependency = info.getDependencies().get(PLUGINS).get(4); assertEquals("org.apache.maven.plugins", dependency.getGroupId()); assertEquals("maven-shade-plugin", dependency.getArtifactId()); assertEquals(null, dependency.getVersion()); assertEquals("maven-plugin", dependency.getType()); dependency = info.getDependencies().get(PLUGINS).get(5); assertEquals("org.jboss.maven.plugins", dependency.getGroupId()); assertEquals("maven-jdocbook-plugin", dependency.getArtifactId()); assertEquals("2.2.0", dependency.getVersion()); assertEquals("maven-plugin", dependency.getType()); dependency = info.getDependencies().get(PLUGINS).get(6); assertEquals("org.jboss.maven.plugins", dependency.getGroupId()); assertEquals("maven-jdocbook-style-plugin", dependency.getArtifactId()); assertEquals("2.0.0", dependency.getVersion()); assertEquals("maven-plugin", dependency.getType()); dependency = info.getDependencies().get(PLUGINS).get(7); assertEquals("org.apache.maven.plugins", dependency.getGroupId()); assertEquals("maven-assembly-plugin", dependency.getArtifactId()); assertEquals(null, dependency.getVersion()); assertEquals("maven-plugin", dependency.getType()); dependency = info.getDependencies().get(PLUGINS).get(8); assertEquals("org.twdata.maven", dependency.getGroupId()); assertEquals("maven-cli-plugin", dependency.getArtifactId()); assertEquals("0.6.3.CR3", dependency.getVersion()); assertEquals("maven-plugin", dependency.getType()); assertEquals(0, info.getDependencies().get(PROFILE_PLUGINS).size()); assertEquals(1, info.getDependencies().get(PLUGIN_DEPENDENCIES).size()); dependency = info.getDependencies().get(PLUGIN_DEPENDENCIES).get(0); assertEquals("org.hibernate", dependency.getGroupId()); assertEquals("hibernate-jdocbook-style", dependency.getArtifactId()); assertEquals("2.0.0", dependency.getVersion()); assertEquals("jdocbook-style", dependency.getType()); assertEquals(0, info.getProperties().size()); assertEquals(0, info.getModules().size()); } @Test public void testReadMojoParent() throws Exception { POMReader instance = new POMReader(); POMInfo info = instance.readPom(tmpDir.usePom("mojo-parent.pom")); assertNotNull(info.getParent()); assertEquals("org.codehaus", info.getParent().getGroupId()); assertEquals("codehaus-parent", info.getParent().getArtifactId()); assertEquals("3", info.getParent().getVersion()); assertEquals("pom", info.getParent().getType()); assertEquals("org.codehaus.mojo", info.getThisPom().getGroupId()); assertEquals("mojo-parent", info.getThisPom().getArtifactId()); assertEquals("27", info.getThisPom().getVersion()); assertEquals("pom", info.getThisPom().getType()); assertEquals(0, info.getDependencies().get(DEPENDENCIES).size()); assertEquals(2, info.getDependencies().get(DEPENDENCY_MANAGEMENT_LIST).size()); Dependency dependency = info.getDependencies().get(DEPENDENCY_MANAGEMENT_LIST).get(0); assertEquals("org.apache.maven", dependency.getGroupId()); assertEquals("maven-plugin-api", dependency.getArtifactId()); assertEquals("2.0", dependency.getVersion()); assertEquals("jar", dependency.getType()); assertEquals(1, info.getDependencies().get(EXTENSIONS).size()); assertEquals(24, info.getDependencies().get(PLUGIN_MANAGEMENT).size()); dependency = info.getDependencies().get(PLUGIN_MANAGEMENT).get(17); assertEquals("org.apache.maven.plugins", dependency.getGroupId()); assertEquals("maven-site-plugin", dependency.getArtifactId()); assertEquals("2.1.1", dependency.getVersion()); assertEquals("maven-plugin", dependency.getType()); dependency = info.getDependencies().get(PLUGIN_MANAGEMENT).get(18); assertEquals("org.apache.maven.plugins", dependency.getGroupId()); assertEquals("maven-source-plugin", dependency.getArtifactId()); assertEquals("2.1.2", dependency.getVersion()); assertEquals("maven-plugin", dependency.getType()); assertEquals(1, info.getDependencies().get(PLUGIN_MANAGEMENT_DEPENDENCIES).size()); dependency = info.getDependencies().get(PLUGIN_MANAGEMENT_DEPENDENCIES).get(0); assertEquals("org.apache.maven.doxia", dependency.getGroupId()); assertEquals("doxia-module-xhtml", dependency.getArtifactId()); assertEquals("1.1.3", dependency.getVersion()); assertEquals("jar", dependency.getType()); assertEquals(2, info.getDependencies().get(PLUGINS).size()); dependency = info.getDependencies().get(PLUGINS).get(1); assertEquals("org.codehaus.mojo", dependency.getGroupId()); assertEquals("cobertura-maven-plugin", dependency.getArtifactId()); assertEquals(null, dependency.getVersion()); assertEquals("maven-plugin", dependency.getType()); assertEquals(2, info.getDependencies().get(REPORTING_PLUGINS).size()); dependency = info.getDependencies().get(REPORTING_PLUGINS).get(1); assertEquals("org.apache.maven.plugins", dependency.getGroupId()); assertEquals("maven-project-info-reports-plugin", dependency.getArtifactId()); assertEquals("2.2", dependency.getVersion()); assertEquals("maven-plugin", dependency.getType()); assertEquals(6, info.getDependencies().get(PROFILE_PLUGINS).size()); assertEquals(8, info.getDependencies().get(PROFILE_REPORTING_PLUGINS).size()); assertEquals(1, info.getDependencies().get(PROFILE_PLUGIN_MANAGEMENT).size()); assertEquals(0, info.getDependencies().get(PROFILE_DEPENDENCIES).size()); assertEquals(0, info.getDependencies().get(PROFILE_DEPENDENCY_MANAGEMENT_LIST).size()); assertEquals(5, info.getProperties().size()); assertEquals("UTF-8", info.getProperties().get("project.build.sourceEncoding")); assertEquals("UTF-8", info.getProperties().get("project.reporting.outputEncoding")); assertEquals("1.4", info.getProperties().get("mojo.java.target")); assertEquals("true", info.getProperties().get("surefire.redirectTestOutputToFile")); assertEquals("true", info.getProperties().get("netbeans.checkstyle.format")); assertEquals(0, info.getModules().size()); } @Test public void testReadClojurePom() throws Exception { POMReader instance = new POMReader(); POMInfo info = instance.readPom(tmpDir.usePom("repository/org/clojure/clojure/1.2.1/clojure-1.2.1.pom")); assertNotNull("null pom", info.getThisPom()); assertEquals("groupId", "org.clojure", info.getThisPom().getGroupId()); assertEquals("artifactId", "clojure", info.getThisPom().getArtifactId()); assertEquals("version", "1.2.1", info.getThisPom().getVersion()); assertEquals("type", "jar", info.getThisPom().getType()); assertEquals("debian.mavenRules", "* clojure * s/([0-9]+)\\.([0-9]+).*/$1.$2.x/ * *", info.getProperties().get("debian.mavenRules")); } @Test public void testReadBndPom() throws Exception { POMReader instance = new POMReader(); POMInfo info = instance.readPom(tmpDir.usePom("bndlib.pom")); assertNotNull("null pom", info.getThisPom()); assertEquals("groupId", "biz.aQute", info.getThisPom().getGroupId()); assertEquals("artifactId", "bndlib", info.getThisPom().getArtifactId()); assertEquals("version", "1.43.0", info.getThisPom().getVersion()); } @Test public void testTreePathMatches() { TreePath path = new TreePath(); path.add("a"); path.add("b"); path.add("c"); path.add("d"); assertTrue(path.matches("a/b/c/d")); assertTrue(path.matches("b/c/d")); assertTrue(path.matches("c/d")); assertTrue(path.matches("d")); assertTrue(path.matches("*/b/c/d")); assertTrue(path.matches("a/*/c/d")); assertTrue(path.matches("a/b/*/d")); assertTrue(path.matches("a/b/c/*")); assertTrue(path.matches("/*/b/c/d")); assertTrue(path.matches("/a/*/c/d")); assertTrue(path.matches("/a/b/*/d")); assertTrue(path.matches("/a/b/c/*")); assertFalse(path.matches("/b/c/d")); assertFalse(path.matches("/c/d")); assertFalse(path.matches("/d")); } } maven-repo-helper-1.8.5/src/test/java/org/debian/maven/TemporaryPomFolder.java0000644000000000000000000000501612247273474024222 0ustar package org.debian.maven; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.Reader; import java.net.URISyntaxException; import java.net.URL; import java.util.ArrayList; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; import org.apache.commons.io.IOUtils; import org.junit.rules.TemporaryFolder; public class TemporaryPomFolder extends TemporaryFolder { private List openedReaders = new ArrayList(); private File updatedPom; public String pomInUse; public File copyResource(String resource, File file) throws IOException { final FileWriter out = new FileWriter(file); final Reader in = read(resource); IOUtils.copy(in, out); in.close(); out.close(); return file; } public File usePom(String resource) throws IOException { pomInUse = resource; File pom = newFile("original.pom"); return copyResource(resource, pom); } public Reader read(String resource) { Reader r = new InputStreamReader(this.getClass().getResourceAsStream("/" + resource)); openedReaders.add(r); return r; } public File updatedPom() throws IOException { if (updatedPom == null) { updatedPom = newFile("updated.pom"); } return updatedPom; } public Reader read(File f) throws FileNotFoundException { Reader r = new FileReader(f); openedReaders.add(r); return r; } @Override protected void after() { for (Reader reader : openedReaders) { try { reader.close(); } catch (IOException ex) { Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, null, ex); } } openedReaders.clear(); updatedPom = null; super.after(); } public static File getFileInClasspath(String resource) { if (!resource.startsWith("/")) { resource = "/" + resource; } URL url = TemporaryPomFolder.class.getResource(resource); File f; try { f = new File(url.toURI()); } catch (URISyntaxException e) { f = new File(url.getPath()); } return f; } public static String basename(String fileName) { String[] tokens = fileName.split("\\.(?=[^\\.]+$)"); return tokens[0]; } } maven-repo-helper-1.8.5/src/test/java/org/debian/maven/cliargs/0000755000000000000000000000000012247273474021207 5ustar maven-repo-helper-1.8.5/src/test/java/org/debian/maven/cliargs/ArgumentsMapTest.java0000644000000000000000000000250412247273474025316 0ustar package org.debian.maven.cliargs; import static org.junit.Assert.*; import org.junit.Test; public class ArgumentsMapTest { @Test public void testComplex() { ArgumentsMap argsMap = args("-a -b -thallo --multiple=arg1 --multiple=arg2 --hallo=world --print and even more"); assertTrue(argsMap.getBoolean(null, "a")); assertTrue(argsMap.getBoolean(null, "b")); assertTrue(argsMap.getBoolean("print", null)); assertFalse(argsMap.getBoolean(null, "c")); assertFalse(argsMap.getBoolean("notthere", null)); assertEquals("world", argsMap.getValueLong("hallo", null)); assertEquals("even", argsMap.getArguments().get(1)); assertEquals("hallo", argsMap.getValue(null, "t", null)); assertEquals("default", argsMap.getValue("notthere", null, "default")); assertEquals("arg1", argsMap.getValueList("multiple", null).get(0)); assertEquals("arg2", argsMap.getValueList("multiple", null).get(1)); } @Test public void testEmpty() { ArgumentsMap argsMap = args(" "); assertTrue(argsMap.getArguments().isEmpty()); assertFalse(argsMap.getBoolean(" ", " ")); } public static ArgumentsMap args(String args) { String [] argsArray = args.split(" "); return ArgumentsMap.fromArgs(argsArray); } } maven-repo-helper-1.8.5/src/test/java/org/debian/maven/cliargs/ArgumentTest.java0000644000000000000000000000262212247273474024476 0ustar package org.debian.maven.cliargs; import static org.junit.Assert.*; import org.debian.maven.cliargs.Argument.Type; import org.junit.Test; public class ArgumentTest { @Test public void test() { parse("-t", "t", null, Type.SHORT); parse("--template", "template", null, Type.LONG); parse("argum", null, "argum", Type.ARG); // test trimming left parse(" -t", "t", null, Type.SHORT); parse(" --template", "template", null, Type.LONG); parse(" argum", null, "argum", Type.ARG); // test trimming right parse("-t ", "t", null, Type.SHORT); parse("--template ", "template", null, Type.LONG); parse("argum ", null, "argum", Type.ARG); // test option parameters parse("-thallo", "t", "hallo", Type.SHORT); parse("--template=hi", "template", "hi", Type.LONG); // test option parameters and trimming parse(" -thallo ", "t", "hallo", Type.SHORT); parse(" --template=hi ", "template", "hi", Type.LONG); } private void parse(String input, String name, String value, Type type) { Argument argument = new Argument(input); assertEquals("name does not match "+input, name, argument.name); assertEquals("value does not match "+input, value, argument.value); assertEquals("type does not match "+input, type.toString(), argument.type.toString()); } } maven-repo-helper-1.8.5/TODO0000644000000000000000000000037712247273474012454 0ustar * TODO add Coordinate class containing groupid, artifact name, version, classifier and use it as part of the Dependency class? * use an enum for Dependency type * #651901: mh_install should support creating additional links (at least one) for a jar maven-repo-helper-1.8.5/doc/0000755000000000000000000000000012247273474012522 5ustar maven-repo-helper-1.8.5/doc/repository.rst0000644000000000000000000005243112247273474015500 0ustar `repository specification `_ \| `reference `_ \| `tutorial `_ Maven Repository Specification ============================== This page specifies how to install Java libraries in Maven compatible way which makes it possible to use Maven for Debian packaging. This specification is intended to be - as short as possible, - easy to understand, - easy to use, and - compatible with the Debian Java policy. Status ------ The specification is in use and implemented by maven-repo-helper and maven-debian-helper packages. Motivation: advantages of using Maven ------------------------------------- Maven has advantages for the upstream developers that won't be repeated here. That is the reason why more and more projects are switching to Maven as their primary build tool. Detailed information about maven can be found at `Maven's homepage `_ and in the book `Maven: The Definitive Guide `_. Maven maintains a model of a project in a file **pom.xml**: the developer can assign attributes to a project such as: - name - description - URL - information about developers and contributors - license - mailing lists - issue tracker - source code management (like subversion) - dependencies Most of those attributes can directly be used for Debian packaging but the most interesting ones are the dependencies. Imagine a project 'a' that depends on 2 other projects 'b' and 'c' where 'b' itself depends on 'd', 'e', 'f' and 'c' depends on 'f', 'g', 'h'. :: a ---> b ---> d | | | |-> e | | | -> f | -> c ---> f | |-> g | -> h In a later upstream version 'c' adds another depends 'i' and that means that we have to change all reverse depends of 'c' including 'a' (like adding **i.jar** to **DEB\_JARS** in **debian/rules**). But Maven will do this automatically for us and we do not have to touch reverse depends of any package when the dependencies change. Problems with upstream's repository (central) --------------------------------------------- There is one central repository for Maven artifacts at http://repo2.maven.org/maven2/ that ships '''all''' releases of an artifact. The artifact log4j:log4j has 12 different versions at http://repo2.maven.org/maven2/log4j/log4j/ and maven downloads one of them during building a package that declares log4j:log4j as a dependency. Sometimes it is difficult to predict which version gets downloaded by maven and that is why it is hard to use maven in offline mode but for building Debian packages the offline mode is essential. All dependencies must be available as Debian packages and it is not acceptable to download artifacts during the build process from the central Maven repository. The package maven-repo-helper tries to solve this problem by providing a local repository below the following directory: :: REPO=/usr/share/maven-repo We will reference this location as **$REPO** in the specification. In Maven Central repository, there is one policy which mandates that projects upload a cleaned version of their POM files (see `http://maven.apache.org/guides/mini/guide-central-repository-upload.html `_). In particular, the tag in a POM files should be removed, as well as or tags as all dependencies should be already in Central. We will use similar rules for the Debian repository. Versions in Maven POM files and smooth updates of Debian packages ----------------------------------------------------------------- The Maven repository should support smooth upgrades of Java libraries. When a new version of a library is installed in a Debian system, this is what should happend: 1. Files in **:math:`REPO/`\ GROUPID/:math:`ARTIFACTID/`\ OLD\_VERSION/** are deleted 2. The new POM file and link to the jar are installed under **:math:`REPO/`\ GROUPID/:math:`ARTIFACTID/`\ NEW\_VERSION/** 3. Other POMs which have a dependency on **:math:`GROUPID:`\ ARTIFACTID::math:`OLD\_VERSION__ should see their dependencies updated to __`\ GROUPID::math:`ARTIFACTID:`\ NEW\_VERSION** Steps 1. and 2. are simple file operations, but 3. implies that dpkg should somehow parse all POM files installed under $REPO, and update the dependency version where necessary. This would imply changing files outside of the package affected by the update, and those files may belong to other packages. This is difficult and against the Debian guidelines. We are using a solution which keeps the amount of effort to a minimum, keeps $REPO consistent and useable at all times and works well with Maven. The idea is to maintain 2 versions of each artifact under the Maven repository. The first version uses the native version from Maven, to keep compatibility. The second version is more interesting: its version is converted to a Debian managed version, usually 'debian', but it could be '1.x' to represent any version compatible with the version 1 of the API. The Maven repository will look like this: :: /usr/share/java/ commons-beanutils-1.8.0.jar commons-beanutils.jar -> commons-beanutils-1.8.0.jar junit-3.8.2.jar junit.jar -> junit-3.8.2.jar /usr/share/maven-repo/ commons-beanutils/commons-beanutils/1.8.0/ commons-beanutils-1.8.0.jar -> ../../../../java/commons-beanutils-1.8.0.jar commons-beanutils-1.8.0.pom commons-beanutils/commons-beanutils/debian/ commons-beanutils-debian.jar -> ../../../../java/commons-beanutils-1.8.0.jar commons-beanutils-debian.pom junit/junit/3.8.2/ junit-3.8.2.jar -> ../../../../java/junit-3.8.2.jar junit-3.8.2.pom junit/junit/3.x/ junit-3.x.jar -> ../../../../java/junit-3.8.2.jar junit-3.x.pom The jar for each package (here libcommons-beanutils-java and junit) are installed in /usr/share/java to comply with the Debian Java policy, then we create symlinks to those jars in the places where we need them. So we have a link for the jar under the current version folder in /usr/share/maven-repo, and there is a link to the jar under the Debian version in the Maven repository. Upgrading the jar is now a simple matter of deleting the jars, symlinks and folders used by the old version, creating the jars, symlinks and folders for the new version, and updating the symlinks for the versionless links in /usr/share/java (commons-beanutils.jar, junit.jar) and updating the symlinks for the Debian versioned symlinks (/usr/share/maven-repo/commons-beanutils/commons-beanutils/debian/commons-beanutils-debian.jar and /usr/share/maven-repo/junit/junit/3.x/junit-3.x.jar). Don't worry, the scripts provided by maven-repo-helper will do this for you. This layout makes it easy to upgrade libraries independenly of each others, it keeps some compatibility with the Maven central repository so that you can mix and match Debian-controlled parts of the repository with downloads from the Internet if you wish. Now the real trick is in how dependencies are versioned in each POM: we replace all native versions with Debian versions. This is the (simplified) content of commons-beanutils-1.8.0.pom: :: 4.0.0 commons-beanutils commons-beanutils 1.8.0 jar commons-logging commons-logging debian commons-collections commons-collections 3.x true commons-collections commons-collections-testframework debian test junit junit 3.x test commons-beanutils-debian.pom has the same content, except that is now 'debian': :: 4.0.0 commons-beanutils commons-beanutils debian jar commons-logging commons-logging debian commons-collections commons-collections 3.x true commons-collections commons-collections-testframework debian test junit junit 3.x test Note that all dependencies have also their versions replaced with the symbolic versions from Debian. For example, there is a dependency on version 3.x of junit. 3.x is a symbolic version for junit that we have defined earlier. If we need to update junit to a new version, let's suppose that the version 3.8.3 comes out, then junit 3.8.2 will be removed from the Maven repository and replaced by junit 3.8.3. But junit 3.x will not be affected by the change, except that the target for the symlink of junit-3.x.jar will now point to junit-3.8.3.jar. More importantly, the POM file for junit 3.x will not change, which means that we can keep pointing to it from other packages, like in this case libcommons-beanutils-java. Alternatives ------------ - JPackage The documentation of JPackage can be found at http://www.jpackage.org/cgi-bin/viewvc.cgi/src/jpackage-utils/doc/jpackage-1.5-policy.xhtml?root=jpackage&view=co. There is no information there on how to use maven. JPackage uses a patched Maven that understands the package layout in /usr/share/java. As a maintainer you have to learn the toolset - and that is why JPackage fails the 'easy to use' requirement. JPackage cheats on version numbers - whenever a pom requests a specific version like 1.2.3 its Maven just delivers what is has in /usr/share/java without considering the requested version all. They obviously did not solved the problem of having multiple versions of an artifact installed at the same time but we have various versions of asm, commons-collections, junit, and more in Debian and we must have a solution for that. - Version ranges Maven supports version ranges - see the `version ranges specification `_. We could use replace strict versions in dependencies by version ranges, to allow smooth upgrades when a library is updated. For example, in the commons-beanutils POM we could replace the version for the junit dependency by a version range: :: junit junit [3.8.2,4.0) test With this new POM definition, we could easily update junit from version 3.8.2 to version 3.8.3 without breaking commons-beanutils. That's a neet solution, unfortunately Maven 2 had quite a few issues with version ranges. To enable a reliable resolution of versions with version ranges, we need first to enforce a reliable numbering scheme for Java libraries. Some Java libraries in Debian have some really strange version schemes, some use for example dates, others -ALPHA, -BETA, -RC suffixes, others not. It looks like Maven 3.1 will adopt OSGi numering scheme, but nothing is written in stone at the moment. When things will have settled, we will probably update the Maven repository for Debian to use version ranges instead of symbolic versions. Targets ======= The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [[http://www.ietf.org/rfc/rfc2119.txt\|RFC 2119]]. This specification is targeted at the following types of packages: 1. Packages that use Maven for building SHALL install their artifacts into **$REPO**. Those packages SHOULD use maven-repo-helper or maven-debian-helper which will do most of the work automatically. 2. Packages that don't use Maven (yet) but their upstream developers are using Maven: they SHALL install their artifacts into **$REPO** after making sure they follow the specification. Patching of the pom.xml files might be necessary. Maven-repo-helper or maven-debian-helper MAY be used to check the conformance to the spec. 3. Package where the upstream developers don't use Maven but pom.xml are provided for Maven users: the artifacts SHOULD be installed into **$REPO** after making sure they follow the specification. Patching of the pom.xml files might be necessary. Maven-repo-helper MAY be used to check the conformance to the spec. 4. All other packages: pom.xml files from other sources (central, mvnrepository.com or hand written) MAY be installed into **$REPO** after making sure the artifacts follow the specification. Patching of the pom.xml files might be necessary. Maven-repo-helper MAY be used to check the conformance to the spec. For packages that are used very often by Maven based packages (example: junit) the MAY or SHOULD used above SHOULD be upgraded to a SHALL. Specification ============= Artifacts MUST be installed into **:math:`REPO/`\ GROUPID/:math:`ARTIFACTID/`\ VERSION/** where $GROUPID is the result of **groupId.replace( '.', '/' )** and :math:`VERSION is the current version of the artifact. The pom.xml files MUST be installed as __`\ ARTIFACTID-:math:`VERSION.pom__ and the symlink to the jar file as __`\ ARTIFACTID-:math:`VERSION.jar__. Following the Debian Java policy, the jar file itself SHOULD be installed as __`\ ARTIFACTID.jar\_\_ into **/usr/share/java/**, but the name of the jar MAY be different. Artifacts SHOULD also be installed into **:math:`REPO/`\ GROUPID/:math:`ARTIFACTID/`\ DEBIAN\_VERSION/**, where $DEBIAN\_VERSION is the symbolic version used to facilitate updates of the artifact in Debian. As we need to guaranty that the new version of the package will keep running and won't break dependant packages, it is advised to use a symbolic version which will exclude API breaking changes in the library. A well behaved library will use the symbolic versions 1.x, 2.x, 3.x and so on to indicate that all versions starting with 1. will be mapped to the symbolic version 1.x and that minor updates in this version range will not break other packages, but version 2.0 onwards will contain breaking changes and require a bigger upgrade including updating the symbolic version 2.x for this library and for all dependant packages. It is expected that such a major change MAY require a new packaging for the library, for example libcommons-collections-java contains the version 2. of commons-collection and uses the symbolic version 2.x in the Maven repository, but libcommons-collections3-java contains the version 3. of commons-collections and uses the symbolic version 3.x in the Maven repository. Maven plugins cannot use symbolic versions, so when the artifact is a Maven plugin, then the symbolic version SHOULD NOT be used for that artifact. All compile and run time dependencies including parents and plugins MUST be resolved by packages that are available in Debian. Test dependencies need not be resolvable except if you want to build and run the test code. For all dependencies already packaged in Debian with the accompanying Maven metadata, hard coded version numbers for those dependencies SHOULD be replaced by their symbolic version. Example: :: org.apache.maven maven-core 2.0.9 should be changed to :: org.apache.maven maven-core 2.x When the POM contains also a reference to a parent, then the version for this parent SHOULD also be replaced by a symbolic version. Example: :: asm asm-parent 2.2.3 asm asm-parent 2.x Dependencies that are not yet following this specification can be referred with **system** and **/usr/share/java/$ARTIFACTID.jar** but this SHOULD be avoided if possible. Example: :: org.apache.maven maven-core 2.0.9 could be changed to :: org.apache.maven maven-core 2.0.9 system /usr/share/java/maven2.jar as long as the Debian package maven2 does not ship its pom files. The hardcoded version number is ignored by Maven if the **** element is specified. The helper scripts provided by maven-repo-helper (in particular mh\_cleanpom and mh\_installpom) and maven-debian-helper (integrated in Maven as Maven plugins) will assist you to install the jar files and the POM descriptors in the repository, and replace the versions in the POM files by symbolic versions where needed. They perform further operations such as removing unecessary tags in the XML (, and in particular are removed), and they insert some useful additional information in the POM file as properties. Those additional properties provide guidance for those automatic tools when working on the package or on packages dependent upon this package. For example: :: 2.2.3 libasm2-java - debian.originalVersion: Indicates the current version for the library. Used in particular to manage updates. - debian.package: Name of the binary Debian package containing this POM file. It speeds up packaging, as launching dpkg--search is not really efficient from Java. - debian.mavenRules: Lists the rules used for this package. It simplifies handling dependencies. For example, if the dependency asm:asm:2.4.5 is found in a POM file, then we try to apply the rule 'asm \* \* s/2..\*/2.x/ \* \*'. It will match and return 'asm asm jar 2.x compile' after dependency resolution, and the tool will replace version 2.4.5 by 2.x in the POM file. - debian.hasPackageVersion: Indicates that there is a match between the version in Maven and the Debian version of the package. For example if the Maven version is 2.2.3 for asm, and the debian version of libasm2-java is 2.2.3-1, then we can add this property flag to the POM. For consumers of the package, it means that if they have a dependency on asm with the version 2.2 for example, then they can use a version constraint on their Depends and Build-Depends for the libasm2-java package, like so: Depends: ${misc:Depends}, libasm2-java ( >= 2.2 ) Glossary ======== Some of Maven's concept are explained here but do not expect an exact reference, please. - **Artifact**: An artifact is a module in a Maven project. Every artifact has one pom.xml file (called the POM) and has zero or one binary jar files. An artifact can be uniquely addressed by the ****, ****, and **** elements. - **Dependency**: A reference to another artifact that is needed for building, testing, or during runtime. It is specified by the **** element. - **Parent**: Every artifact can have zero or one dependency specified by the **** element. Parent are somewhat similar to dependencies but not identical. - **Plugin**: Maven uses plugins to carry out most of the work of build process like the ''maven-clean-plugin'', ''maven-compile-plugin'', and ''maven-jar-plugin'' - just to name a few. Specialized plugins can be used to customize the build process and they are specified by the **** element. - **POM**: The ''project object model'' that describes the artifact and its build process. It is represented as a file pom.xml in the source code which gets renamed to :math:`ARTIFACTID-`\ VERSION.pom during installation. It is also designed as Maven metadata as it contains data about an artifact. - **Project**: One or more modules can be built in one build process and they usually share the same version number. In a multimodule project the modules are specified by the **** element. That is why every maven project is best packaged as one Debian source package. maven-repo-helper-1.8.5/doc/reference3.rst0000644000000000000000000000013212247273474015271 0ustar mh\_linkrepojar: ~~~~~~~~~~~~~~~~ TODO Working with the build: ----------------------- maven-repo-helper-1.8.5/doc/reference2.rst0000644000000000000000000000042012247273474015270 0ustar Working with jar files: ----------------------- maven-repo-helper provides tools to install a freshly built jar file into /usr/share/maven-repo, or to install a link into /usr/share/maven-repo for a jar installed into /usr/share/java or another location by another tool. maven-repo-helper-1.8.5/doc/reference.rst0000644000000000000000000000067512247273474015222 0ustar `repository specification `_ \| `reference `_ \| `tutorial `_ Reference for Maven Repo Helper =============================== Working with POM files ---------------------- In Maven, POM files are xml files containing the full definition of a project and how to build it. maven-repo-helper can manipulate them in order to clean unecessary cruft and integrate seamlessly in a Debian environment. maven-repo-helper-1.8.5/doc/reference3.txt0000644000000000000000000000011612247273474015302 0ustar ### mh\_linkrepojar: TODO Working with the build: ----------------------- maven-repo-helper-1.8.5/doc/reference-footer.html0000644000000000000000000000001012247273474016631 0ustar maven-repo-helper-1.8.5/doc/reference4.rst0000644000000000000000000000007312247273474015276 0ustar Working with the repository: ---------------------------- maven-repo-helper-1.8.5/doc/reference.txt0000644000000000000000000000066712247273474015232 0ustar [repository specification](repository.html) | [reference](reference.html) | [tutorial](tutorial.html) Reference for Maven Repo Helper =============================== Working with POM files ---------------------- In Maven, POM files are xml files containing the full definition of a project and how to build it. maven-repo-helper can manipulate them in order to clean unecessary cruft and integrate seamlessly in a Debian environment. maven-repo-helper-1.8.5/doc/repository-header.html0000644000000000000000000000064312247273474017060 0ustar Maven Repo Helper Repository specification maven-repo-helper-1.8.5/doc/tutorial.rst0000644000000000000000000004614512247273474015131 0ustar `repository specification `_ \| `reference `_ \| `tutorial `_ Packaging Java and Maven projects with Maven Repo Helper ======================================================== The maven-repo-helper package provides tools for installing and maintaining Maven POMs and jars installed in /usr/share/maven-repo. Maven is a comprehensive build tool for Java and other languages based around the concept of plugins and a repository accessible normally from internet (a la CPAN), and providing access to the libraries used by a project. To satisfy the requirement that all software must be built from the Debian repository and that no access to Internet is allowed during a build, we have re-created a Maven repository for Debian. This repository is located in /usr/share/maven-repo and Maven POM files installed there must follow some special requirements. The Debian policy mandates that Java libraries are installed in /usr/share/java, so we have many Java libraries have already been packaged in Debian, but they don't have any Maven descriptors (POMs) associated with them. maven-repo-helper can help by installing those libraries also in /usr/share/maven-repo with their POM files. The Maven repository maintained by Debian has some special characteristics which make it difficult to use directly upstream POM files without any changes. To allow a smooth upgrade of Java libraries, we create both native and Debian versions of the artifacts, and replace all versions in the dependencies with Debian versions - see the `repository specification `_ document for more informations about this process. In addition, entries in the POM file which are not needed anymore, such as build information, are removed. mh\_make provides the scripts mh\_patchpom and mh\_cleanpom which patch dependencies versions and clean up the POM file respectively. Other scripts often make use of those two scripts to provide more advanced functionality. maven-repo-helper has no dependency on Maven, so it can be used for any library, including libraries used by Maven itself. It provides the foundations for maven-debian-helper. Its goal is to manage the /usr/share/maven-repo folder properly, and cannot be used alone to build a Java library from source. You will normally use it either with Ant (started by a cdbs rule or dh 7 rule or anything you like), or with javahelper which will take care of building the binaries for your project. **Important:** If you want your build to use Maven itself, then run mh\_make from the maven-debian-helper package on the upstream sources. mh\_make will guide you for that process and generate all necessary debian files for you. You can also use mh\_make --ant to speed up the packaging of a project which uses Ant as the build tool and needs to install its artifacts into the Maven repository. Quick start =========== This section presents some of the recommanded packaging styles: DH 7 + Ant + maven-repo-helper ------------------------------ The build uses dh 7 style, it runs Ant for the build and uses maven-repo-helper to install all jars both in /usr/share/java and in /usr/share/maven-repo with the POM files. debian/control: :: Source: bnd Section: java Priority: optional Maintainer: Debian Java Maintainers Uploaders: Ludovic Claude Build-Depends: debhelper (>= 8), maven-repo-helper (>= 1.7), default-jdk Build-Depends-Indep: junit, libosgi-ee-minimum-api-java (>= 1.2.1) Standards-Version: 3.9.2 Homepage: http://www.aqute.biz/Code/Bnd Package: bnd Architecture: all Depends: ${misc:Depends} Description: A tool to create and diagnose OSGi R4 bundles [...] Note the Build-Depends on debhelper and maven-repo-helper debian/rules: :: #!/usr/bin/make -f export JAVA_HOME=/usr/lib/jvm/default-java %: dh $@ --buildsystem=ant --with maven_repo_helper We use here dh 7 for the build, with ant as the build system, and the maven\_repo\_helper plugin which will install all generated artifacts in the Maven repository. Ant is run with the upstream build.xml file and the default target. bnd.poms: :: biz.aQute.bndlib/tmp/pom.xml --has-package-version --artifact=biz.aQute.bndlib/tmp/biz.aQute.bndlib.jar --java-lib --usj-name=bndlib Deploy the jar built in biz.aQute.bndlib/tmp folder (--artifact option) as bndlib.jar (--usj-name option) in /usr/share/java (--java-lib option) and deploy it as well in the Maven repository. We use the POM file created by the build (biz.aQute.bndlib/tmp/pom.xml) as it contains the metadata for the bndlib jar. The option --has-package-version tells maven-repo-helper that the version of the POM matches the version of the Debian package, which is a useful hint for mh\_make when packaging another project which uses this library. maven.rules: :: biz.aQute s/bnd/bndlib/ Change the name of the artifact from bnd to bndlib in the Maven POM. The current version of bndlib will be replaced by a generic 'debian' version. You can use mh\_lspoms from the maven-debian-helper package to help you locate POM files in your sources and generate both the .poms and maven.rules files. DH 7 + Ant + maven-ant-helper + maven-repo-helper ------------------------------------------------- A variant of the previous solution, where we don't use the upstream build script, but an Ant script which works on something which looks like a Maven project and tries to emulate Maven as best as it can. This is quite handy when you are working on a package used by Maven itself and cannot use Maven during the build. debian/control: :: Source: plexus-utils2 Section: java Priority: optional Maintainer: Debian Java Maintainers Uploaders: Ludovic Claude Build-Depends: debhelper (>= 7), default-jdk, maven-repo-helper (>= 1.7), ant-optional, maven-ant-helper (>= 7) Build-Depends-Indep: libplexus-parent-java (>= 2.0.6), junit (>= 3.8.2), default-jdk-doc Standards-Version: 3.9.2 Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/plexus-utils2 Vcs-Browser: http://svn.debian.org/wsvn/pkg-java/trunk/plexus-utils2 Homepage: http://plexus.codehaus.org/plexus-utils Package: libplexus-utils2-java Architecture: all Depends: ${misc:Depends}, libplexus-parent-java (>= 2.0.6) Suggests: libplexus-utils2-java-doc Description: Plexus Common Utilities [...] Package: libplexus-utils2-java-doc Architecture: all Section: doc Depends: ${misc:Depends}, default-jdk-doc Suggests: libplexus-utils2-java Description: Documentation for Plexus Common Utilities [...] We define a binary package which will contain the jars and the fragment of the Maven repository for this package (libplexus-utils2-java), and a documentation package containing the Javadoc folder (installed in /usr/share/doc) and the Javadoc jar installed in the Maven repository (libplexus-utils2-java-doc). Note the Build-Depends on debhelper, maven-repo-helper and maven-ant-helper. debian/rules: :: #!/usr/bin/make -f DEB_SOURCE_PACKAGE := $(shell dpkg-parsechangelog | grep '^Source:' | cut -f 2 -d ' ') DEB_UPSTREAM_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ' | cut -d: -f2- | sed 's/-[^-]*$$//') export JAVA_HOME=/usr/lib/jvm/default-java export CLASSPATH=$(shell for jar in `cat debian/build-classpath`; do if [ -f "$$jar" ]; then echo -n "$${jar}:"; fi; done) export ANT_ARGS=-Dbasedir=$(realpath .) -Dpackage=$(DEB_SOURCE_PACKAGE) -f /usr/share/maven-ant-helper/maven-build.xml %: dh $@ --buildsystem=ant --with maven_repo_helper We use here dh 7 for the build, with ant as the build system, and the maven\_repo\_helper plugin which will install all generated artifacts in the Maven repository We configure ant to use the maven-ant-helper build script (/usr/share/maven-ant-helper/maven-build.xml) and the classpath defined in debian/build-classpath libplexus-utils2-java.poms: :: pom.xml --has-package-version --artifact=target/plexus-utils-*.jar --java-lib --usj-name=plexus-utils2 Install the jar as plexus-utils2.jar (--usj-name option) in /usr/share/java (--java-lib option) and install it as well in /usr/share/maven-repo with its POM file. The jar is coming from the target/ folder used by Maven (and the maven-repo-helper script) for its builds, and we use a glob pattern (\*) to match any version of the jar (--artifact option). The option --has-package-version tells maven-repo-helper that the version of the POM matches the version of the Debian package, which is a useful hint for mh\_make when packaging another project which uses this library. libplexus-utils2-java-doc.poms: :: target/plexus-utils.javadoc.pom --has-package-version --artifact=target/plexus-utils.javadoc.jar --classifier=javadoc --ignore-pom Install the javadoc jar into /usr/share/maven-repo, without a POM file (--ignore-pom option) because that's the way Maven works - javadoc jars have no dedicated POM files for them. Instead, there is a classifier which tells Maven that this jar contains Javadoc (--classifier option). The javadoc jar is packaged in libplexus-utils2-java-doc package. libplexus-utils2-java-doc.install: :: target/apidocs/* usr/share/doc/libplexus-utils2-java/api Install the javadoc folder into /usr/share/doc/libplexus-utils2-java/api. This folder is packaged in libplexus-utils2-java-doc package. maven.rules: :: junit junit jar s/3\..*/3.x/ * * org.codehaus.plexus plexus-utils jar s/2\..*/2.x/ * * org.codehaus.plexus plexus pom s/2\..*/2.x/ * * Adapt versions for Debian in the Maven POMs, as it ease small upgrades. - junit:junit jar dependencies with a version starting with 3. will use version 3.x instead (and libjunit-java contains a similar rule which install version 3.x in the Maven repository) - org.codehaus.plexus:plexus-utils jar dependencies with a version starting with 2. will use version 2.x instead - org.codehaus.plexus:plexus pom dependencies with a version starting with 2. will use version 2.x instead DH 7 + javahelper + maven-repo-helper ------------------------------------- debian/control: :: Source: httpunit Maintainer: Debian Java Maintainers Uploaders: Miguel Landaeta , Michael Koch Section: java Priority: optional Build-Depends: default-jdk, ant (>= 1.7.0-6), javahelper (>= 0.28), debhelper (>= 7.0.50~), rhino (>= 1.7R1-2), libjtidy-java (>= 7+svn20070309-2), libgnujaf-java (>= 1.1.1-4), junit (>= 3.8.2), libgnumail-java (>= 1.1.2-2), libservlet2.4-java (>= 5.0.30-8), libxerces2-java (>= 2.9.1-2), libnekohtml-java (>= 0.9.5+dfsg-1.1), maven-repo-helper (>= 1.7) Standards-Version: 3.9.2 Homepage: http://httpunit.org/ Vcs-Browser: http://svn.debian.org/wsvn/pkg-java/trunk/httpunit/ Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/httpunit Package: libhttpunit-java Architecture: all Section: java Priority: optional Depends: ${java:Depends}, libxerces2-java (>= 2.9.1-2), libnekohtml-java (>= 0.9.5+dfsg-1.1), rhino (>= 1.7R1-2), libjtidy-java (>= 7+svn20070309-2), libservlet2.4-java (>= 5.0.30-8), ${misc:Depends} Recommends: junit (>= 3.8.2) Suggests: libhttpunit-java-doc (= ${binary:Version}) Description: automated web site testing toolkit [...] Note the Build-Depends on debhelper, javahelper, ant and maven-repo-helper debian/rules: :: #!/usr/bin/make -f %: dh --with javahelper --with jh_maven_repo_helper $@ We use here dh 7 for the build, with javahelper as the build system (which in turn will launch Ant because build.xml exists), and the jh\_maven\_repo\_helper plugin which is adapted to work with javahelper and will install all generated artifacts in the Maven repository. libhttpunit-java.jlibs: :: lib/httpunit.jar We tell javahelper to install the httpunit.jar file located in lib into /usr/share/java libhttpunit-java.poms: :: debian/pom.xml --usj-name=httpunit Create a link for the jar /usr/share/java/httpunit.jar into the Maven repository and use debian/pom.xml as its companion metadata file CDBS + maven-repo-helper using mh\_install ------------------------------------------ debian/control: :: Source: maven-debian-helper Section: java Priority: optional Maintainer: Debian Java Maintainers Uploaders: Torsten Werner , Ludovic Claude , Michael Koch , Damien Raude-Morvan Build-Depends: cdbs, debhelper (>= 7), default-jdk, maven-ant-helper (>= 7), maven-repo-helper (>= 1.7), ant-optional, help2man Build-Depends-Indep: junit, libmaven-plugin-tools-java, libplexus-velocity-java Standards-Version: 3.9.2 Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/maven-debian-helper Vcs-Browser: http://svn.debian.org/wsvn/pkg-java/trunk/maven-debian-helper/ Homepage: http://wiki.debian.org/Java/MavenBuilder Package: maven-debian-helper Architecture: all Depends: ${misc:Depends}, default-jdk, maven-repo-helper (>= 1.5), maven2 (>= 2.2.1-5), libmaven-clean-plugin-java, libmaven-resources-plugin-java, libmaven-compiler-plugin-java, libmaven-jar-plugin-java, libmaven-site-plugin-java, libsurefire-java, velocity, libplexus-velocity-java Suggests: libmaven-javadoc-plugin-java, apt-file, devscripts, subversion Description: Helper tools for building Debian packages with Maven [...] Note the Build-Depends on cdbs and maven-repo-helper. maven-ant-helper and ant-optional are also needed for this package, as it's quite complex but this is not important for this tutorial. debian/rules: :: #!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/ant.mk PACKAGE := $(DEB_SOURCE_PACKAGE) VERSION := $(shell echo ${DEB_UPSTREAM_VERSION} | sed -r 's/([0-9\.]+).*/\1/') JAVA_HOME := /usr/lib/jvm/default-java DEB_JARS := ant-nodeps classworlds maven-core maven-artifact maven-artifact-manager maven-model \ maven-compat maven-plugin-api maven-project maven-scm-api velocity file-management plexus-utils \ plexus-container-default-alpha maven-repo-helper DEB_ANT_BUILD_TARGET := package DEB_ANT_BUILDFILE := debian/build.xml DEB_ANT_ARGS := -Dpackage=$(PACKAGE) -Dbin.package=$(PACKAGE) API_DOCS := target/api install/$(PACKAGE):: mh_install -p$(PACKAGE) clean:: mh_clean This is a simplified version of debian/rules, which shows how to use the mh\_install and mh\_clean scripts from maven-repo-helper with CDBS and Ant. mh\_install performs the installation of the built jars into /usr/share/maven-repo and /usr/share/java. It uses the configuration defined in maven-debian-helper.poms. mh\_clean does the clean up of files left behind during the execution of mh\_install. maven-debian-helper.poms: :: pom.xml --no-parent --has-package-version maven-debian-helper/pom.xml --has-package-version --artifact=maven-debian-helper/target/maven-debian-helper-*.jar --java-lib maven-debian-plugin/pom.xml --has-package-version --artifact=maven-debian-plugin/target/maven-debian-plugin-*.jar --java-lib maven-build-nodocs/pom.xml --has-package-version --artifact=maven-build-nodocs/target/maven-build-nodocs-*.jar --java-lib maven-packager-utils/pom.xml --has-package-version --artifact=maven-packager-utils/target/maven-packager-utils-*.jar --java-lib Here we tell mh\_install to deploy the maven-debian-helper project and its sub projects into /usr/share/maven-repo, and to deploy all jars also into /usr/share/java (--java-lib option) CDBS + maven-repo-helper using mh\_installpoms and mh\_installjar ----------------------------------------------------------------- debian/control: :: Source: plexus-io Section: java Priority: optional Maintainer: Debian Java Maintainers Uploaders: Torsten Werner , Ludovic Claude Build-Depends: debhelper (>= 5), cdbs (>= 0.4.5.3), default-jdk Build-Depends-Indep: maven-repo-helper (>= 1.7), maven-ant-helper (>= 7), ant, ant-optional, libplexus-utils-java, libplexus-containers-java Standards-Version: 3.8.1 Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/plexus-io Vcs-Browser: http://svn.debian.org/wsvn/pkg-java/trunk/plexus-io/ Homepage: http://plexus.codehaus.org/plexus-components/plexus-io/ Package: libplexus-io-java Architecture: all Depends: ${misc:Depends}, libplexus-utils-java, libplexus-containers-java Description: Plexus IO Components [...] Note the Build-Depends on cdbs and maven-repo-helper. debian/rules: :: #!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/ant.mk PACKAGE := $(DEB_SOURCE_PACKAGE) VERSION := $(DEB_UPSTREAM_VERSION) JAVA_HOME := /usr/lib/jvm/default-java DEB_JARS := ant-nodeps plexus-utils plexus-container-default DEB_ANT_BUILD_TARGET := package #javadoc DEB_ANT_BUILDFILE := /usr/share/maven-ant-helper/maven-build.xml DEB_ANT_ARGS := -Dbasedir=$(realpath .) -Dpackage=$(PACKAGE) -Dversion=$(VERSION) API_DOCS := build/api binary-post-install/lib$(PACKAGE)-java:: mh_installpoms -plib$(PACKAGE)-java mh_installjar -plib$(PACKAGE)-java -l pom.xml build/$(PACKAGE)-$(VERSION).jar clean:: mh_clean No patches for the POM files are needed, all is taken care of by the mh\_installpom script (which uses mh\_cleanpom) mh\_installpoms will install all POM files registered in debian/lib$package-java.pom into /usr/share/maven-repo, mh\_installjar will install the jar file associated with the POM into /usr/share/maven-repo and also add a link to the jar in /usr/share/java, with and without the version debian/libplexus-io-java.pom :: pom.xml --no-parent It simply lists the pom files in the source tree which need to be installed in the repository, and indicates with the --no-parent option that if the POM inherits from a parent POM, then this inheritance relationship will be removed in the cleaned POM. Removing the parent inheritence can often simplify the packaging, as the parent POM mostly does not contain any useful information - we need only the list of dependencies in our repository, the other details for the build are irrelevant. There is less configuration here because we are using the low-level mh\_installpoms and mh\_installjar scripts which place the configuration on their command line options. Typical workflow for packaging a project from source ---------------------------------------------------- 1. Get the original sources and unpack them, copy the debian/ folder if you are working on an existing package. 2. mh\_make --ant 3. edit debian/rules (to fix the last remaining packaging details) 4. edit debian/control (to add maven-repo-helper to Build-Depends: ) maven-repo-helper-1.8.5/doc/reference4.txt0000644000000000000000000000007412247273474015306 0ustar Working with the repository: ---------------------------- maven-repo-helper-1.8.5/doc/style.css0000644000000000000000000000042212247273474014372 0ustar pre { /* the pre makes the border */ margin: 0.5em 0; padding: 10pt; border: 1pt solid #AEBDCC; background-color: #F3F5F7; color: black; } pre code { /* the code has no border and is inside the pre */ margin: 0; padding: 0; border: none; } maven-repo-helper-1.8.5/doc/reference5.txt0000644000000000000000000000005412247273474015305 0ustar Debhelper 7 plugins: -------------------- maven-repo-helper-1.8.5/doc/reference-header.html0000644000000000000000000000062412247273474016576 0ustar Maven Repo Helper Reference maven-repo-helper-1.8.5/doc/tutorial-footer.html0000644000000000000000000000001012247273474016536 0ustar maven-repo-helper-1.8.5/doc/tutorial-header.html0000644000000000000000000000062312247273474016502 0ustar Maven Repo Helper Tutorial maven-repo-helper-1.8.5/doc/repository-footer.html0000644000000000000000000000001012247273474017112 0ustar maven-repo-helper-1.8.5/doc/reference2.txt0000644000000000000000000000042112247273474015300 0ustar Working with jar files: ----------------------- maven-repo-helper provides tools to install a freshly built jar file into /usr/share/maven-repo, or to install a link into /usr/share/maven-repo for a jar installed into /usr/share/java or another location by another tool. maven-repo-helper-1.8.5/doc/repository.txt0000644000000000000000000005225312247273474015511 0ustar [repository specification](repository.html) | [reference](reference.html) | [tutorial](tutorial.html) Maven Repository Specification ============================== This page specifies how to install Java libraries in Maven compatible way which makes it possible to use Maven for Debian packaging. This specification is intended to be * as short as possible, * easy to understand, * easy to use, and * compatible with the Debian Java policy. Status ------ The specification is in use and implemented by maven-repo-helper and maven-debian-helper packages. Motivation: advantages of using Maven ------------------------------------- Maven has advantages for the upstream developers that won't be repeated here. That is the reason why more and more projects are switching to Maven as their primary build tool. Detailed information about maven can be found at [Maven's homepage](http://maven.apache.org) and in the book [Maven: The Definitive Guide](http://books.sonatype.com/maven-book/). Maven maintains a model of a project in a file __pom.xml__: the developer can assign attributes to a project such as: * name * description * URL * information about developers and contributors * license * mailing lists * issue tracker * source code management (like subversion) * dependencies Most of those attributes can directly be used for Debian packaging but the most interesting ones are the dependencies. Imagine a project 'a' that depends on 2 other projects 'b' and 'c' where 'b' itself depends on 'd', 'e', 'f' and 'c' depends on 'f', 'g', 'h'. a ---> b ---> d | | | |-> e | | | -> f | -> c ---> f | |-> g | -> h In a later upstream version 'c' adds another depends 'i' and that means that we have to change all reverse depends of 'c' including 'a' (like adding __i.jar__ to __DEB_JARS__ in __debian/rules__). But Maven will do this automatically for us and we do not have to touch reverse depends of any package when the dependencies change. Problems with upstream's repository (central) --------------------------------------------- There is one central repository for Maven artifacts at http://repo2.maven.org/maven2/ that ships '''all''' releases of an artifact. The artifact log4j:log4j has 12 different versions at http://repo2.maven.org/maven2/log4j/log4j/ and maven downloads one of them during building a package that declares log4j:log4j as a dependency. Sometimes it is difficult to predict which version gets downloaded by maven and that is why it is hard to use maven in offline mode but for building Debian packages the offline mode is essential. All dependencies must be available as Debian packages and it is not acceptable to download artifacts during the build process from the central Maven repository. The package maven-repo-helper tries to solve this problem by providing a local repository below the following directory: REPO=/usr/share/maven-repo We will reference this location as __$REPO__ in the specification. In Maven Central repository, there is one policy which mandates that projects upload a cleaned version of their POM files (see [http://maven.apache.org/guides/mini/guide-central-repository-upload.html](Guide to uploading artifacts to the Central Repository)). In particular, the tag in a POM files should be removed, as well as or tags as all dependencies should be already in Central. We will use similar rules for the Debian repository. Versions in Maven POM files and smooth updates of Debian packages ----------------------------------------------------------------- The Maven repository should support smooth upgrades of Java libraries. When a new version of a library is installed in a Debian system, this is what should happend: 1. Files in __$REPO/$GROUPID/$ARTIFACTID/$OLD\_VERSION/__ are deleted 2. The new POM file and link to the jar are installed under __$REPO/$GROUPID/$ARTIFACTID/$NEW\_VERSION/__ 3. Other POMs which have a dependency on __$GROUPID:$ARTIFACTID:$OLD\_VERSION__ should see their dependencies updated to __$GROUPID:$ARTIFACTID:$NEW\_VERSION__ Steps 1. and 2. are simple file operations, but 3. implies that dpkg should somehow parse all POM files installed under $REPO, and update the dependency version where necessary. This would imply changing files outside of the package affected by the update, and those files may belong to other packages. This is difficult and against the Debian guidelines. We are using a solution which keeps the amount of effort to a minimum, keeps $REPO consistent and useable at all times and works well with Maven. The idea is to maintain 2 versions of each artifact under the Maven repository. The first version uses the native version from Maven, to keep compatibility. The second version is more interesting: its version is converted to a Debian managed version, usually 'debian', but it could be '1.x' to represent any version compatible with the version 1 of the API. The Maven repository will look like this: /usr/share/java/ commons-beanutils-1.8.0.jar commons-beanutils.jar -> commons-beanutils-1.8.0.jar junit-3.8.2.jar junit.jar -> junit-3.8.2.jar /usr/share/maven-repo/ commons-beanutils/commons-beanutils/1.8.0/ commons-beanutils-1.8.0.jar -> ../../../../java/commons-beanutils-1.8.0.jar commons-beanutils-1.8.0.pom commons-beanutils/commons-beanutils/debian/ commons-beanutils-debian.jar -> ../../../../java/commons-beanutils-1.8.0.jar commons-beanutils-debian.pom junit/junit/3.8.2/ junit-3.8.2.jar -> ../../../../java/junit-3.8.2.jar junit-3.8.2.pom junit/junit/3.x/ junit-3.x.jar -> ../../../../java/junit-3.8.2.jar junit-3.x.pom The jar for each package (here libcommons-beanutils-java and junit) are installed in /usr/share/java to comply with the Debian Java policy, then we create symlinks to those jars in the places where we need them. So we have a link for the jar under the current version folder in /usr/share/maven-repo, and there is a link to the jar under the Debian version in the Maven repository. Upgrading the jar is now a simple matter of deleting the jars, symlinks and folders used by the old version, creating the jars, symlinks and folders for the new version, and updating the symlinks for the versionless links in /usr/share/java (commons-beanutils.jar, junit.jar) and updating the symlinks for the Debian versioned symlinks (/usr/share/maven-repo/commons-beanutils/commons-beanutils/debian/commons-beanutils-debian.jar and /usr/share/maven-repo/junit/junit/3.x/junit-3.x.jar). Don't worry, the scripts provided by maven-repo-helper will do this for you. This layout makes it easy to upgrade libraries independenly of each others, it keeps some compatibility with the Maven central repository so that you can mix and match Debian-controlled parts of the repository with downloads from the Internet if you wish. Now the real trick is in how dependencies are versioned in each POM: we replace all native versions with Debian versions. This is the (simplified) content of commons-beanutils-1.8.0.pom: 4.0.0 commons-beanutils commons-beanutils 1.8.0 jar commons-logging commons-logging debian commons-collections commons-collections 3.x true commons-collections commons-collections-testframework debian test junit junit 3.x test commons-beanutils-debian.pom has the same content, except that is now 'debian': 4.0.0 commons-beanutils commons-beanutils debian jar commons-logging commons-logging debian commons-collections commons-collections 3.x true commons-collections commons-collections-testframework debian test junit junit 3.x test Note that all dependencies have also their versions replaced with the symbolic versions from Debian. For example, there is a dependency on version 3.x of junit. 3.x is a symbolic version for junit that we have defined earlier. If we need to update junit to a new version, let's suppose that the version 3.8.3 comes out, then junit 3.8.2 will be removed from the Maven repository and replaced by junit 3.8.3. But junit 3.x will not be affected by the change, except that the target for the symlink of junit-3.x.jar will now point to junit-3.8.3.jar. More importantly, the POM file for junit 3.x will not change, which means that we can keep pointing to it from other packages, like in this case libcommons-beanutils-java. Alternatives ------------ * JPackage The documentation of JPackage can be found at http://www.jpackage.org/cgi-bin/viewvc.cgi/src/jpackage-utils/doc/jpackage-1.5-policy.xhtml?root=jpackage&view=co. There is no information there on how to use maven. JPackage uses a patched Maven that understands the package layout in /usr/share/java. As a maintainer you have to learn the toolset - and that is why JPackage fails the 'easy to use' requirement. JPackage cheats on version numbers - whenever a pom requests a specific version like 1.2.3 its Maven just delivers what is has in /usr/share/java without considering the requested version all. They obviously did not solved the problem of having multiple versions of an artifact installed at the same time but we have various versions of asm, commons-collections, junit, and more in Debian and we must have a solution for that. * Version ranges Maven supports version ranges - see the [version ranges specification](http://docs.codehaus.org/display/MAVEN/Dependency+Mediation+and+Conflict+Resolution). We could use replace strict versions in dependencies by version ranges, to allow smooth upgrades when a library is updated. For example, in the commons-beanutils POM we could replace the version for the junit dependency by a version range: junit junit [3.8.2,4.0) test With this new POM definition, we could easily update junit from version 3.8.2 to version 3.8.3 without breaking commons-beanutils. That's a neet solution, unfortunately Maven 2 had quite a few issues with version ranges. To enable a reliable resolution of versions with version ranges, we need first to enforce a reliable numbering scheme for Java libraries. Some Java libraries in Debian have some really strange version schemes, some use for example dates, others -ALPHA, -BETA, -RC suffixes, others not. It looks like Maven 3.1 will adopt OSGi numering scheme, but nothing is written in stone at the moment. When things will have settled, we will probably update the Maven repository for Debian to use version ranges instead of symbolic versions. Targets ======= The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [[http://www.ietf.org/rfc/rfc2119.txt|RFC 2119]]. This specification is targeted at the following types of packages: 1. Packages that use Maven for building SHALL install their artifacts into __$REPO__. Those packages SHOULD use maven-repo-helper or maven-debian-helper which will do most of the work automatically. 1. Packages that don't use Maven (yet) but their upstream developers are using Maven: they SHALL install their artifacts into __$REPO__ after making sure they follow the specification. Patching of the pom.xml files might be necessary. Maven-repo-helper or maven-debian-helper MAY be used to check the conformance to the spec. 1. Package where the upstream developers don't use Maven but pom.xml are provided for Maven users: the artifacts SHOULD be installed into __$REPO__ after making sure they follow the specification. Patching of the pom.xml files might be necessary. Maven-repo-helper MAY be used to check the conformance to the spec. 1. All other packages: pom.xml files from other sources (central, mvnrepository.com or hand written) MAY be installed into __$REPO__ after making sure the artifacts follow the specification. Patching of the pom.xml files might be necessary. Maven-repo-helper MAY be used to check the conformance to the spec. For packages that are used very often by Maven based packages (example: junit) the MAY or SHOULD used above SHOULD be upgraded to a SHALL. Specification ============= Artifacts MUST be installed into __$REPO/$GROUPID/$ARTIFACTID/$VERSION/__ where $GROUPID is the result of __groupId.replace( '.', '/' )__ and $VERSION is the current version of the artifact. The pom.xml files MUST be installed as __$ARTIFACTID-$VERSION.pom__ and the symlink to the jar file as __$ARTIFACTID-$VERSION.jar__. Following the Debian Java policy, the jar file itself SHOULD be installed as __$ARTIFACTID.jar__ into __/usr/share/java/__, but the name of the jar MAY be different. Artifacts SHOULD also be installed into __$REPO/$GROUPID/$ARTIFACTID/$DEBIAN\_VERSION/__, where $DEBIAN\_VERSION is the symbolic version used to facilitate updates of the artifact in Debian. As we need to guaranty that the new version of the package will keep running and won't break dependant packages, it is advised to use a symbolic version which will exclude API breaking changes in the library. A well behaved library will use the symbolic versions 1.x, 2.x, 3.x and so on to indicate that all versions starting with 1. will be mapped to the symbolic version 1.x and that minor updates in this version range will not break other packages, but version 2.0 onwards will contain breaking changes and require a bigger upgrade including updating the symbolic version 2.x for this library and for all dependant packages. It is expected that such a major change MAY require a new packaging for the library, for example libcommons-collections-java contains the version 2. of commons-collection and uses the symbolic version 2.x in the Maven repository, but libcommons-collections3-java contains the version 3. of commons-collections and uses the symbolic version 3.x in the Maven repository. Maven plugins cannot use symbolic versions, so when the artifact is a Maven plugin, then the symbolic version SHOULD NOT be used for that artifact. All compile and run time dependencies including parents and plugins MUST be resolved by packages that are available in Debian. Test dependencies need not be resolvable except if you want to build and run the test code. For all dependencies already packaged in Debian with the accompanying Maven metadata, hard coded version numbers for those dependencies SHOULD be replaced by their symbolic version. Example: org.apache.maven maven-core 2.0.9 should be changed to org.apache.maven maven-core 2.x When the POM contains also a reference to a parent, then the version for this parent SHOULD also be replaced by a symbolic version. Example: asm asm-parent 2.2.3 asm asm-parent 2.x Dependencies that are not yet following this specification can be referred with __system__ and __/usr/share/java/$ARTIFACTID.jar__ but this SHOULD be avoided if possible. Example: org.apache.maven maven-core 2.0.9 could be changed to org.apache.maven maven-core 2.0.9 system /usr/share/java/maven2.jar as long as the Debian package maven2 does not ship its pom files. The hardcoded version number is ignored by Maven if the ____ element is specified. The helper scripts provided by maven-repo-helper (in particular mh\_cleanpom and mh\_installpom) and maven-debian-helper (integrated in Maven as Maven plugins) will assist you to install the jar files and the POM descriptors in the repository, and replace the versions in the POM files by symbolic versions where needed. They perform further operations such as removing unecessary tags in the XML (, and in particular are removed), and they insert some useful additional information in the POM file as properties. Those additional properties provide guidance for those automatic tools when working on the package or on packages dependent upon this package. For example: 2.2.3 libasm2-java * debian.originalVersion: Indicates the current version for the library. Used in particular to manage updates. * debian.package: Name of the binary Debian package containing this POM file. It speeds up packaging, as launching dpkg--search is not really efficient from Java. * debian.mavenRules: Lists the rules used for this package. It simplifies handling dependencies. For example, if the dependency asm:asm:2.4.5 is found in a POM file, then we try to apply the rule 'asm * * s/2\..*/2.x/ * *'. It will match and return 'asm asm jar 2.x compile' after dependency resolution, and the tool will replace version 2.4.5 by 2.x in the POM file. * debian.hasPackageVersion: Indicates that there is a match between the version in Maven and the Debian version of the package. For example if the Maven version is 2.2.3 for asm, and the debian version of libasm2-java is 2.2.3-1, then we can add this property flag to the POM. For consumers of the package, it means that if they have a dependency on asm with the version 2.2 for example, then they can use a version constraint on their Depends and Build-Depends for the libasm2-java package, like so: Depends: ${misc:Depends}, libasm2-java ( >= 2.2 ) Glossary ======== Some of Maven's concept are explained here but do not expect an exact reference, please. - __Artifact__: An artifact is a module in a Maven project. Every artifact has one pom.xml file (called the POM) and has zero or one binary jar files. An artifact can be uniquely addressed by the ____, ____, and ____ elements. - __Dependency__: A reference to another artifact that is needed for building, testing, or during runtime. It is specified by the ____ element. - __Parent__: Every artifact can have zero or one dependency specified by the ____ element. Parent are somewhat similar to dependencies but not identical. - __Plugin__: Maven uses plugins to carry out most of the work of build process like the ''maven-clean-plugin'', ''maven-compile-plugin'', and ''maven-jar-plugin'' - just to name a few. Specialized plugins can be used to customize the build process and they are specified by the ____ element. - __POM__: The ''project object model'' that describes the artifact and its build process. It is represented as a file pom.xml in the source code which gets renamed to $ARTIFACTID-$VERSION.pom during installation. It is also designed as Maven metadata as it contains data about an artifact. - __Project__: One or more modules can be built in one build process and they usually share the same version number. In a multimodule project the modules are specified by the ____ element. That is why every maven project is best packaged as one Debian source package. maven-repo-helper-1.8.5/doc/ref/0000755000000000000000000000000012247273474013276 5ustar maven-repo-helper-1.8.5/doc/ref/dh_with_jh_maven_repo_helper.txt0000644000000000000000000000226512247273474021725 0ustar ### --with jh\_maven\_repo\_helper: This DH 7 plugin uses the tools provided by the maven\_repo\_helper package to install the project jars and POM files into /usr/share/maven-repo. It uses the file(s) debian/$package.poms for its configuration, as well as the files debian/maven.rules, debian/maven.ignoreRules and debian/maven.publishedRules. It is designed to work alongside javahelper, and requires the use of the javahelper plugin for DH 7 at the same time. To use this plugin in the rules file, all you need to do is to add those lines to debian/rules: %: dh --with javahelper --with jh_maven_repo_helper $@ As for the plugin --with maven\_repo\_helper, you need to list the POM files and the artifacts to install in debian/$package.poms, but this is done in coordination with the configuration of javahelper. For example, if the .jlibs configuration for javahelper installs the httpunit.jar located in the lib folder into /usr/share/java, libhttpunit-java.jlibs: lib/httpunit.jar Then we need to tell javahelper to install this httpunit.jar file from /usr/share/java into the Maven repository /usr/share/maven-repo libhttpunit-java.poms: debian/pom.xml --usj-name=httpunit maven-repo-helper-1.8.5/doc/ref/mh_installpoms.rst0000644000000000000000000001077212247273474017070 0ustar mh\_installpoms: ~~~~~~~~~~~~~~~~ Usage: :: mh_installpoms [option]... Reads the file debian/$package.poms and installs each POM file listed in the .poms file. Options: :: -h --help: show this text -V --version: show the version -p --package=: name of the Debian package which will contain this POM file -h --has-package-version: flag that indicates that this POM has the same version as the package, this helps packagers of depending packages -k --keep-pom-version: keep the original version of the POM but convert all other versions in dependencies and plugins. If there is a parent POM, keeps its version except when the parent is already registered in the Maven repository -e, --set-version=: set the version for the POM, do not use the version declared in the POM file. -r --rules=: path to the file containing the rules to apply when cleaning the POM. Optional, the default location is debian/maven.rules -u --published-rules=: path to the file containing the extra rules to publish in the property debian.mavenRules in the cleaned POM. Optional, the default location is debian/maven.publishedRules -i --ignore-rules=: path to the file containing the rules used to remove certain dependencies from the cleaned POM. Optional, the default location is debian/maven.ignoreRules -c --clean-ignore-rules=: path to the file containing the rules use to remove certain dependencies from the cleaned POM, in addition to the ignore rules specified previously. This is useful in situations such as when the Maven clean target requires more dependencies or plugins to ignore than the build target. Optional, it is ignored by default -s --no-rules: don't apply any rules for converting versions, do not even convert versions to the default 'debian' version --no-publish-used-rule: don't publish the rule used to transform a POM's own attributes in debian.mavenRules --keep-elements=: keep the elements listed here even if they are normally removed by the clean operation. Such elements are build,reports,reporting,prerequisites,profiles. -m--maven-repo=: location of the Maven repository, used to force the versions of the Maven plugins used in the current POM file with the versions found in the repository -v --verbose: show more information while running -n --no-act: don't actually do anything, just print the results debian/maven.rules is used to alter the version properties for the library and its dependencies. The file debian/$package.poms should contain the relative paths to the POM files to install, each POM file in a separate line. After the path to the POM file, you can add options which will influence the cleaning of the POM file: :: --ignore: ignore this POM and its artifact if any --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 --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. --classifier=: Optional, the classifier for the jar. Empty by default. --ignore-pom: don't install the POM with mh\_install or mh\_installpoms. To use with POM files that are created temporarily for certain artifacts such as Javadoc jars. For example, debian/$package.poms could contain: :: pom.xml --no-parent --has-package-version module1/pom.xml --has-package-version --keep-elements=profiles,reporting // keep the profiles and reporting elements in the POM, as in this case they can be used from another place module2/pom.xml --package=mypackage-doc // package this POM and associated items into mypackage-doc package maven-repo-helper-1.8.5/doc/ref/mh_checkrepo.txt0000644000000000000000000000073112247273474016467 0ustar ### mh\_checkrepo: Checks the Maven repository for consistency and prints a report. Where: is the location of the Maven repository. Default to /usr/share/maven-repo Options: -h --help: show this text -V --version: show the version -v --verbose: show more information while running -o, --output=: 'text' or 'html' to change output format -r, --repository=: directory of Maven repository maven-repo-helper-1.8.5/doc/ref/mh_patchpoms.rst0000644000000000000000000000624312247273474016517 0ustar mh\_patchpoms: ~~~~~~~~~~~~~~ Usage: :: mh_patchpoms [option]... Reads the file debian/$package.poms and tranform each POM file listed in the .poms file into a POM file using the Debian versions of the libraries. Also keeps a backup of each POM file which can be restored with mh\_unpatchpoms Options: :: -h --help: show this text -V --version: show the version -p --package=: package to act on -k --keep-pom-version: keep the original version of the POM but convert all other versions in dependencies and plugins. If there is a parent POM, keeps its version except when the parent is already registered in the Maven repository -e, --set-version=: set the version for the POM, do not use the version declared in the POM file. -r --rules=: path to the file containing the rules to apply when cleaning the POM. Optional, the default location is debian/maven.rules -R, --extra-rule=: additional rule to apply when cleaning the POM. May occur multiple times, instead of or in addition to -r -u --published-rules=: path to the file containing the extra rules to publish in the property debian.mavenRules in the cleaned POM. Optional, the default location is debian/maven.publishedRules -U, --extra-published-rule=: extra rule to publish. May occur multiple times, instead of or in addition to -u -i --ignore-rules=: path to the file containing the rules used to remove certain dependencies from the cleaned POM. Optional, the default location is debian/maven.ignoreRules -I, --extra-ignore-rule=: additional rule used to remove dependencies from the transformed POM May occur multiple times, instead of or in addition to -i -c --clean-ignore-rules=: path to the file containing the rules use to remove certain dependencies from the cleaned POM, in addition to the ignore rules specified previously. This is useful in situations such as when the Maven clean target requires more dependencies or plugins to ignore than the build target. Optional, it is ignored by default -s --no-rules: don't apply any rules for converting versions, do not even convert versions to the default 'debian' version --no-publish-used-rule: don't publish the rule used to transform a POM's own attributes in debian.mavenRules -d --debian-build: transform during a Debian build, which means that some POM elements will be removed -b --build-no-docs: if the build doesn't need to build documentation, use this option to remove some POM elements (in particular plugins) which are useless here and may require extra dependencies and make the packaging harder. -m\--maven-repo=\: location of the Maven repository, used to force the versions of the Maven plugins used in the current POM file with the versions found in the repository -v --verbose: show more information while running -n --no-act: don't actually do anything, just print the results This script is used internally by maven-repo-helper when building packages with Maven. It is not usually used when Ant is used for the build. maven-repo-helper-1.8.5/doc/ref/mh_installpom.rst0000644000000000000000000000623012247273474016677 0ustar mh\_installpom: ~~~~~~~~~~~~~~~ Usage: :: mh_installpom [option]... [pom] Installs the POM file in /usr/share/maven-repo, at the correct location for Maven. Before installing the POM, it prepares it with mh\_cleanpom. Where: :: [pom] is the location of the POM file to install. GroupId, artifactId and version will be extracted from this file. Options: :: -h --help: show this text -V --version: show the version -p --package=: name of the Debian package which will contain this POM file -h --has-package-version: flag that indicates that this POM has the same version as the package, this helps packagers of depending packages -o --no-parent: don't inherit from a parent POM -k --keep-pom-version: keep the original version of the POM but convert all other versions in dependencies and plugins. If there is a parent POM, keeps its version except when the parent is already registered in the Maven repository -e, --set-version=: set the version for the POM, do not use the version declared in the POM file. -r --rules=: path to the file containing the rules to apply when cleaning the POM. Optional, the default location is debian/maven.rules -u --published-rules=: path to the file containing the extra rules to publish in the property debian.mavenRules in the cleaned POM. Optional, the default location is debian/maven.publishedRules -i --ignore-rules=: path to the file containing the rules used to remove certain dependencies from the cleaned POM. Optional, the default location is debian/maven.ignoreRules -c --clean-ignore-rules=: path to the file containing the rules use to remove certain dependencies from the cleaned POM, in addition to the ignore rules specified previously. This is useful in situations such as when the Maven clean target requires more dependencies or plugins to ignore than the build target. Optional, it is ignored by default -s --no-rules: don't apply any rules for converting versions, do not even convert versions to the default 'debian' version --no-publish-used-rule: don't publish the rule used to transform a POM's own attributes in debian.mavenRules --keep-elements=: keep the elements listed here even if they are normally removed by the clean operation. Such elements are build,reports,reporting,prerequisites,profiles. -m--maven-repo=: location of the Maven repository, used to force the versions of the Maven plugins used in the current POM file with the versions found in the repository -v --verbose: show more information while running -n --no-act: don't actually do anything, just print the results -ignore-pom: read the POM but don't install it This script installs the POM file in /usr/share/maven-repo, at the correct location for Maven. Before installing the POM, it prepares it with mh\_cleanpom. debian/maven.rules is used to alter the version properties for the library and its dependencies. Prefer to use mh\_installpoms as it reuses the information defined in debian/$package.poms and avoids repetition. maven-repo-helper-1.8.5/doc/ref/dh_with_maven_repo_helper.txt0000644000000000000000000000317012247273474021240 0ustar ### --with maven\_repo\_helper: This DH 7 plugin uses the tools provided by the maven\_repo\_helper package to install the project jars and POM files into /usr/share/maven-repo. It uses the file(s) debian/$package.poms for its configuration, as well as the files debian/maven.rules, debian/maven.ignoreRules and debian/maven.publishedRules. There can be several .poms file, one for each binary package if the source package builds multiple binary packages, each containing its own set of artifacts. As --with maven\_repo\_helper plugin uses internally mh\_install, the requirements for the configuration of the .poms files are the same, namely: For each POM file associated with a jar, we need to supply at least the --artifact parameter. For example: maven-debian-helper.poms: pom.xml --no-parent --has-package-version maven-debian-helper/pom.xml --has-package-version --artifact=maven-debian-helper/target/maven-debian-helper-*.jar --java-lib maven-debian-plugin/pom.xml --has-package-version --artifact=maven-debian-plugin/target/maven-debian-plugin-*.jar --java-lib maven-build-nodocs/pom.xml --has-package-version --artifact=maven-build-nodocs/target/maven-build-nodocs-*.jar --java-lib maven-packager-utils/pom.xml --has-package-version --artifact=maven-packager-utils/target/maven-packager-utils-*.jar --java-lib To use this plugin in the rules file, all you need to do is to add those lines to debian/rules: %: dh $@ --buildsystem=ant --with maven_repo_helper The option --buildsystem=ant is optional, and you can use any other build system or let DH 7 detect it, and you may add additional options to dh. maven-repo-helper-1.8.5/doc/ref/mh_cleanpom.txt0000644000000000000000000001440612247273474016326 0ustar ### mh\_cleanpom: Usage: mh_cleanpom [option]... [pom] [target] [pom-props] Cleans the POM and prepare it for inclusion in the Maven repository. Also extracts some information from the POM. Where: [pom] is the location of the POM file to clean. Default to pom.xml or debian/pom.xml [target] is where the cleaned POM is written to. Default to debian/tmp/pom.xml [pom-props] is where the POM properties file will be written. Default to debian/tmp/pom.properties Options: -h --help: show this text -V --version: show the version -p --package=: name of the Debian package which will contain this POM file -h --has-package-version: flag that indicates that this POM has the same version as the package, this helps packagers of depending packages -o --no-parent: don't inherit from a parent POM -k --keep-pom-version: keep the original version of the POM but convert all other versions in dependencies and plugins. If there is a parent POM, keeps its version except when the parent is already registered in the Maven repository -e, --set-version=: set the version for the POM, do not use the version declared in the POM file. -r --rules=: path to the file containing the rules to apply when cleaning the POM. Optional, the default location is debian/maven.rules -R, --extra-rule=: additional rule to apply when cleaning the POM. May occur multiple times, instead of or in addition to -r -u --published-rules=: path to the file containing the extra rules to publish in the property debian.mavenRules in the cleaned POM. Optional, the default location is debian/maven.publishedRules -U, --extra-published-rule=: extra rule to publish. May occur multiple times, instead of or in addition to -u -i --ignore-rules=: path to the file containing the rules used to remove certain dependencies from the cleaned POM. Optional, the default location is debian/maven.ignoreRules -I, --extra-ignore-rule=: additional rule used to remove dependencies from the transformed POM May occur multiple times, instead of or in addition to -i -c --clean-ignore-rules=: path to the file containing the rules use to remove certain dependencies from the cleaned POM, in addition to the ignore rules specified previously. This is useful in situations such as when the Maven clean target requires more dependencies or plugins to ignore than the build target. Optional, it is ignored by default -s --no-rules: don't apply any rules for converting versions, do not even convert versions to the default 'debian' version --no-publish-used-rule: don't publish the rule used to transform a POM's own attributes in debian.mavenRules --keep-elements=: keep the elements listed here even if they are normally removed by the clean operation. Such elements are build,reports,reporting,prerequisites,profiles. -m--maven-repo=: location of the Maven repository, used to force the versions of the Maven plugins used in the current POM file with the versions found in the repository -v --verbose: show more information while running -n --no-act: don't actually do anything, just print the results Cleans a Maven POM and prepare it for inclusion in the Debian repository for Maven. The POM will be normalised, and its parent tag removed if the option --no-parent is given. The version will be replaced by 'debian', unless a special rule applies (see below the discussion about rules). Build, profiles and other build time only sections of the POM will be stripped. If versions are given for a dependency, this version will be replaced by the 'debian' version, or a rule can be given to use a custom version. You can modify those defaults with the help of the rules file. This file should contain the lines with the format: [artifactId] [type] [version] [classifier] [scope] where groupId, artifactId, type, version, classifier and scope can be the explicit attribute to match, or can contain a wildcard (*) for generic matches. Each one of those elements can also be a replace rule, of the form s/\/\/ where regex is a regular expression, and replace is the replacement. Substitution groups $1 $2... can be used in the replacement if capture groups () have been used in the regex. The first element is mandatory (groupId), but you can ignore the elements on the right hand side. If the scope is missing, then any scope is matched and left unchanged. If the version missing, then any version will be replaced with 'debian'. If type is missing, then any type is matched and left unchanged. If artifactId is missing, then any artifactId is matched and left unchanged. You can also have comments in this file, it should be a line starting with # Example of a rules file: s/commons-(.*)/org.apache.commons.commons$1/ org.itext * * s/1\..*/1.x/ org.itext * * s/2\..*/2.x/ # use the alpha version of plexus-container-default org.codehaus.plexus plexus-container-default jar s/1\.0-alpha.*/1.0-alpha/ This rules file does the following: - all groupIds starting with commons- will have org.apache.commons. prefixed to them - any artifact in the org.itext group with a version number starting with 1. will use the 1.x version - any artifact in the org.itext group with a version number starting with 2. will use the 2.x version - the jar with groupId=org.codehaus.plexus and artifactId=plexus-container-default and a version starting with 1.0-alpha- will use the 1.0-alpha version The default rule (\* \* \* s/.\*/debian/ \*) replaces any version number with the 'debian' version and always applies last if there was no other matches. Another default rule (\* \* maven-plugin \* \*) keeps the version for all plugins as the plugin mechanism requires a version in Maven. Any rules given on the command line (using -R/--extra-rule, -U/--extra-published-rule or -I/--extra-ignore-rule) are applied in the order given, in between the rules given in the rules file (if any) and the default rules. This script is used by mh\_installpom, normally you don't need to use it directly, except if you need to investigate an issue with the cleaning process for a POM file. maven-repo-helper-1.8.5/doc/ref/mh_installjar.txt0000644000000000000000000000576112247273474016677 0ustar ### mh\_installjar: Usage: mh_installjar [option]... [pom] [jar] [link]... Installs the jar file in /usr/share/maven-repo, at the correct location for Maven. Both the native version and the Debian version of the jar are installed. It can also create additional links to the jar, usually placed in /usr/share/java. Where: [pom] is the location of the POM associated with the jar to install. GroupId, artifactId and version will be extracted from this file. [jar] is the path to the jar to install, usually located in the build folder. [link] is an additional link to the jar to install, usually there should be a link to usr/share/java/.jar and usr/share/java/-.jar to comply with the Java packaging guidelines. Note that there is no need to specify those particular links if the --java-lib option is used. Options: -h --help: show this text -V --version: show the version -p --package=: name of the Debian package which will contain this jar file -e, --set-version=: set the version for the jar, do not use the version declared in the POM file. -r --rules=: path to the file containing the rules to apply when cleaning the POM. Optional, the default location is debian/maven.rules Maven rules are used here to extract the groupId, artifactId and version from the POM file. -l --java-lib: Optional, if given it will install the jar into /usr/share/java to comply with the Debian Java specification. The jar will be installed as /usr/share/java/\$name-\$version.jar and a versionless link /usr/share/java/\$name.jar will point to it, as well as the links installed in /usr/share/maven-repo -n --usj-name=: Optional, the name to use when installing the library in /usr/share/java when --java-lib is used. Defaults to the artifact id found in the POM. -j --usj-version=: Optional, the version to use when installing the library in /usr/share/java when --java-lib is used. Defaults to the version found in the POM. -s --no-usj-versionless: Optional, don't install the versionless link in /usr/share/java. This flag is used only when the -l or --java-lib option is given. -d --dest-jar=: Optional, the destination for the real jar. The other places where the jar appears, in the repository or in the list of links, will be symlinks to this jar. Defaults to /usr/share/java/$name-$version.jar if --java-lib is used, otherwise the jar is installed in the versioned path in the Maven repository. -c --classifier=: Optional, the classifier for the jar. Empty by default. -v --verbose: show more information while running -n --no-act: don't actually do anything, just print the results --skip-clean-pom: don't clean the pom, assume that a previous action ran mh_cleanpom with the correct options. mh_cleanpom is run only to extract the groupId, artifactId and version of the jar maven-repo-helper-1.8.5/doc/ref/mh_linkjars.rst0000644000000000000000000000262612247273474016337 0ustar mh\_linkjars: ~~~~~~~~~~~~~ Usage: :: mh_linkjars [option]... Reads the file debian/$package.poms and create links for each jar file generated by a POM listed in the .poms file. Options: :: -h --help: show this text -V --version: show the version -p --package=: name of the Debian package which will contain the jar files -e, --set-version=: set the version for the jars, do not use the version declared in the POM file. -r --rules=: path to the file containing the rules to apply when cleaning the POM. Optional, the default location is debian/maven.rules -v --verbose: show more information while running -n --no-act: don't actually do anything, just print the results The .poms file should contain the list of POM files associated with the list of jars to install in the repository, and each pom file should have either the option --usj-name, giving the name of the jar (without the extension) to link to and located in /usr/share/java, or the option --artifact, which should contain the full name of the source jar to link to. For example: :: debian/pom.xml --usj-name=httpunit or :: debian/pom.xml --artifact=/usr/share/java/httpunit.jar mh\_linkjars is used also by jh\_maven\_repo\_helper, the DH 7 plugin with complements javahelper by installing the jars and the POM metadata into the Debian Maven repository. maven-repo-helper-1.8.5/doc/ref/mh_installjar.rst0000644000000000000000000000601012247273474016654 0ustar mh\_installjar: ~~~~~~~~~~~~~~~ Usage: :: mh_installjar [option]... [pom] [jar] [link]... Installs the jar file in /usr/share/maven-repo, at the correct location for Maven. Both the native version and the Debian version of the jar are installed. It can also create additional links to the jar, usually placed in /usr/share/java. Where: :: [pom] is the location of the POM associated with the jar to install. GroupId, artifactId and version will be extracted from this file. [jar] is the path to the jar to install, usually located in the build folder. [link] is an additional link to the jar to install, usually there should be a link to usr/share/java/.jar and usr/share/java/-.jar to comply with the Java packaging guidelines. Note that there is no need to specify those particular links if the --java-lib option is used. Options: :: -h --help: show this text -V --version: show the version -p --package=: name of the Debian package which will contain this jar file -e, --set-version=: set the version for the jar, do not use the version declared in the POM file. -r --rules=: path to the file containing the rules to apply when cleaning the POM. Optional, the default location is debian/maven.rules Maven rules are used here to extract the groupId, artifactId and version from the POM file. -l --java-lib: Optional, if given it will install the jar into /usr/share/java to comply with the Debian Java specification. The jar will be installed as /usr/share/java/\$name-\$version.jar and a versionless link /usr/share/java/\$name.jar will point to it, as well as the links installed in /usr/share/maven-repo -n --usj-name=: Optional, the name to use when installing the library in /usr/share/java when --java-lib is used. Defaults to the artifact id found in the POM. -j --usj-version=: Optional, the version to use when installing the library in /usr/share/java when --java-lib is used. Defaults to the version found in the POM. -s --no-usj-versionless: Optional, don't install the versionless link in /usr/share/java. This flag is used only when the -l or --java-lib option is given. -d --dest-jar=: Optional, the destination for the real jar. The other places where the jar appears, in the repository or in the list of links, will be symlinks to this jar. Defaults to /usr/share/java/$name-$version.jar if --java-lib is used, otherwise the jar is installed in the versioned path in the Maven repository. -c --classifier=: Optional, the classifier for the jar. Empty by default. -v --verbose: show more information while running -n --no-act: don't actually do anything, just print the results --skip-clean-pom: don't clean the pom, assume that a previous action ran mh_cleanpom with the correct options. mh_cleanpom is run only to extract the groupId, artifactId and version of the jar maven-repo-helper-1.8.5/doc/ref/mh_linkjars.txt0000644000000000000000000000260612247273474016344 0ustar ### mh\_linkjars: Usage: mh_linkjars [option]... Reads the file debian/$package.poms and create links for each jar file generated by a POM listed in the .poms file. Options: -h --help: show this text -V --version: show the version -p --package=: name of the Debian package which will contain the jar files -e, --set-version=: set the version for the jars, do not use the version declared in the POM file. -r --rules=: path to the file containing the rules to apply when cleaning the POM. Optional, the default location is debian/maven.rules -v --verbose: show more information while running -n --no-act: don't actually do anything, just print the results The .poms file should contain the list of POM files associated with the list of jars to install in the repository, and each pom file should have either the option --usj-name, giving the name of the jar (without the extension) to link to and located in /usr/share/java, or the option --artifact, which should contain the full name of the source jar to link to. For example: debian/pom.xml --usj-name=httpunit or debian/pom.xml --artifact=/usr/share/java/httpunit.jar mh\_linkjars is used also by jh\_maven\_repo\_helper, the DH 7 plugin with complements javahelper by installing the jars and the POM metadata into the Debian Maven repository. maven-repo-helper-1.8.5/doc/ref/mh_clean.rst0000644000000000000000000000033112247273474015573 0ustar mh\_clean: ~~~~~~~~~~ Cleans the temporary files created by the other mh\_\* utilities. Add it to the clean: target in debian/rules Usage: :: mh_clean In debian/rules, use: :: clean:: mh_clean maven-repo-helper-1.8.5/doc/ref/mh_clean.txt0000644000000000000000000000031212247273474015601 0ustar ### mh\_clean: Cleans the temporary files created by the other mh_* utilities. Add it to the clean: target in debian/rules Usage: mh_clean In debian/rules, use: clean:: mh_clean maven-repo-helper-1.8.5/doc/ref/dh_with_jh_maven_repo_helper.rst0000644000000000000000000000234212247273474021712 0ustar --with jh\_maven\_repo\_helper: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This DH 7 plugin uses the tools provided by the maven\_repo\_helper package to install the project jars and POM files into /usr/share/maven-repo. It uses the file(s) debian/$package.poms for its configuration, as well as the files debian/maven.rules, debian/maven.ignoreRules and debian/maven.publishedRules. It is designed to work alongside javahelper, and requires the use of the javahelper plugin for DH 7 at the same time. To use this plugin in the rules file, all you need to do is to add those lines to debian/rules: :: %: dh --with javahelper --with jh_maven_repo_helper $@ As for the plugin --with maven\_repo\_helper, you need to list the POM files and the artifacts to install in debian/$package.poms, but this is done in coordination with the configuration of javahelper. For example, if the .jlibs configuration for javahelper installs the httpunit.jar located in the lib folder into /usr/share/java, libhttpunit-java.jlibs: :: lib/httpunit.jar Then we need to tell javahelper to install this httpunit.jar file from /usr/share/java into the Maven repository /usr/share/maven-repo libhttpunit-java.poms: :: debian/pom.xml --usj-name=httpunit maven-repo-helper-1.8.5/doc/ref/mh_unpatchpoms.rst0000644000000000000000000000063212247273474017056 0ustar mh\_unpatchpoms: ~~~~~~~~~~~~~~~~ Usage: :: mh_unpatchpoms [option]... Restore the POM files that have been patched to their original content. Options: :: -h --help: show this text -V --version: show the version -p --package=: package to act on -v --verbose: show more information while running -n --no-act: don't actually do anything, just print the results maven-repo-helper-1.8.5/doc/ref/dh_with_maven_repo_helper.rst0000644000000000000000000000322712247273474021234 0ustar --with maven\_repo\_helper: ~~~~~~~~~~~~~~~~~~~~~~~~~~~ This DH 7 plugin uses the tools provided by the maven\_repo\_helper package to install the project jars and POM files into /usr/share/maven-repo. It uses the file(s) debian/$package.poms for its configuration, as well as the files debian/maven.rules, debian/maven.ignoreRules and debian/maven.publishedRules. There can be several .poms file, one for each binary package if the source package builds multiple binary packages, each containing its own set of artifacts. As --with maven\_repo\_helper plugin uses internally mh\_install, the requirements for the configuration of the .poms files are the same, namely: For each POM file associated with a jar, we need to supply at least the --artifact parameter. For example: maven-debian-helper.poms: :: pom.xml --no-parent --has-package-version maven-debian-helper/pom.xml --has-package-version --artifact=maven-debian-helper/target/maven-debian-helper-*.jar --java-lib maven-debian-plugin/pom.xml --has-package-version --artifact=maven-debian-plugin/target/maven-debian-plugin-*.jar --java-lib maven-build-nodocs/pom.xml --has-package-version --artifact=maven-build-nodocs/target/maven-build-nodocs-*.jar --java-lib maven-packager-utils/pom.xml --has-package-version --artifact=maven-packager-utils/target/maven-packager-utils-*.jar --java-lib To use this plugin in the rules file, all you need to do is to add those lines to debian/rules: :: %: dh $@ --buildsystem=ant --with maven_repo_helper The option --buildsystem=ant is optional, and you can use any other build system or let DH 7 detect it, and you may add additional options to dh. maven-repo-helper-1.8.5/doc/ref/mh_unpatchpoms.txt0000644000000000000000000000060612247273474017066 0ustar ### mh\_unpatchpoms: Usage: mh_unpatchpoms [option]... Restore the POM files that have been patched to their original content. Options: -h --help: show this text -V --version: show the version -p --package=: package to act on -v --verbose: show more information while running -n --no-act: don't actually do anything, just print the results maven-repo-helper-1.8.5/doc/ref/mh_patchpoms.txt0000644000000000000000000000622112247273474016522 0ustar ### mh\_patchpoms: Usage: mh_patchpoms [option]... Reads the file debian/$package.poms and tranform each POM file listed in the .poms file into a POM file using the Debian versions of the libraries. Also keeps a backup of each POM file which can be restored with mh_unpatchpoms Options: -h --help: show this text -V --version: show the version -p --package=: package to act on -k --keep-pom-version: keep the original version of the POM but convert all other versions in dependencies and plugins. If there is a parent POM, keeps its version except when the parent is already registered in the Maven repository -e, --set-version=: set the version for the POM, do not use the version declared in the POM file. -r --rules=: path to the file containing the rules to apply when cleaning the POM. Optional, the default location is debian/maven.rules -R, --extra-rule=: additional rule to apply when cleaning the POM. May occur multiple times, instead of or in addition to -r -u --published-rules=: path to the file containing the extra rules to publish in the property debian.mavenRules in the cleaned POM. Optional, the default location is debian/maven.publishedRules -U, --extra-published-rule=: extra rule to publish. May occur multiple times, instead of or in addition to -u -i --ignore-rules=: path to the file containing the rules used to remove certain dependencies from the cleaned POM. Optional, the default location is debian/maven.ignoreRules -I, --extra-ignore-rule=: additional rule used to remove dependencies from the transformed POM May occur multiple times, instead of or in addition to -i -c --clean-ignore-rules=: path to the file containing the rules use to remove certain dependencies from the cleaned POM, in addition to the ignore rules specified previously. This is useful in situations such as when the Maven clean target requires more dependencies or plugins to ignore than the build target. Optional, it is ignored by default -s --no-rules: don't apply any rules for converting versions, do not even convert versions to the default 'debian' version --no-publish-used-rule: don't publish the rule used to transform a POM's own attributes in debian.mavenRules -d --debian-build: transform during a Debian build, which means that some POM elements will be removed -b --build-no-docs: if the build doesn't need to build documentation, use this option to remove some POM elements (in particular plugins) which are useless here and may require extra dependencies and make the packaging harder. -m\--maven-repo=\: location of the Maven repository, used to force the versions of the Maven plugins used in the current POM file with the versions found in the repository -v --verbose: show more information while running -n --no-act: don't actually do anything, just print the results This script is used internally by maven-repo-helper when building packages with Maven. It is not usually used when Ant is used for the build. maven-repo-helper-1.8.5/doc/ref/mh_install.txt0000644000000000000000000001050712247273474016174 0ustar ### mh\_install: Usage: mh_install [option]... Reads the file debian/$package.poms and installs each POM file listed in the .poms file, as well as the associated jars - assuming that at least the --artifact option is given in the .poms file for all jars to install. Options: -h --help: show this text -V --version: show the version -p --package=: name of the Debian package which will contain all the files to install -e, --set-version=: set the version for all artifacts, do not use the version declared in the POM files. -r --rules=: path to the file containing the rules to apply when cleaning the POM files. Optional, the default location is debian/maven.rules -u --published-rules=: path to the file containing the extra rules to publish in the property debian.mavenRules in the cleaned POM. Optional, the default location is debian/maven.publishedRules -i --ignore-rules=: path to the file containing the rules used to remove certain dependencies from the cleaned POM. Optional, the default location is debian/maven.ignoreRules --no-publish-used-rule: don't publish the rule used to transform a POM's own attributes in debian.mavenRules -v --verbose: show more information while running -n --no-act: don't actually do anything, just print the results The $package.poms file must contain enough information to locate the jar files to install, and to associate them with their POM file. For each POM file associated with a jar, we need to supply at least the --artifact parameter. For example: maven-debian-helper.poms: pom.xml --no-parent --has-package-version maven-debian-helper/pom.xml --has-package-version --artifact=maven-debian-helper/target/maven-debian-helper-*.jar --java-lib maven-debian-plugin/pom.xml --has-package-version --artifact=maven-debian-plugin/target/maven-debian-plugin-*.jar --java-lib maven-build-nodocs/pom.xml --has-package-version --artifact=maven-build-nodocs/target/maven-build-nodocs-*.jar --java-lib maven-packager-utils/pom.xml --has-package-version --artifact=maven-packager-utils/target/maven-packager-utils-*.jar --java-lib Here we tell mh\_install to deploy the maven-debian-helper project and its sub projects into /usr/share/maven-repo, and to deploy all jars also into /usr/share/java (--java-lib option) Internally, mh\_installpom is used to install the POM file, mh\_installjar is used to install the jar if --artifact is supplied. If a project or sub-project contains the file src/site/site.xml, then it will be installed with mh\_installsite. The file $package.poms contains the list of POM files and their releated artifacts to install. The format of the $package.poms file is: [option]* [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] maven-repo-helper-1.8.5/doc/ref/mh_installsite.rst0000644000000000000000000000241612247273474017052 0ustar mh\_installsite: ~~~~~~~~~~~~~~~~ Usage: :: mh_installsite [option]... [pom] [site-file] Installs the site.xml file in /usr/share/maven-repo, at the correct location for Maven. Where: :: [pom] is the location of the POM associated with the site.xml file to install. GroupId, artifactId and version will be extracted from this file. [site-file] is the location of the site.xml to install. Options: :: -h --help: show this text -V --version: show the version -p --package=: name of the Debian package which will contain the site file -e, --set-version=: set the version for the POM, do not use the version declared in the POM file. -r --rules=: path to the file containing the rules to apply when cleaning the POM. Optional, the default location is debian/maven.rules Maven rules are used here to extract the groupId, artifactId and version from the POM file. -v --verbose: show more information while running -n --no-act: don't actually do anything, just print the results --skip-clean-pom: don't clean the pom, assume that a previous action ran mh_cleanpom with the correct options. mh_cleanpom is run only to extract the groupId, artifactId and version of the jar maven-repo-helper-1.8.5/doc/ref/mh_installpoms.txt0000644000000000000000000001074212247273474017074 0ustar ### mh\_installpoms: Usage: mh_installpoms [option]... Reads the file debian/$package.poms and installs each POM file listed in the .poms file. Options: -h --help: show this text -V --version: show the version -p --package=: name of the Debian package which will contain this POM file -h --has-package-version: flag that indicates that this POM has the same version as the package, this helps packagers of depending packages -k --keep-pom-version: keep the original version of the POM but convert all other versions in dependencies and plugins. If there is a parent POM, keeps its version except when the parent is already registered in the Maven repository -e, --set-version=: set the version for the POM, do not use the version declared in the POM file. -r --rules=: path to the file containing the rules to apply when cleaning the POM. Optional, the default location is debian/maven.rules -u --published-rules=: path to the file containing the extra rules to publish in the property debian.mavenRules in the cleaned POM. Optional, the default location is debian/maven.publishedRules -i --ignore-rules=: path to the file containing the rules used to remove certain dependencies from the cleaned POM. Optional, the default location is debian/maven.ignoreRules -c --clean-ignore-rules=: path to the file containing the rules use to remove certain dependencies from the cleaned POM, in addition to the ignore rules specified previously. This is useful in situations such as when the Maven clean target requires more dependencies or plugins to ignore than the build target. Optional, it is ignored by default -s --no-rules: don't apply any rules for converting versions, do not even convert versions to the default 'debian' version --no-publish-used-rule: don't publish the rule used to transform a POM's own attributes in debian.mavenRules --keep-elements=: keep the elements listed here even if they are normally removed by the clean operation. Such elements are build,reports,reporting,prerequisites,profiles. -m--maven-repo=: location of the Maven repository, used to force the versions of the Maven plugins used in the current POM file with the versions found in the repository -v --verbose: show more information while running -n --no-act: don't actually do anything, just print the results debian/maven.rules is used to alter the version properties for the library and its dependencies. The file debian/$package.poms should contain the relative paths to the POM files to install, each POM file in a separate line. After the path to the POM file, you can add options which will influence the cleaning of the POM file: --ignore: ignore this POM and its artifact if any --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 --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. --classifier=: Optional, the classifier for the jar. Empty by default. --ignore-pom: don't install the POM with mh\_install or mh\_installpoms. To use with POM files that are created temporarily for certain artifacts such as Javadoc jars. For example, debian/$package.poms could contain: pom.xml --no-parent --has-package-version module1/pom.xml --has-package-version --keep-elements=profiles,reporting // keep the profiles and reporting elements in the POM, as in this case they can be used from another place module2/pom.xml --package=mypackage-doc // package this POM and associated items into mypackage-doc package maven-repo-helper-1.8.5/doc/ref/mh_linkjar.rst0000644000000000000000000000526112247273474016152 0ustar mh\_linkjar: ~~~~~~~~~~~~ Usage: :: mh_linkjar [option]... [pom] [dest_jar] [link]... Create symlinks for a jar installed by other means. The symlinks created include links to the jar in /usr/share/maven-repo, at the correct location for Maven. It can also create additional links to the jar, usually located in /usr/share/java. Where: :: [pom] is the location of the POM associated with the jar to install. GroupId, artifactId and version will be extracted from this file. [dest_jar] is the path of the installed jar, usually located in the usr/share/java folder. [link] is an additional link to the jar to install, usually there should be a link to usr/share/java/\$jar.jar and usr/share/java/\$jar-\$version.jar to comply with the Java packaging guidelines. Note that there is no need to specify those particular links if the --java-lib option is used. Options: :: -h --help: show this text -V --version: show the version -p --package=: name of the Debian package which will contain this jar file -e, --set-version=: set the version for the jar, do not use the version declared in the POM file. -r --rules=: path to the file containing the rules to apply when cleaning the POM. Optional, the default location is debian/maven.rules Maven rules are used here to extract the groupId, artifactId and version from the POM file. -l --java-lib: Optional, if given it will install the jar into /usr/share/java to comply with the Debian Java specification. The jar will be installed as /usr/share/java/\$name-\$version.jar and a versionless link /usr/share/java/\$name.jar will point to it, as well as the links installed in /usr/share/maven-repo -n --usj-name=: Optional, the name to use when installing the library in /usr/share/java when --java-lib is used. Defaults to the artifact id found in the POM. -i --usj-version=: Optional, the version to use when installing the library in /usr/share/java when --java-lib is used. Defaults to the version found in the POM. -s --no-usj-versionless: Optional, don't install the versionless link in /usr/share/java. This flag is used only when the -l or --java-lib option is given. -c --classifier=: Optional, the classifier for the jar. Empty by default. -v --verbose: show more information while running -n --no-act: don't actually do anything, just print the results --skip-clean-pom: don't clean the pom, assume that a previous action ran mh_cleanpom with the correct options. mh_cleanpom is run only to extract the groupId, artifactId and version of the jar maven-repo-helper-1.8.5/doc/ref/mh_install.rst0000644000000000000000000001053712247273474016170 0ustar mh\_install: ~~~~~~~~~~~~ Usage: :: mh_install [option]... Reads the file debian/$package.poms and installs each POM file listed in the .poms file, as well as the associated jars - assuming that at least the --artifact option is given in the .poms file for all jars to install. Options: :: -h --help: show this text -V --version: show the version -p --package=: name of the Debian package which will contain all the files to install -e, --set-version=: set the version for all artifacts, do not use the version declared in the POM files. -r --rules=: path to the file containing the rules to apply when cleaning the POM files. Optional, the default location is debian/maven.rules -u --published-rules=: path to the file containing the extra rules to publish in the property debian.mavenRules in the cleaned POM. Optional, the default location is debian/maven.publishedRules -i --ignore-rules=: path to the file containing the rules used to remove certain dependencies from the cleaned POM. Optional, the default location is debian/maven.ignoreRules --no-publish-used-rule: don't publish the rule used to transform a POM's own attributes in debian.mavenRules -v --verbose: show more information while running -n --no-act: don't actually do anything, just print the results The $package.poms file must contain enough information to locate the jar files to install, and to associate them with their POM file. For each POM file associated with a jar, we need to supply at least the --artifact parameter. For example: maven-debian-helper.poms: :: pom.xml --no-parent --has-package-version maven-debian-helper/pom.xml --has-package-version --artifact=maven-debian-helper/target/maven-debian-helper-*.jar --java-lib maven-debian-plugin/pom.xml --has-package-version --artifact=maven-debian-plugin/target/maven-debian-plugin-*.jar --java-lib maven-build-nodocs/pom.xml --has-package-version --artifact=maven-build-nodocs/target/maven-build-nodocs-*.jar --java-lib maven-packager-utils/pom.xml --has-package-version --artifact=maven-packager-utils/target/maven-packager-utils-*.jar --java-lib Here we tell mh\_install to deploy the maven-debian-helper project and its sub projects into /usr/share/maven-repo, and to deploy all jars also into /usr/share/java (--java-lib option) Internally, mh\_installpom is used to install the POM file, mh\_installjar is used to install the jar if --artifact is supplied. If a project or sub-project contains the file src/site/site.xml, then it will be installed with mh\_installsite. The file $package.poms contains the list of POM files and their releated artifacts to install. The format of the $package.poms file is: :: [option]* [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] maven-repo-helper-1.8.5/doc/ref/mh_checkrepo.rst0000644000000000000000000000075212247273474016463 0ustar mh\_checkrepo: ~~~~~~~~~~~~~~ Checks the Maven repository for consistency and prints a report. Where: :: is the location of the Maven repository. Default to /usr/share/maven-repo Options: :: -h --help: show this text -V --version: show the version -v --verbose: show more information while running -o, --output=: 'text' or 'html' to change output format -r, --repository=: directory of Maven repository maven-repo-helper-1.8.5/doc/ref/mh_cleanpom.rst0000644000000000000000000001444012247273474016315 0ustar mh\_cleanpom: ~~~~~~~~~~~~~ Usage: :: mh_cleanpom [option]... [pom] [target] [pom-props] Cleans the POM and prepare it for inclusion in the Maven repository. Also extracts some information from the POM. Where: :: [pom] is the location of the POM file to clean. Default to pom.xml or debian/pom.xml [target] is where the cleaned POM is written to. Default to debian/tmp/pom.xml [pom-props] is where the POM properties file will be written. Default to debian/tmp/pom.properties Options: :: -h --help: show this text -V --version: show the version -p --package=: name of the Debian package which will contain this POM file -h --has-package-version: flag that indicates that this POM has the same version as the package, this helps packagers of depending packages -o --no-parent: don't inherit from a parent POM -k --keep-pom-version: keep the original version of the POM but convert all other versions in dependencies and plugins. If there is a parent POM, keeps its version except when the parent is already registered in the Maven repository -e, --set-version=: set the version for the POM, do not use the version declared in the POM file. -r --rules=: path to the file containing the rules to apply when cleaning the POM. Optional, the default location is debian/maven.rules -R, --extra-rule=: additional rule to apply when cleaning the POM. May occur multiple times, instead of or in addition to -r -u --published-rules=: path to the file containing the extra rules to publish in the property debian.mavenRules in the cleaned POM. Optional, the default location is debian/maven.publishedRules -U, --extra-published-rule=: extra rule to publish. May occur multiple times, instead of or in addition to -u -i --ignore-rules=: path to the file containing the rules used to remove certain dependencies from the cleaned POM. Optional, the default location is debian/maven.ignoreRules -I, --extra-ignore-rule=: additional rule used to remove dependencies from the transformed POM May occur multiple times, instead of or in addition to -i -c --clean-ignore-rules=: path to the file containing the rules use to remove certain dependencies from the cleaned POM, in addition to the ignore rules specified previously. This is useful in situations such as when the Maven clean target requires more dependencies or plugins to ignore than the build target. Optional, it is ignored by default -s --no-rules: don't apply any rules for converting versions, do not even convert versions to the default 'debian' version --no-publish-used-rule: don't publish the rule used to transform a POM's own attributes in debian.mavenRules --keep-elements=: keep the elements listed here even if they are normally removed by the clean operation. Such elements are build,reports,reporting,prerequisites,profiles. -m--maven-repo=: location of the Maven repository, used to force the versions of the Maven plugins used in the current POM file with the versions found in the repository -v --verbose: show more information while running -n --no-act: don't actually do anything, just print the results Cleans a Maven POM and prepare it for inclusion in the Debian repository for Maven. The POM will be normalised, and its parent tag removed if the option --no-parent is given. The version will be replaced by 'debian', unless a special rule applies (see below the discussion about rules). Build, profiles and other build time only sections of the POM will be stripped. If versions are given for a dependency, this version will be replaced by the 'debian' version, or a rule can be given to use a custom version. You can modify those defaults with the help of the rules file. This file should contain the lines with the format: :: [artifactId] [type] [version] [classifier] [scope] where groupId, artifactId, type, version, classifier and scope can be the explicit attribute to match, or can contain a wildcard (\*) for generic matches. Each one of those elements can also be a replace rule, of the form s/// where regex is a regular expression, and replace is the replacement. Substitution groups $1 $2... can be used in the replacement if capture groups () have been used in the regex. The first element is mandatory (groupId), but you can ignore the elements on the right hand side. If the scope is missing, then any scope is matched and left unchanged. If the version missing, then any version will be replaced with 'debian'. If type is missing, then any type is matched and left unchanged. If artifactId is missing, then any artifactId is matched and left unchanged. You can also have comments in this file, it should be a line starting with # Example of a rules file: :: s/commons-(.*)/org.apache.commons.commons$1/ org.itext * * s/1\..*/1.x/ org.itext * * s/2\..*/2.x/ # use the alpha version of plexus-container-default org.codehaus.plexus plexus-container-default jar s/1\.0-alpha.*/1.0-alpha/ This rules file does the following: - all groupIds starting with commons- will have org.apache.commons. prefixed to them - any artifact in the org.itext group with a version number starting with 1. will use the 1.x version - any artifact in the org.itext group with a version number starting with 2. will use the 2.x version - the jar with groupId=org.codehaus.plexus and artifactId=plexus-container-default and a version starting with 1.0-alpha- will use the 1.0-alpha version The default rule (\* \* \* s/.\*/debian/ \*) replaces any version number with the 'debian' version and always applies last if there was no other matches. Another default rule (\* \* maven-plugin \* \*) keeps the version for all plugins as the plugin mechanism requires a version in Maven. Any rules given on the command line (using -R/--extra-rule, -U/--extra-published-rule or -I/--extra-ignore-rule) are applied in the order given, in between the rules given in the rules file (if any) and the default rules. This script is used by mh\_installpom, normally you don't need to use it directly, except if you need to investigate an issue with the cleaning process for a POM file. maven-repo-helper-1.8.5/doc/ref/mh_installpom.txt0000644000000000000000000000620212247273474016705 0ustar ### mh\_installpom: Usage: mh_installpom [option]... [pom] Installs the POM file in /usr/share/maven-repo, at the correct location for Maven. Before installing the POM, it prepares it with mh\_cleanpom. Where: [pom] is the location of the POM file to install. GroupId, artifactId and version will be extracted from this file. Options: -h --help: show this text -V --version: show the version -p --package=: name of the Debian package which will contain this POM file -h --has-package-version: flag that indicates that this POM has the same version as the package, this helps packagers of depending packages -o --no-parent: don't inherit from a parent POM -k --keep-pom-version: keep the original version of the POM but convert all other versions in dependencies and plugins. If there is a parent POM, keeps its version except when the parent is already registered in the Maven repository -e, --set-version=: set the version for the POM, do not use the version declared in the POM file. -r --rules=: path to the file containing the rules to apply when cleaning the POM. Optional, the default location is debian/maven.rules -u --published-rules=: path to the file containing the extra rules to publish in the property debian.mavenRules in the cleaned POM. Optional, the default location is debian/maven.publishedRules -i --ignore-rules=: path to the file containing the rules used to remove certain dependencies from the cleaned POM. Optional, the default location is debian/maven.ignoreRules -c --clean-ignore-rules=: path to the file containing the rules use to remove certain dependencies from the cleaned POM, in addition to the ignore rules specified previously. This is useful in situations such as when the Maven clean target requires more dependencies or plugins to ignore than the build target. Optional, it is ignored by default -s --no-rules: don't apply any rules for converting versions, do not even convert versions to the default 'debian' version --no-publish-used-rule: don't publish the rule used to transform a POM's own attributes in debian.mavenRules --keep-elements=: keep the elements listed here even if they are normally removed by the clean operation. Such elements are build,reports,reporting,prerequisites,profiles. -m--maven-repo=: location of the Maven repository, used to force the versions of the Maven plugins used in the current POM file with the versions found in the repository -v --verbose: show more information while running -n --no-act: don't actually do anything, just print the results -ignore-pom: read the POM but don't install it This script installs the POM file in /usr/share/maven-repo, at the correct location for Maven. Before installing the POM, it prepares it with mh\_cleanpom. debian/maven.rules is used to alter the version properties for the library and its dependencies. Prefer to use mh\_installpoms as it reuses the information defined in debian/$package.poms and avoids repetition. maven-repo-helper-1.8.5/doc/ref/mh_linkjar.txt0000644000000000000000000000523412247273474016161 0ustar ### mh_linkjar: Usage: mh_linkjar [option]... [pom] [dest_jar] [link]... Create symlinks for a jar installed by other means. The symlinks created include links to the jar in /usr/share/maven-repo, at the correct location for Maven. It can also create additional links to the jar, usually located in /usr/share/java. Where: [pom] is the location of the POM associated with the jar to install. GroupId, artifactId and version will be extracted from this file. [dest_jar] is the path of the installed jar, usually located in the usr/share/java folder. [link] is an additional link to the jar to install, usually there should be a link to usr/share/java/\$jar.jar and usr/share/java/\$jar-\$version.jar to comply with the Java packaging guidelines. Note that there is no need to specify those particular links if the --java-lib option is used. Options: -h --help: show this text -V --version: show the version -p --package=: name of the Debian package which will contain this jar file -e, --set-version=: set the version for the jar, do not use the version declared in the POM file. -r --rules=: path to the file containing the rules to apply when cleaning the POM. Optional, the default location is debian/maven.rules Maven rules are used here to extract the groupId, artifactId and version from the POM file. -l --java-lib: Optional, if given it will install the jar into /usr/share/java to comply with the Debian Java specification. The jar will be installed as /usr/share/java/\$name-\$version.jar and a versionless link /usr/share/java/\$name.jar will point to it, as well as the links installed in /usr/share/maven-repo -n --usj-name=: Optional, the name to use when installing the library in /usr/share/java when --java-lib is used. Defaults to the artifact id found in the POM. -i --usj-version=: Optional, the version to use when installing the library in /usr/share/java when --java-lib is used. Defaults to the version found in the POM. -s --no-usj-versionless: Optional, don't install the versionless link in /usr/share/java. This flag is used only when the -l or --java-lib option is given. -c --classifier=: Optional, the classifier for the jar. Empty by default. -v --verbose: show more information while running -n --no-act: don't actually do anything, just print the results --skip-clean-pom: don't clean the pom, assume that a previous action ran mh_cleanpom with the correct options. mh_cleanpom is run only to extract the groupId, artifactId and version of the jar maven-repo-helper-1.8.5/doc/ref/mh_installsite.txt0000644000000000000000000000236612247273474017065 0ustar ### mh\_installsite: Usage: mh_installsite [option]... [pom] [site-file] Installs the site.xml file in /usr/share/maven-repo, at the correct location for Maven. Where: [pom] is the location of the POM associated with the site.xml file to install. GroupId, artifactId and version will be extracted from this file. [site-file] is the location of the site.xml to install. Options: -h --help: show this text -V --version: show the version -p --package=: name of the Debian package which will contain the site file -e, --set-version=: set the version for the POM, do not use the version declared in the POM file. -r --rules=: path to the file containing the rules to apply when cleaning the POM. Optional, the default location is debian/maven.rules Maven rules are used here to extract the groupId, artifactId and version from the POM file. -v --verbose: show more information while running -n --no-act: don't actually do anything, just print the results --skip-clean-pom: don't clean the pom, assume that a previous action ran mh_cleanpom with the correct options. mh_cleanpom is run only to extract the groupId, artifactId and version of the jar maven-repo-helper-1.8.5/doc/ref/mh_patchpom.rst0000644000000000000000000000614012247273474016330 0ustar mh\_patchpom: ~~~~~~~~~~~~~ Usage: :: mh_patchpom [option]... [pom] [backup] Patches one POM file using the Maven dependency rules. Where: :: [pom] is the location of the POM file to transform. Default to pom.xml [backup] is the backup file for the pom. Default to pom.xml.save Options: :: -h --help: show this text -V --version: show the version -p --package=: name of the Debian package containing this library -o --no-parent: don't inherit from a parent POM -k --keep-pom-version: keep the original version of the POM but convert all other versions in dependencies and plugins. If there is a parent POM, keeps its version except when the parent is already registered in the Maven repository -e, --set-version=: set the version for the POM, do not use the version declared in the POM file. -r --rules=: path to the file containing the rules to apply when cleaning the POM. Optional, the default location is debian/maven.rules -R, --extra-rule=: additional rule to apply when cleaning the POM. May occur multiple times, instead of or in addition to -r -u --published-rules=: path to the file containing the extra rules to publish in the property debian.mavenRules in the cleaned POM. Optional, the default location is debian/maven.publishedRules -U, --extra-published-rule=: extra rule to publish. May occur multiple times, instead of or in addition to -u -i --ignore-rules=: path to the file containing the rules used to remove certain dependencies from the cleaned POM. Optional, the default location is debian/maven.ignoreRules -I, --extra-ignore-rule=: additional rule used to remove dependencies from the transformed POM May occur multiple times, instead of or in addition to -i -c --clean-ignore-rules=: path to the file containing the rules use to remove certain dependencies from the cleaned POM, in addition to the ignore rules specified previously. This is useful in situations such as when the Maven clean target requires more dependencies or plugins to ignore than the build target. Optional, it is ignored by default -s --no-rules: don't apply any rules for converting versions, do not even convert versions to the default 'debian' version --no-publish-used-rule: don't publish the rule used to transform a POM's own attributes in debian.mavenRules -d --debian-build: transform during a Debian build, which means that some POM elements will be removed -b --build-no-docs: if the build doesn't need to build documentation, use this option to remove some POM elements (in particular plugins) which are useless here and may require extra dependencies and make the packaging harder. -m--maven-repo=: location of the Maven repository, used to force the versions of the Maven plugins used in the current POM file with the versions found in the repository -v --verbose: show more information while running -n --no-act: don't actually do anything, just print the results maven-repo-helper-1.8.5/doc/ref/mh_patchpom.txt0000644000000000000000000000611212247273474016336 0ustar ### mh\_patchpom: Usage: mh_patchpom [option]... [pom] [backup] Patches one POM file using the Maven dependency rules. Where: [pom] is the location of the POM file to transform. Default to pom.xml [backup] is the backup file for the pom. Default to pom.xml.save Options: -h --help: show this text -V --version: show the version -p --package=: name of the Debian package containing this library -o --no-parent: don't inherit from a parent POM -k --keep-pom-version: keep the original version of the POM but convert all other versions in dependencies and plugins. If there is a parent POM, keeps its version except when the parent is already registered in the Maven repository -e, --set-version=: set the version for the POM, do not use the version declared in the POM file. -r --rules=: path to the file containing the rules to apply when cleaning the POM. Optional, the default location is debian/maven.rules -R, --extra-rule=: additional rule to apply when cleaning the POM. May occur multiple times, instead of or in addition to -r -u --published-rules=: path to the file containing the extra rules to publish in the property debian.mavenRules in the cleaned POM. Optional, the default location is debian/maven.publishedRules -U, --extra-published-rule=: extra rule to publish. May occur multiple times, instead of or in addition to -u -i --ignore-rules=: path to the file containing the rules used to remove certain dependencies from the cleaned POM. Optional, the default location is debian/maven.ignoreRules -I, --extra-ignore-rule=: additional rule used to remove dependencies from the transformed POM May occur multiple times, instead of or in addition to -i -c --clean-ignore-rules=: path to the file containing the rules use to remove certain dependencies from the cleaned POM, in addition to the ignore rules specified previously. This is useful in situations such as when the Maven clean target requires more dependencies or plugins to ignore than the build target. Optional, it is ignored by default -s --no-rules: don't apply any rules for converting versions, do not even convert versions to the default 'debian' version --no-publish-used-rule: don't publish the rule used to transform a POM's own attributes in debian.mavenRules -d --debian-build: transform during a Debian build, which means that some POM elements will be removed -b --build-no-docs: if the build doesn't need to build documentation, use this option to remove some POM elements (in particular plugins) which are useless here and may require extra dependencies and make the packaging harder. -m--maven-repo=: location of the Maven repository, used to force the versions of the Maven plugins used in the current POM file with the versions found in the repository -v --verbose: show more information while running -n --no-act: don't actually do anything, just print the results maven-repo-helper-1.8.5/doc/tutorial.txt0000644000000000000000000004540112247273474015132 0ustar [repository specification](repository.html) | [reference](reference.html) | [tutorial](tutorial.html) Packaging Java and Maven projects with Maven Repo Helper ======================================================== The maven-repo-helper package provides tools for installing and maintaining Maven POMs and jars installed in /usr/share/maven-repo. Maven is a comprehensive build tool for Java and other languages based around the concept of plugins and a repository accessible normally from internet (a la CPAN), and providing access to the libraries used by a project. To satisfy the requirement that all software must be built from the Debian repository and that no access to Internet is allowed during a build, we have re-created a Maven repository for Debian. This repository is located in /usr/share/maven-repo and Maven POM files installed there must follow some special requirements. The Debian policy mandates that Java libraries are installed in /usr/share/java, so we have many Java libraries have already been packaged in Debian, but they don't have any Maven descriptors (POMs) associated with them. maven-repo-helper can help by installing those libraries also in /usr/share/maven-repo with their POM files. The Maven repository maintained by Debian has some special characteristics which make it difficult to use directly upstream POM files without any changes. To allow a smooth upgrade of Java libraries, we create both native and Debian versions of the artifacts, and replace all versions in the dependencies with Debian versions - see the [repository specification](repository.html) document for more informations about this process. In addition, entries in the POM file which are not needed anymore, such as build information, are removed. mh\_make provides the scripts mh\_patchpom and mh\_cleanpom which patch dependencies versions and clean up the POM file respectively. Other scripts often make use of those two scripts to provide more advanced functionality. maven-repo-helper has no dependency on Maven, so it can be used for any library, including libraries used by Maven itself. It provides the foundations for maven-debian-helper. Its goal is to manage the /usr/share/maven-repo folder properly, and cannot be used alone to build a Java library from source. You will normally use it either with Ant (started by a cdbs rule or dh 7 rule or anything you like), or with javahelper which will take care of building the binaries for your project. **Important:** If you want your build to use Maven itself, then run mh\_make from the maven-debian-helper package on the upstream sources. mh\_make will guide you for that process and generate all necessary debian files for you. You can also use mh\_make --ant to speed up the packaging of a project which uses Ant as the build tool and needs to install its artifacts into the Maven repository. Quick start =========== This section presents some of the recommanded packaging styles: DH 7 + Ant + maven-repo-helper ------------------------------ The build uses dh 7 style, it runs Ant for the build and uses maven-repo-helper to install all jars both in /usr/share/java and in /usr/share/maven-repo with the POM files. debian/control: Source: bnd Section: java Priority: optional Maintainer: Debian Java Maintainers Uploaders: Ludovic Claude Build-Depends: debhelper (>= 8), maven-repo-helper (>= 1.7), default-jdk Build-Depends-Indep: junit, libosgi-ee-minimum-api-java (>= 1.2.1) Standards-Version: 3.9.2 Homepage: http://www.aqute.biz/Code/Bnd Package: bnd Architecture: all Depends: ${misc:Depends} Description: A tool to create and diagnose OSGi R4 bundles [...] Note the Build-Depends on debhelper and maven-repo-helper debian/rules: #!/usr/bin/make -f export JAVA_HOME=/usr/lib/jvm/default-java %: dh $@ --buildsystem=ant --with maven_repo_helper We use here dh 7 for the build, with ant as the build system, and the maven_repo_helper plugin which will install all generated artifacts in the Maven repository. Ant is run with the upstream build.xml file and the default target. bnd.poms: biz.aQute.bndlib/tmp/pom.xml --has-package-version --artifact=biz.aQute.bndlib/tmp/biz.aQute.bndlib.jar --java-lib --usj-name=bndlib Deploy the jar built in biz.aQute.bndlib/tmp folder (--artifact option) as bndlib.jar (--usj-name option) in /usr/share/java (--java-lib option) and deploy it as well in the Maven repository. We use the POM file created by the build (biz.aQute.bndlib/tmp/pom.xml) as it contains the metadata for the bndlib jar. The option --has-package-version tells maven-repo-helper that the version of the POM matches the version of the Debian package, which is a useful hint for mh\_make when packaging another project which uses this library. maven.rules: biz.aQute s/bnd/bndlib/ Change the name of the artifact from bnd to bndlib in the Maven POM. The current version of bndlib will be replaced by a generic 'debian' version. You can use mh\_lspoms from the maven-debian-helper package to help you locate POM files in your sources and generate both the .poms and maven.rules files. DH 7 + Ant + maven-ant-helper + maven-repo-helper ------------------------------------------------- A variant of the previous solution, where we don't use the upstream build script, but an Ant script which works on something which looks like a Maven project and tries to emulate Maven as best as it can. This is quite handy when you are working on a package used by Maven itself and cannot use Maven during the build. debian/control: Source: plexus-utils2 Section: java Priority: optional Maintainer: Debian Java Maintainers Uploaders: Ludovic Claude Build-Depends: debhelper (>= 7), default-jdk, maven-repo-helper (>= 1.7), ant-optional, maven-ant-helper (>= 7) Build-Depends-Indep: libplexus-parent-java (>= 2.0.6), junit (>= 3.8.2), default-jdk-doc Standards-Version: 3.9.2 Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/plexus-utils2 Vcs-Browser: http://svn.debian.org/wsvn/pkg-java/trunk/plexus-utils2 Homepage: http://plexus.codehaus.org/plexus-utils Package: libplexus-utils2-java Architecture: all Depends: ${misc:Depends}, libplexus-parent-java (>= 2.0.6) Suggests: libplexus-utils2-java-doc Description: Plexus Common Utilities [...] Package: libplexus-utils2-java-doc Architecture: all Section: doc Depends: ${misc:Depends}, default-jdk-doc Suggests: libplexus-utils2-java Description: Documentation for Plexus Common Utilities [...] We define a binary package which will contain the jars and the fragment of the Maven repository for this package (libplexus-utils2-java), and a documentation package containing the Javadoc folder (installed in /usr/share/doc) and the Javadoc jar installed in the Maven repository (libplexus-utils2-java-doc). Note the Build-Depends on debhelper, maven-repo-helper and maven-ant-helper. debian/rules: #!/usr/bin/make -f DEB_SOURCE_PACKAGE := $(shell dpkg-parsechangelog | grep '^Source:' | cut -f 2 -d ' ') DEB_UPSTREAM_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ' | cut -d: -f2- | sed 's/-[^-]*$$//') export JAVA_HOME=/usr/lib/jvm/default-java export CLASSPATH=$(shell for jar in `cat debian/build-classpath`; do if [ -f "$$jar" ]; then echo -n "$${jar}:"; fi; done) export ANT_ARGS=-Dbasedir=$(realpath .) -Dpackage=$(DEB_SOURCE_PACKAGE) -f /usr/share/maven-ant-helper/maven-build.xml %: dh $@ --buildsystem=ant --with maven_repo_helper We use here dh 7 for the build, with ant as the build system, and the maven\_repo\_helper plugin which will install all generated artifacts in the Maven repository We configure ant to use the maven-ant-helper build script (/usr/share/maven-ant-helper/maven-build.xml) and the classpath defined in debian/build-classpath libplexus-utils2-java.poms: pom.xml --has-package-version --artifact=target/plexus-utils-*.jar --java-lib --usj-name=plexus-utils2 Install the jar as plexus-utils2.jar (--usj-name option) in /usr/share/java (--java-lib option) and install it as well in /usr/share/maven-repo with its POM file. The jar is coming from the target/ folder used by Maven (and the maven-repo-helper script) for its builds, and we use a glob pattern (*) to match any version of the jar (--artifact option). The option --has-package-version tells maven-repo-helper that the version of the POM matches the version of the Debian package, which is a useful hint for mh\_make when packaging another project which uses this library. libplexus-utils2-java-doc.poms: target/plexus-utils.javadoc.pom --has-package-version --artifact=target/plexus-utils.javadoc.jar --classifier=javadoc --ignore-pom Install the javadoc jar into /usr/share/maven-repo, without a POM file (--ignore-pom option) because that's the way Maven works - javadoc jars have no dedicated POM files for them. Instead, there is a classifier which tells Maven that this jar contains Javadoc (--classifier option). The javadoc jar is packaged in libplexus-utils2-java-doc package. libplexus-utils2-java-doc.install: target/apidocs/* usr/share/doc/libplexus-utils2-java/api Install the javadoc folder into /usr/share/doc/libplexus-utils2-java/api. This folder is packaged in libplexus-utils2-java-doc package. maven.rules: junit junit jar s/3\..*/3.x/ * * org.codehaus.plexus plexus-utils jar s/2\..*/2.x/ * * org.codehaus.plexus plexus pom s/2\..*/2.x/ * * Adapt versions for Debian in the Maven POMs, as it ease small upgrades. - junit:junit jar dependencies with a version starting with 3. will use version 3.x instead (and libjunit-java contains a similar rule which install version 3.x in the Maven repository) - org.codehaus.plexus:plexus-utils jar dependencies with a version starting with 2. will use version 2.x instead - org.codehaus.plexus:plexus pom dependencies with a version starting with 2. will use version 2.x instead DH 7 + javahelper + maven-repo-helper ------------------------------------- debian/control: Source: httpunit Maintainer: Debian Java Maintainers Uploaders: Miguel Landaeta , Michael Koch Section: java Priority: optional Build-Depends: default-jdk, ant (>= 1.7.0-6), javahelper (>= 0.28), debhelper (>= 7.0.50~), rhino (>= 1.7R1-2), libjtidy-java (>= 7+svn20070309-2), libgnujaf-java (>= 1.1.1-4), junit (>= 3.8.2), libgnumail-java (>= 1.1.2-2), libservlet2.4-java (>= 5.0.30-8), libxerces2-java (>= 2.9.1-2), libnekohtml-java (>= 0.9.5+dfsg-1.1), maven-repo-helper (>= 1.7) Standards-Version: 3.9.2 Homepage: http://httpunit.org/ Vcs-Browser: http://svn.debian.org/wsvn/pkg-java/trunk/httpunit/ Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/httpunit Package: libhttpunit-java Architecture: all Section: java Priority: optional Depends: ${java:Depends}, libxerces2-java (>= 2.9.1-2), libnekohtml-java (>= 0.9.5+dfsg-1.1), rhino (>= 1.7R1-2), libjtidy-java (>= 7+svn20070309-2), libservlet2.4-java (>= 5.0.30-8), ${misc:Depends} Recommends: junit (>= 3.8.2) Suggests: libhttpunit-java-doc (= ${binary:Version}) Description: automated web site testing toolkit [...] Note the Build-Depends on debhelper, javahelper, ant and maven-repo-helper debian/rules: #!/usr/bin/make -f %: dh --with javahelper --with jh_maven_repo_helper $@ We use here dh 7 for the build, with javahelper as the build system (which in turn will launch Ant because build.xml exists), and the jh\_maven\_repo\_helper plugin which is adapted to work with javahelper and will install all generated artifacts in the Maven repository. libhttpunit-java.jlibs: lib/httpunit.jar We tell javahelper to install the httpunit.jar file located in lib into /usr/share/java libhttpunit-java.poms: debian/pom.xml --usj-name=httpunit Create a link for the jar /usr/share/java/httpunit.jar into the Maven repository and use debian/pom.xml as its companion metadata file CDBS + maven-repo-helper using mh\_install ----------------------------------------- debian/control: Source: maven-debian-helper Section: java Priority: optional Maintainer: Debian Java Maintainers Uploaders: Torsten Werner , Ludovic Claude , Michael Koch , Damien Raude-Morvan Build-Depends: cdbs, debhelper (>= 7), default-jdk, maven-ant-helper (>= 7), maven-repo-helper (>= 1.7), ant-optional, help2man Build-Depends-Indep: junit, libmaven-plugin-tools-java, libplexus-velocity-java Standards-Version: 3.9.2 Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/maven-debian-helper Vcs-Browser: http://svn.debian.org/wsvn/pkg-java/trunk/maven-debian-helper/ Homepage: http://wiki.debian.org/Java/MavenBuilder Package: maven-debian-helper Architecture: all Depends: ${misc:Depends}, default-jdk, maven-repo-helper (>= 1.5), maven2 (>= 2.2.1-5), libmaven-clean-plugin-java, libmaven-resources-plugin-java, libmaven-compiler-plugin-java, libmaven-jar-plugin-java, libmaven-site-plugin-java, libsurefire-java, velocity, libplexus-velocity-java Suggests: libmaven-javadoc-plugin-java, apt-file, devscripts, subversion Description: Helper tools for building Debian packages with Maven [...] Note the Build-Depends on cdbs and maven-repo-helper. maven-ant-helper and ant-optional are also needed for this package, as it's quite complex but this is not important for this tutorial. debian/rules: #!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/ant.mk PACKAGE := $(DEB_SOURCE_PACKAGE) VERSION := $(shell echo ${DEB_UPSTREAM_VERSION} | sed -r 's/([0-9\.]+).*/\1/') JAVA_HOME := /usr/lib/jvm/default-java DEB_JARS := ant-nodeps classworlds maven-core maven-artifact maven-artifact-manager maven-model \ maven-compat maven-plugin-api maven-project maven-scm-api velocity file-management plexus-utils \ plexus-container-default-alpha maven-repo-helper DEB_ANT_BUILD_TARGET := package DEB_ANT_BUILDFILE := debian/build.xml DEB_ANT_ARGS := -Dpackage=$(PACKAGE) -Dbin.package=$(PACKAGE) API_DOCS := target/api install/$(PACKAGE):: mh_install -p$(PACKAGE) clean:: mh_clean This is a simplified version of debian/rules, which shows how to use the mh\_install and mh\_clean scripts from maven-repo-helper with CDBS and Ant. mh\_install performs the installation of the built jars into /usr/share/maven-repo and /usr/share/java. It uses the configuration defined in maven-debian-helper.poms. mh\_clean does the clean up of files left behind during the execution of mh\_install. maven-debian-helper.poms: pom.xml --no-parent --has-package-version maven-debian-helper/pom.xml --has-package-version --artifact=maven-debian-helper/target/maven-debian-helper-*.jar --java-lib maven-debian-plugin/pom.xml --has-package-version --artifact=maven-debian-plugin/target/maven-debian-plugin-*.jar --java-lib maven-build-nodocs/pom.xml --has-package-version --artifact=maven-build-nodocs/target/maven-build-nodocs-*.jar --java-lib maven-packager-utils/pom.xml --has-package-version --artifact=maven-packager-utils/target/maven-packager-utils-*.jar --java-lib Here we tell mh\_install to deploy the maven-debian-helper project and its sub projects into /usr/share/maven-repo, and to deploy all jars also into /usr/share/java (--java-lib option) CDBS + maven-repo-helper using mh\_installpoms and mh\_installjar ----------------------------------------------------------------- debian/control: Source: plexus-io Section: java Priority: optional Maintainer: Debian Java Maintainers Uploaders: Torsten Werner , Ludovic Claude Build-Depends: debhelper (>= 5), cdbs (>= 0.4.5.3), default-jdk Build-Depends-Indep: maven-repo-helper (>= 1.7), maven-ant-helper (>= 7), ant, ant-optional, libplexus-utils-java, libplexus-containers-java Standards-Version: 3.8.1 Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/plexus-io Vcs-Browser: http://svn.debian.org/wsvn/pkg-java/trunk/plexus-io/ Homepage: http://plexus.codehaus.org/plexus-components/plexus-io/ Package: libplexus-io-java Architecture: all Depends: ${misc:Depends}, libplexus-utils-java, libplexus-containers-java Description: Plexus IO Components [...] Note the Build-Depends on cdbs and maven-repo-helper. debian/rules: #!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/ant.mk PACKAGE := $(DEB_SOURCE_PACKAGE) VERSION := $(DEB_UPSTREAM_VERSION) JAVA_HOME := /usr/lib/jvm/default-java DEB_JARS := ant-nodeps plexus-utils plexus-container-default DEB_ANT_BUILD_TARGET := package #javadoc DEB_ANT_BUILDFILE := /usr/share/maven-ant-helper/maven-build.xml DEB_ANT_ARGS := -Dbasedir=$(realpath .) -Dpackage=$(PACKAGE) -Dversion=$(VERSION) API_DOCS := build/api binary-post-install/lib$(PACKAGE)-java:: mh_installpoms -plib$(PACKAGE)-java mh_installjar -plib$(PACKAGE)-java -l pom.xml build/$(PACKAGE)-$(VERSION).jar clean:: mh_clean No patches for the POM files are needed, all is taken care of by the mh\_installpom script (which uses mh\_cleanpom) mh\_installpoms will install all POM files registered in debian/lib$package-java.pom into /usr/share/maven-repo, mh\_installjar will install the jar file associated with the POM into /usr/share/maven-repo and also add a link to the jar in /usr/share/java, with and without the version debian/libplexus-io-java.pom pom.xml --no-parent It simply lists the pom files in the source tree which need to be installed in the repository, and indicates with the --no-parent option that if the POM inherits from a parent POM, then this inheritance relationship will be removed in the cleaned POM. Removing the parent inheritence can often simplify the packaging, as the parent POM mostly does not contain any useful information - we need only the list of dependencies in our repository, the other details for the build are irrelevant. There is less configuration here because we are using the low-level mh_installpoms and mh_installjar scripts which place the configuration on their command line options. Typical workflow for packaging a project from source ---------------------------------------------------- 1. Get the original sources and unpack them, copy the debian/ folder if you are working on an existing package. 1. mh\_make --ant 1. edit debian/rules (to fix the last remaining packaging details) 1. edit debian/control (to add maven-repo-helper to Build-Depends: ) maven-repo-helper-1.8.5/doc/reference5.rst0000644000000000000000000000005312247273474015275 0ustar Debhelper 7 plugins: -------------------- maven-repo-helper-1.8.5/debian/0000755000000000000000000000000012247273474013177 5ustar maven-repo-helper-1.8.5/debian/build.xml0000644000000000000000000000701612247273474015024 0ustar maven-repo-helper-1.8.5/debian/maven.rules0000644000000000000000000000003512247273474015357 0ustar junit junit jar s/3\..*/3.x/ maven-repo-helper-1.8.5/debian/README.Debian0000644000000000000000000000066312247273474015245 0ustar This package contains some essential tools for building Debian packages where upstream uses Maven as its build tool, or where upstream uses another build tool (Ant...) but you want to deploy the jars into the Debian Maven repository at /usr/share/maven-repo with the necessary metadata - in Maven terms, POM files - and make them available to other projects. A tutorial is available at /usr/share/doc/maven-repo-helper/tutorial.html maven-repo-helper-1.8.5/debian/rules0000755000000000000000000001114712247273474014263 0ustar #!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/ant.mk PACKAGE := $(DEB_SOURCE_PACKAGE) VERSION := $(DEB_UPSTREAM_VERSION) JAVA_HOME := /usr/lib/jvm/default-java DEB_JARS := ant-junit stax-api xml-apis junit4 ant-junit4 DEB_ANT_BUILD_TARGET := package DEB_ANT_BUILDFILE := ./debian/build.xml DEB_ANT_ARGS := -Dpackage=$(PACKAGE) -Dversion=$(VERSION) CLASSPATH := /usr/share/java/ant-junit.jar:/usr/share/java/stax-api.jar:/usr/share/java/stax.jar:/usr/share/java/xml-apis.jar JAVA_OPTIONS := -Djavax.xml.stream.XMLOutputFactory=com.bea.xml.stream.XMLOutputFactoryBase # Generation of man pages SCRIPTS := $(wildcard src/main/bin/mh_*) MAN_PAGES := $(addprefix debian/.mh/doc/,$(addsuffix .1, $(notdir $(SCRIPTS)))) mh_checkrepo_description = "Checks the Maven repository." mh_clean_description = "Cleans the temporary files created by the other mh_* utilities." mh_cleanpom_description = "Cleans a POM file." mh_genrules_description = "Generates the debian/rules file with Maven support." mh_install_description = "Installs the POM files and the artifacts into /usr/share/maven-repo." mh_installjar_description = "Installs a jar into /usr/share/maven-repo." mh_installpom_description = "Installs a POM file into /usr/share/maven-repo." mh_installpoms_description = "Installs all POMs for the package into /usr/share/maven-repo." mh_installsite_description = "Installs site.xml into /usr/share/maven-repo." mh_linkjar_description = "Creates a link in /usr/share/maven-repo for an existing jar." mh_linkjars_description = "Creates links in /usr/share/maven-repo for all jars." mh_linkrepojar_description = "Creates a link from a jar already installed in /usr/share/maven-repo." mh_lspoms_description = "Generates a list of POMs for the package." mh_patchpom_description = "Patches one POM file using the Maven dependency rules." mh_patchpoms_description = "Patches the POM files using the Maven dependency rules." mh_unpatchpoms_description = "Undo the patches on the POM files." debian/.mh/mh_lib.sh : src/main/share/mh_lib.sh mkdir -p debian/.mh cp src/main/share/mh_lib.sh debian/.mh/mh_lib.sh debian/.mh/mh_% : src/main/bin/mh_% debian/.mh/mh_lib.sh mkdir -p debian/.mh cp $< $@ perl -i -pe 's,\. /usr/share/maven-repo-helper/mh_lib.sh,\. debian/.mh/mh_lib.sh,' $@ chmod +x $@ debian/.mh/doc: mkdir -p debian/.mh/doc rst2html --title="Maven Repo Helper tutorial" --stylesheet-path=doc/style.css doc/tutorial.rst debian/.mh/doc/tutorial.html cat doc/reference.rst doc/ref/mh_cleanpom.rst doc/ref/mh_installpom.rst doc/ref/mh_installpoms.rst doc/ref/mh_patchpom.rst \ doc/ref/mh_patchpoms.rst doc/ref/mh_unpatchpoms.rst doc/reference2.rst doc/ref/mh_installjar.rst \ doc/ref/mh_linkjar.rst doc/ref/mh_linkjars.rst doc/reference3.rst doc/ref/mh_clean.rst doc/ref/mh_installsite.rst \ doc/ref/mh_install.rst doc/reference4.rst doc/ref/mh_checkrepo.rst doc/reference5.rst \ doc/ref/dh_with_maven_repo_helper.rst doc/ref/dh_with_jh_maven_repo_helper.rst > debian/.mh/doc/reference.rst rst2html --title="Maven Repo Helper reference" --stylesheet-path=doc/style.css debian/.mh/doc/reference.rst debian/.mh/doc/reference.html rst2html --title="Maven Repo Helper repository specification" --stylesheet-path=doc/style.css doc/repository.rst debian/.mh/doc/repository.html debian/.mh/doc/mh_%.1 : debian/.mh/mh_% help2man -N -n $(mh_$*_description) -o $@ $< man-pages: debian/.mh/doc $(MAN_PAGES) build/$(PACKAGE):: man-pages binary-post-install/$(PACKAGE):: mv build/$(PACKAGE)-$(VERSION).jar build/$(PACKAGE)-debian.jar dh_install -p$(PACKAGE) build/$(PACKAGE)-debian.jar /usr/share/maven-repo/org/debian/maven/$(PACKAGE)/debian dh_install -p$(PACKAGE) src/main/bin/mh_* /usr/bin dh_install -p$(PACKAGE) src/main/share/mh_* /usr/share/$(PACKAGE) dh_install -p$(PACKAGE) src/main/share/*.pm /usr/share/perl5/Debian/Debhelper/Sequence dh_link -p$(PACKAGE) /usr/share/maven-repo/org/debian/maven/$(PACKAGE)/debian/$(PACKAGE)-debian.jar /usr/share/java/$(PACKAGE).jar dh_installman $(MAN_PAGES) mkdir -p debian/.mh java -cp build/$(PACKAGE)-debian.jar:$(CLASSPATH) $(JAVA_OPTIONS) org.debian.maven.repo.POMCleaner --no-parent --has-package-version --rules=debian/maven.rules pom.xml \ debian/.mh/$(PACKAGE)-debian.pom debian/.mh/pom.properties dh_install -p$(PACKAGE) --sourcedir=debian/.mh $(PACKAGE)-debian.pom \ usr/share/maven-repo/org/debian/maven/$(PACKAGE)/debian dh_install -p$(PACKAGE) --sourcedir=debian/.mh/doc tutorial.html reference.html repository.html usr/share/doc/maven-repo-helper clean:: -rm -rf debian/.mh maven-repo-helper-1.8.5/debian/changelog0000644000000000000000000003667212247273474015067 0ustar maven-repo-helper (1.8.5) unstable; urgency=low * Team upload. [ Emmanuel Bourg ] * Build depend on debhelper 9 * Removed the Maven presentation from the package description (Closes: #704092) * Added several methods to org.debian.maven.repo.Dependency to check the type of the artifact * Removed the no longer used Preconditions class * The API changes break the compatibility with maven-debian-helper (<= 1.6.5) * debian/rules: Added ant-junit4.jar to the classpath to fix the test failures * Stop the build on test failures [ tony mancill ] * Bump Standards-Version to 3.9.5. -- tony mancill Mon, 02 Dec 2013 22:10:14 -0800 maven-repo-helper (1.8.4) unstable; urgency=low * Fixed a regression in the pom parser (Closes: #712658) * The name of the pom is now displayed when a parsing error occurs -- Emmanuel Bourg Wed, 07 Aug 2013 17:53:13 +0200 maven-repo-helper (1.8.3) unstable; urgency=low * Fixed the usage of the debhelper functions in jh_maven_repo_helper.pm. Thanks to Wolodja Wentland for the fix (Closes: #709446) -- Emmanuel Bourg Thu, 23 May 2013 15:28:46 +0200 maven-repo-helper (1.8.2) unstable; urgency=low * Fixed the POM reader to handle properly character chunks (Closes: #693234, #688085) * Enabled more tests by adding the missing @Test annotations * Updated Standards-Version to 3.9.4 (no changes) * Added junit4 to the classpath * debian/copyright: Updated the Format URI to 1.0 * Upload to unstable -- Emmanuel Bourg Tue, 21 May 2013 00:30:12 +0200 maven-repo-helper (1.8.1) experimental; urgency=low [ Emmanuel Bourg ] * Replaces tabs with spaces in Java files * Replaced StringBuffers with StringBuilders * Minor code changes (for each loops, indexOf->contains) [ Thomas Koch ] * Add Preconditions util class * fix NPE. Thx to Emmanuel Bourg -- Thomas Koch Thu, 04 Apr 2013 20:23:31 +0200 maven-repo-helper (1.8) experimental; urgency=low [Ludovic Claude] * Move repository to Git, thanks to Thomas Koch. (Closes: #644259) * Convert Markdown documentation into reStructuredText format, as markdown package is not much maintained and not officially supported in Ubuntu. * d/control: - Bump Standards-Version to 3.9.3 (no changes needed). - update Vcs-Browser and Vcs-Git fields following move to Git - Build-Depends: replace dependency on markdown by python-docutils - use junit4 instead of junit [Thomas Kock] * massive code refactorings and cleanups -- Thomas Koch Thu, 28 March 2013 11:45:21 +0200 maven-repo-helper (1.7.1) unstable; urgency=low * Build with Java 5, use generics. (Closes: #644260) * Fix resolution of versions from dependency management * Fix ignore modules in a POM transformation -- Ludovic Claude Mon, 02 Jan 2012 20:27:26 +0100 maven-repo-helper (1.7) unstable; urgency=low * add --site-xml= option to mh_install and in the .poms file to explicitly define the location for site.xml. Warning: this forces existing packages to add this option if they need to install site.xml * update the version in the POM and in the documentation (Closes: #644258) * run the unit tests when building the package, fix broken tests after the introduction of relativePath on the parent element of cleaned POM files. * d/control: add ant-optional, junit, libxmlunit-java, libcommons-io-java to Build-Depend-Indep * d/copyright: update fields to match latest DEP5 spec. -- Ludovic Claude Tue, 01 Nov 2011 16:32:39 +0200 maven-repo-helper (1.6) unstable; urgency=low [ Ludovic Claude ] * Add tutorial, reference and repository specification in documentation * Update options on mh_installpom and mh_installpoms, to use the new arguments added to mh_cleanpom * Add Build-Depend on markdown to build the doc * Add support for packages built with dh 7 and javahelper: use the following line in your rules file: dh $@ --with javahelper --with jh_maven_repo_helper This will build the package with javahelper, and the resulting jar will be installed in the Maven repository (you need of course the .poms file and the POM files in your package). * Add mh_linkjars to link the jars listed in the .poms file, this is used by the jh_maven_repo_helper plugin for dh 7. * Deprecate mh_installjar -i option and replace it with -j to avoid conflicts with -i/--ignore-rules option used elsewhere. * Review all options passed to the mh_* scripts, in particular --set-version for mh_installjar (Closes: #640730) [ Damien Raude-Morvan ] * mh_checkrepo: Fix error when launching without any param. -- Ludovic Claude Mon, 26 Sep 2011 22:55:09 +0100 maven-repo-helper (1.5.2) unstable; urgency=low [ Ludovic Claude ] * Match jar with bundle as they are equivalent [ Damien Raude-Morvan ] * Keep relativePath attribute on parent pom. * d/control: Fix typo in package description (Closes: #617438). * src/main/java/org/debian/maven/repo/RepositoryReportWriter.java: Add a hack to change output of Maven repository checker. * Bump Standards-Version to 3.9.2 (no changes needed). -- Damien Raude-Morvan Tue, 16 Aug 2011 19:28:03 +0200 maven-repo-helper (1.5.1) unstable; urgency=low * Upload to unstable. -- Torsten Werner Wed, 09 Feb 2011 21:39:12 +0100 maven-repo-helper (1.5) experimental; urgency=low * Create mh_installsite to install site.xml into the Maven repository, and integrate it with mh_install * Avoid duplication between rules in maven.rules and maven.publishedRules, as well as between maven.ignoreRules and maven.cleanIgnoreRules * Fix ignore modules, make it work in more cases. * mh_clean: clean also files listed in .mh_clean, similar to what jh_clean does. * add support for dh 7 and ant builds: use the following line in your rules file: dh $@ --with ant --with maven_repo_helper -- Ludovic Claude Thu, 11 Nov 2010 18:49:49 +0100 maven-repo-helper (1.4) experimental; urgency=low * Better support for inserting properties in the transformed or cleaned POM files. Avoid duplicate properties and allow definition of new properties. * add support for --has-package-version and --keep-elements in the .poms file, for mh_install add --artifact, --java-lib, --usj-name, --usj-version, --no-usj-versionless, --dest-jar * update README.Debian and document the new options. * change license from BSD to Apache 2.0, there's no need to have so many different licenses in this package, MIT and Apache2.0 are already used. * Keep comments in the POM files as much as possible (Closes: #574045) * mh_cleanpom: keep , and elements if the type of the POM file is 'pom'. * mh_cleanpom, mh_patchpom: plugin configuration elements containing dependencies such as: org.apache:apache-jar-resource-bundle:1.x are detected and rules are applied to them * mh_patchpom: --keep-pom-version option keeps the version of the parent POM except when the parent is already registered in the Maven repository * new mh_install command to install in one go the pom files and all jars in the Maven repository -- Ludovic Claude Fri, 17 Sep 2010 00:07:36 +0200 maven-repo-helper (1.3) experimental; urgency=low [ Peter Collingbourne ] * Document the correct order of attributes in rules files * Escape all $ characters in usage messages * Fix a long option quoting bug * Add support for extra rule options on the command line * Add a --no-publish-used-rule option [ Ludovic Claude ] * debian/control: Update Standards-Version to 3.9.1, no changes * mh_transformpoms: Remove warning about missing parent dependency when no-parent option is already used * Dependency class: make it Comparable, to allow easy sorting of dependencies. * mh_cleanpoms: rules defined in --clean-ignore-rules (or debian/maven.cleanIgnoreRules) are used in addition to the rules defined in --ignore-rules (or debian/maven.ignoreRules), so there is no need anymore to duplicate the list of rules to ignore when --clean-ignore-rules is used. * Removed small bugs in mh_make (Closes: #591513) -- Ludovic Claude Thu, 16 Sep 2010 23:18:57 +0200 maven-repo-helper (1.2) unstable; urgency=low * Fix 'illegal NCName' error when gcj is used to run the mh_* scripts * Expand more Maven properties in POM files. * Support syntax in tag * Handle better configuration elements in plugins (ignore them) * Add support for plugin elements in tags * Add support for dependency classifiers * Add support for tags and their plugins * Fix some XML issues when gcj is used * Add new unit tests and fix several small issues * Insert the original versions of the dependencies in the cleaned poms, this will help a future mh_upgrade tool -- Ludovic Claude Mon, 28 Jun 2010 23:13:51 +0200 maven-repo-helper (1.1) unstable; urgency=low * Add mh_patchpom, useful in some situations to patch individual POM files * Add mh_linkrepojar, to create a link from a jar present in the Maven repository * Correctly identify tag used by Maven (Closes: #584512) * Add documentation for the package and in particular for the syntax of the debian/.poms file (Closes: #586151) * All mh_* scripts now use debian/.mh/ as their temporary work folder instead of debian/tmp, this better satisfies the Debian policies. * Add mh_cleantmp to remove the temporary files produced when using any other mh_* script * Fix typo in package description (Closes: #586573) -- Ludovic Claude Fri, 21 May 2010 00:11:48 +0200 maven-repo-helper (1.0.6) unstable; urgency=low * Rule.java: harden our handling of version string (from pom.xml) to cope with specials chars. * POMTransformer: If we can't find a dependency, just skip it. * Switch to 3.0 (native) format -- Damien Raude-Morvan Mon, 05 Apr 2010 21:44:47 +0200 maven-repo-helper (1.0.5) unstable; urgency=low * mh_installjar: Add new -e/--set-version switchs and handle them as we already do in mh_installpom. -- Damien Raude-Morvan Fri, 19 Mar 2010 22:34:26 +0100 maven-repo-helper (1.0.4) unstable; urgency=low * Fix "ignores the --no-parent option in the .poms file" (Closes: #573049) - mh_installpom: Pass "--no-parent" option to mh_cleanpom. -- Damien Raude-Morvan Tue, 09 Mar 2010 22:51:04 +0100 maven-repo-helper (1.0.3) unstable; urgency=low * mh_installpoms: Fix call to mh_installpom. Use MH_ARGS instead of (non-existing) MH_OPTS variable. -- Damien Raude-Morvan Tue, 02 Mar 2010 21:09:04 +0100 maven-repo-helper (1.0.2) unstable; urgency=low * A leak of environment variables activated the no-rules option on mh_cleanpom, preventing mh_installjar to work properly in some cases (Closes: #570863) -- Ludovic Claude Mon, 01 Mar 2010 00:46:16 +0100 maven-repo-helper (1.0.1) unstable; urgency=low * Bump up Standards-Version to 3.8.4 * Fix NPE on mh_transformpoms * Looks like I missed many files while merging changes to Debian, it's now fixed. -- Ludovic Claude Mon, 01 Feb 2010 23:02:27 +0100 maven-repo-helper (1.0) unstable; urgency=low * Add more unit tests * maven.ignoreRules now supports eliminating some plugins from the build * maven.rules can be used to repair missing version numbers for plugins and extensions as well as dependencies (Closes: #561420) * If a pom file is followed by the --ignore option in the file .poms, then it is ignored from the build and all operations (cleaning, patching) * Add support for maven.cleanIgnoreRules to ignore additional dependencies or plugins during the clean phase. * mh_cleanpom automatically adds a published rule for any Maven plugin, this rule is used later by maven-debian-helper to force the versions of the Maven plugins used in a pom.xml file with the versions defined in the repository * Read rules from the Maven repository to force the version of Maven plugins to be the same as in the repository * Add --debian-build and --no-docs-build options to mh_patchpoms to remove some elements from the POM during a Debian build -- Ludovic Claude Tue, 12 Jan 2010 00:12:23 +0100 maven-repo-helper (0.9) unstable; urgency=low * org/debian/maven/repo/POMReader.java: Extend previous fix to parse much more properties and use expandProperties() like other cases. -- Damien Raude-Morvan Tue, 13 Oct 2009 22:49:43 +0200 maven-repo-helper (0.8) unstable; urgency=low * org/debian/maven/repo/POMReader.java: Fix ${parent.version} parsing inside child's pom.xml * Bump Standards-Version to 3.8.3 (no changes needed) * Fix Vcs-* fields: use pkg-java SVN repository -- Damien Raude-Morvan Sun, 11 Oct 2009 18:47:16 +0200 maven-repo-helper (0.7) unstable; urgency=low * Install jars in /usr/share/java and create link to them from the Maven repository (as suggested by Marcus Better) * Add a new script, mh_linkjar, which creates links to the jar into /usr/share/maven-repo. Unlike mh_installjar, it does not copy the jar into the build directory. * Use install instead of dh_install in the scripts as it can interfer if there is a .install file in the debian folder. * Add Recommends: debhelper as debhelper is used in some scripts (mh_install* and mh_linkjar) * Add --set-version to mh_cleanpom, mh_installpom, mh_installpoms to be able to force the version of the artifact in Maven without needing patching the original POM file. * More errors detected in repo scan * Use http://maven.apache.org/xsd/maven-4_0_0.xsd as the location of the xsd in the xml namespace declaration to keep gcj happy. It should not affect Maven or other tools, provided that the xsd is registered in a XML catalog. * By default, remove the test dependencies from cleaned POMs (except for multi-module POM) as they are not useful outside building the project itself most of the time and they make checking consistency in the Maven repository harder. * mh_cleanpom, mh_installpom(s) and mh_transformpoms can remove dependencies from the POM files -- Ludovic Claude Thu, 16 Jul 2009 10:09:26 +0100 maven-repo-helper (0.6.1) experimental; urgency=low * Add a workaround to use gcj with maven-repo-helper: avoid using gnu xml stream when reading or writing XML documents. -- Ludovic Claude Mon, 13 Jul 2009 20:15:14 +0100 maven-repo-helper (0.6) experimental; urgency=low * Move mh_genrules scripts to the maven-debian-helper package, as it needs mh_lspoms and other components from this package. * Repair missing version information on dependencies -- Ludovic Claude Thu, 09 Jul 2009 15:53:25 +0100 maven-repo-helper (0.5) unstable; urgency=low * Initial release. (Closes: #521947) -- Ludovic Claude Thu, 12 Mar 2009 20:46:36 +0000 maven-repo-helper-1.8.5/debian/TODO0000644000000000000000000000023112247273474013663 0ustar #651901: mh_install should support creating additional links (at least one) for a jar o Fix NPE at build time, see TODO o cleanup old .txt files in doc/ maven-repo-helper-1.8.5/debian/source/0000755000000000000000000000000012247273474014477 5ustar maven-repo-helper-1.8.5/debian/source/format0000644000000000000000000000001512247273474015706 0ustar 3.0 (native) maven-repo-helper-1.8.5/debian/compat0000644000000000000000000000000212247273474014375 0ustar 9 maven-repo-helper-1.8.5/debian/copyright0000644000000000000000000000434712247273474015142 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: Maven Repo support Upstream-Contact: Ludovic Claude Source: https://launchpad.net/maven-packaging-support/ Files: * Copyright: 2009, Ludovic Claude License: Apache-2.0 Files: src/test/resources/slf4j.xml Copyright: 2004-2005, SLF4J.ORG 2004-2007, QOS.ch License: MIT Files: src/test/resources/modello-core.xml Copyright: 2004-2007, Codehaus.org 1999, Intalio Inc License: MIT Files: src/test/resources/plexus-container-default.xml Copyright: 2001-2006, Codehaus Foundation License: Apache-2.0 Files: src/test/resources/plexus-active-collections.pom Copyright: 2006-2009, Codehaus Foundation License: Apache-2.0 Files: src/test/resources/*.xml src/test/resources/org/apache/maven/project/pom-4.0.0.xml Copyright: 2001-2009, Apache Software foundation License: Apache-2.0 Files: debian/* Copyright: 2009, Ludovic Claude 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: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: . The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. . THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. maven-repo-helper-1.8.5/debian/build.properties0000644000000000000000000000124312247273474016414 0ustar # Set the default Maven locations. # See http://maven.apache.org/ref/current/maven-model/maven.html for nams build.sourceDirectory=src/main/java build.testSourceDirectory=src/test/java build.directory=build build.outputDirectory=build/classes build.testOutputDirectory=build/test-classes build.javaVersion=1.5 javadoc.dir=${build.directory}/javadoc classpath.compile= classpath.test=/usr/share/java/junit4.jar:/usr/share/java/commons-io.jar:/usr/share/java/xmlunit.jar classpath.full.compile=${build.outputDirectory}:${classpath.compile} classpath.full.test=${build.testOutputDirectory}:${classpath.test}:${build.outputDirectory}:${classpath.compile} maven.test.excludes= maven-repo-helper-1.8.5/debian/control0000644000000000000000000000275512247273474014613 0ustar Source: maven-repo-helper Section: java Priority: optional Maintainer: Debian Java Maintainers Uploaders: Ludovic Claude , Damien Raude-Morvan , Thomas Koch , Emmanuel Bourg Build-Depends: debhelper (>= 9), cdbs, default-jdk, ant, help2man, python-docutils Build-Depends-Indep: ant-optional, libstax-java, junit4, libxmlunit-java, libcommons-io-java Standards-Version: 3.9.5 Vcs-Git: git://anonscm.debian.org/pkg-java/maven-repo-helper.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=pkg-java/maven-repo-helper.git Homepage: http://wiki.debian.org/Java/MavenRepoSpec Package: maven-repo-helper Architecture: all Depends: ${misc:Depends}, default-jre-headless | java2-runtime-headless, libstax-java Recommends: debhelper Suggests: maven-debian-helper Breaks: maven-debian-helper (<= 1.6.5) Description: Helper tools for including Maven metadata in Debian packages This package enables Debian packages which are not using Maven in their build process to provide and install Maven POMs and libraries in the repository located in /usr/share/maven-repo. . Packages built with Maven (using maven-debian-helper) will benefit as many of their dependencies are already packaged in Debian but they are missing the necessary metadata (Maven POM) which is required by Maven when it is using dependencies. . A tutorial is available at /usr/share/doc/maven-repo-helper/tutorial.html maven-repo-helper-1.8.5/pom.xml0000644000000000000000000000632512247273474013300 0ustar 4.0.0 org.debian.maven maven-repo-helper Maven Repo helper jar 1.8.5 Provides support for managing the Maven repository in a Debian distribution. 2009 https://code.launchpad.net/maven-packaging-support/ BSD http://opensource.org/licenses/bsd-license.php repo Ludovic Claude ludovic.claude@laposte.net Developer +0 Thomas Koch thomas@koch.ro Developer +0 Debian http://bugs.debian.org scm:git:git://anonscm.debian.org/pkg-java/maven-repo-helper.git scm:git:git+ssh://git.debian.org/git/pkg-java/maven-repo-helper.git http://anonscm.debian.org/gitweb/?p=pkg-java/maven-repo-helper.git maven-compiler-plugin 2.3.2 1.6 1.6 maven-surefire-plugin 2.10 **/*Test.java junit junit 4.10 test xmlunit xmlunit 1.2 test commons-io commons-io 1.4 test UTF-8