[pkg-java] r12809 - in trunk/maven-repo-helper: . debian src/main/bin src/main/java/org/debian/maven/repo src/main/share src/test/java/org/debian/maven/repo src/test/resources src/test/resources/repository src/test/resources/repository/org src/test/resources/repository/org/apache src/test/resources/repository/org/apache/ant src/test/resources/repository/org/apache/ant/ant src/test/resources/repository/org/apache/ant/ant/1.7.1 src/test/resources/repository/org/apache/ant/ant/debian src/test/resources/repository/org/apache/ant/ant-apache-bcel src/test/resources/repository/org/apache/ant/ant-apache-bcel/1.7.1 src/test/resources/repository/org/apache/ant/ant-apache-bcel/debian src/test/resources/repository/org/apache/ant/ant-parent src/test/resources/repository/org/apache/ant/ant-parent/1.7.1 src/test/resources/repository/org/apache/ant/ant-parent/debian src/test/resources/repository/org/apache/bcel src/test/resources/repository/org/apache/bcel/bcel src/test/resources/repository/org/apache/bcel/bcel/5.2 src/test/resources/repository/org/apache/bcel/bcel/5.x

Ludovic Claude ludovicc-guest at alioth.debian.org
Sun Jul 25 12:23:32 UTC 2010


Author: ludovicc-guest
Date: 2010-07-25 12:23:25 +0000 (Sun, 25 Jul 2010)
New Revision: 12809

Added:
   trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/DependencyNotFoundException.java
   trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/DependencyRuleSet.java
   trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/ListOfPOMs.java
   trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/POMHandler.java
   trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/ListOfPOMsTest.java
   trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/RepositoryTest.java
   trunk/maven-repo-helper/src/test/resources/antlr3.poms
   trunk/maven-repo-helper/src/test/resources/hibernate-validator-parent.cleaned
   trunk/maven-repo-helper/src/test/resources/hibernate-validator-parent.pom
   trunk/maven-repo-helper/src/test/resources/hibernate-validator-tck-runner.pom
   trunk/maven-repo-helper/src/test/resources/hibernate-validator-tck-runner.transformed
   trunk/maven-repo-helper/src/test/resources/hibernate-validator.transformed
   trunk/maven-repo-helper/src/test/resources/repository/
   trunk/maven-repo-helper/src/test/resources/repository/org/
   trunk/maven-repo-helper/src/test/resources/repository/org/apache/
   trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/
   trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant-apache-bcel/
   trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant-apache-bcel/1.7.1/
   trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant-apache-bcel/1.7.1/ant-apache-bcel-1.7.1.jar
   trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant-apache-bcel/1.7.1/ant-apache-bcel-1.7.1.pom
   trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant-apache-bcel/debian/
   trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant-apache-bcel/debian/ant-apache-bcel-debian.jar
   trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant-apache-bcel/debian/ant-apache-bcel-debian.pom
   trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant-parent/
   trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant-parent/1.7.1/
   trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant-parent/1.7.1/ant-parent-1.7.1.pom
   trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant-parent/debian/
   trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant-parent/debian/ant-parent-debian.pom
   trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant/
   trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant/1.7.1/
   trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant/1.7.1/ant-1.7.1.jar
   trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant/1.7.1/ant-1.7.1.pom
   trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant/debian/
   trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant/debian/ant-debian.jar
   trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant/debian/ant-debian.pom
   trunk/maven-repo-helper/src/test/resources/repository/org/apache/bcel/
   trunk/maven-repo-helper/src/test/resources/repository/org/apache/bcel/bcel/
   trunk/maven-repo-helper/src/test/resources/repository/org/apache/bcel/bcel/5.2/
   trunk/maven-repo-helper/src/test/resources/repository/org/apache/bcel/bcel/5.2/bcel-5.2.jar
   trunk/maven-repo-helper/src/test/resources/repository/org/apache/bcel/bcel/5.2/bcel-5.2.pom
   trunk/maven-repo-helper/src/test/resources/repository/org/apache/bcel/bcel/5.x/
   trunk/maven-repo-helper/src/test/resources/repository/org/apache/bcel/bcel/5.x/bcel-5.x.jar
   trunk/maven-repo-helper/src/test/resources/repository/org/apache/bcel/bcel/5.x/bcel-5.x.pom
   trunk/maven-repo-helper/src/test/resources/repository/root.dir
Removed:
   trunk/maven-repo-helper/src/test/resources/hibernate-validator.cleaned
Modified:
   trunk/maven-repo-helper/debian/README.Debian
   trunk/maven-repo-helper/debian/changelog
   trunk/maven-repo-helper/pom.xml
   trunk/maven-repo-helper/src/main/bin/mh_installjar
   trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/Dependency.java
   trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/DependencyRule.java
   trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/POMCleaner.java
   trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/POMInfo.java
   trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/POMReader.java
   trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/POMTransformer.java
   trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/Repository.java
   trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/Rule.java
   trunk/maven-repo-helper/src/main/share/mh_lib.sh
   trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/DependencyRuleTest.java
   trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/POMCleanerTest.java
   trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/POMReaderTest.java
   trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/POMTransformerTest.java
   trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/TestBase.java
   trunk/maven-repo-helper/src/test/resources/antlr3-tools.transformed
   trunk/maven-repo-helper/src/test/resources/commons-validator.cleaned
   trunk/maven-repo-helper/src/test/resources/doxia-module-fml.transformed
   trunk/maven-repo-helper/src/test/resources/hibernate-validator.pom
   trunk/maven-repo-helper/src/test/resources/maven-javadoc-plugin.transformed
   trunk/maven-repo-helper/src/test/resources/maven.cleaned
   trunk/maven-repo-helper/src/test/resources/plexus-active-collections.cleaned
   trunk/maven-repo-helper/src/test/resources/plexus-archiver.cleaned
   trunk/maven-repo-helper/src/test/resources/plexus-container-default.cleaned
   trunk/maven-repo-helper/src/test/resources/plexus-container-default.transformed
   trunk/maven-repo-helper/src/test/resources/servlet-api.cleaned
   trunk/maven-repo-helper/src/test/resources/slf4j.cleaned
   trunk/maven-repo-helper/src/test/resources/wagon-http-lightweight.cleaned
Log:
* Expand more Maven properties in POM files.
* Support <property/> syntax in <properties> tag
* Handle better configuration elements in plugins (ignore them)
* Add support for plugin elements in <profile> tags
* Add support for dependency classifiers
* Add support for <reporting> 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

Modified: trunk/maven-repo-helper/debian/README.Debian
===================================================================
--- trunk/maven-repo-helper/debian/README.Debian	2010-07-23 23:08:27 UTC (rev 12808)
+++ trunk/maven-repo-helper/debian/README.Debian	2010-07-25 12:23:25 UTC (rev 12809)
@@ -8,7 +8,7 @@
 
 /usr/share/maven-repo contains a Maven-compatible repository but entirely managed by Debian.
 
-One differenciating feature of this repository is that you will find for most artifacts only 2 versions: one current version, and a 
+One differentiating feature of this repository is that you will find for most artifacts only 2 versions: one current version, and a
 symbolic version, usually named 'debian'. The reason for this is simple: the Debian project tries to keep the number of versions
 for its libraries to its minimum, that's in order to ease the maintenance burden and make upgrades of shared libraries easier.
 So that's why there is usually one current version of the library. The symbolic (or debian) version of the library is there in
@@ -111,7 +111,7 @@
 This file contains the substitution rules to apply on any reference to an artifact present on the original POM during the cleanup phase, that is before adding the POM to the Debian Maven repository.
 
 Its syntax is:
-<rule for artifact groupId> <rule for artifact id> <rule for artifact type> <rule for artifact version> [optional rule for artifact classifier]
+<rule for artifact groupId> <rule for artifact id> <rule for artifact type> <rule for artifact version> [optional rule for artifact classifier] [optional rule for artifact scope]
 
 where a rule can be:
   * - to match any element and leave it unchanged

Modified: trunk/maven-repo-helper/debian/changelog
===================================================================
--- trunk/maven-repo-helper/debian/changelog	2010-07-23 23:08:27 UTC (rev 12808)
+++ trunk/maven-repo-helper/debian/changelog	2010-07-25 12:23:25 UTC (rev 12809)
@@ -1,6 +1,16 @@
-maven-repo-helper (1.2) UNRELEASED; urgency=low
+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 <property/> syntax in <properties> tag
+  * Handle better configuration elements in plugins (ignore them)
+  * Add support for plugin elements in <profile> tags
+  * Add support for dependency classifiers
+  * Add support for <reporting> 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 <ludovic.claude at laposte.net>  Mon, 28 Jun 2010 23:13:51 +0200
 

Modified: trunk/maven-repo-helper/pom.xml
===================================================================
--- trunk/maven-repo-helper/pom.xml	2010-07-23 23:08:27 UTC (rev 12808)
+++ trunk/maven-repo-helper/pom.xml	2010-07-25 12:23:25 UTC (rev 12809)
@@ -5,7 +5,7 @@
     <artifactId>maven-repo-helper</artifactId>
     <name>Maven Repo helper</name>
     <packaging>jar</packaging>
-    <version>1.1</version>
+    <version>1.2</version>
     <description>Provides support for managing the Maven repository in a Debian distribution.</description>
 
     <inceptionYear>2009</inceptionYear>

Modified: trunk/maven-repo-helper/src/main/bin/mh_installjar
===================================================================
--- trunk/maven-repo-helper/src/main/bin/mh_installjar	2010-07-23 23:08:27 UTC (rev 12808)
+++ trunk/maven-repo-helper/src/main/bin/mh_installjar	2010-07-25 12:23:25 UTC (rev 12809)
@@ -90,6 +90,10 @@
 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"

Modified: trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/Dependency.java
===================================================================
--- trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/Dependency.java	2010-07-23 23:08:27 UTC (rev 12808)
+++ trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/Dependency.java	2010-07-25 12:23:25 UTC (rev 12809)
@@ -4,14 +4,11 @@
  */
 package org.debian.maven.repo;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
+import java.util.*;
 
 /**
  *
- * @author ludo
+ * @author Ludovic Claude <ludovicc at users.sourceforge.net>
  */
 public class Dependency {
 
@@ -21,25 +18,26 @@
     private String version;
     private boolean optional;
     private String scope;
+    private String classifier;
 
-    public Dependency() {
-    }
-
     public Dependency(String groupId, String artifactId, String type, String version) {
         this.groupId = groupId;
         this.artifactId = artifactId;
         this.type = type;
         this.version = version;
         this.scope = "runtime";
+        this.classifier = "";
     }
 
-    public Dependency(String groupId, String artifactId, String type, String version, String scope, boolean optional) {
+    public Dependency(String groupId, String artifactId, String type, String version, String scope, boolean optional,
+                      String classifier) {
         this.groupId = groupId;
         this.artifactId = artifactId;
         this.type = type;
         this.version = version;
         this.scope = scope;
         this.optional = optional;
+        this.classifier = (classifier == null) ? "" : classifier;
     }
 
     public String getArtifactId() {
@@ -90,6 +88,14 @@
         this.scope = scope;
     }
 
+    public String getClassifier() {
+        return classifier;
+    }
+
+    public void setClassifier(String classifier) {
+        this.classifier = (classifier == null) ? "" : classifier;
+    }
+
     public boolean equals(Object obj) {
         if (obj == null) {
             return false;
@@ -110,6 +116,10 @@
         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
+        if ((this.classifier == null) ? (other.classifier != null) : !this.classifier.equals(other.classifier)) {
+            return false;
+        }
         return true;
     }
 
@@ -130,6 +140,10 @@
         if ((this.type == null) ? (other.type != null) : !this.type.equals(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)
+        if ((this.classifier == null) ? (other.classifier != null) : !this.classifier.equals(other.classifier)) {
+            return false;
+        }
         return true;
     }
 
@@ -178,4 +192,17 @@
         return result;
     }
 
+    public static List applyIgnoreRules(List dependencies, Set ignoreRules) {
+        if (dependencies == null) {
+            return null;
+        }
+        List result = new ArrayList();
+        for (Iterator i = dependencies.iterator(); i.hasNext();) {
+            Dependency dependency = (Dependency) i.next();
+            if (dependency.findMatchingRule(ignoreRules) == null) {
+                result.add(dependency);
+            }
+        }
+        return result;
+    }
 }

Added: trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/DependencyNotFoundException.java
===================================================================
--- trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/DependencyNotFoundException.java	                        (rev 0)
+++ trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/DependencyNotFoundException.java	2010-07-25 12:23:25 UTC (rev 12809)
@@ -0,0 +1,20 @@
+package org.debian.maven.repo;
+
+/**
+ * @author Ludovic Claude <ludovicc at users.sourceforge.net>
+ */
+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;
+    }
+}

Modified: trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/DependencyRule.java
===================================================================
--- trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/DependencyRule.java	2010-07-23 23:08:27 UTC (rev 12808)
+++ trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/DependencyRule.java	2010-07-25 12:23:25 UTC (rev 12809)
@@ -4,7 +4,7 @@
 
 /**
  *
- * @author ludo
+ * @author Ludovic Claude <ludovicc at users.sourceforge.net>
  */
 public class DependencyRule implements Comparable {
 
@@ -17,6 +17,7 @@
     private Rule typeRule;
     private Rule versionRule;
     private Rule scopeRule;
+    private Rule classifierRule;
 
     public DependencyRule(String def) {
         StringTokenizer st = new StringTokenizer(def, " \t", false);
@@ -41,6 +42,11 @@
             versionRule = new Rule("s/.*/debian/");
         }
         if (st.hasMoreTokens()) {
+            classifierRule = new Rule(st.nextToken());
+        } else {
+            classifierRule = new Rule("*");
+        }
+        if (st.hasMoreTokens()) {
             scopeRule = new Rule(st.nextToken());
         } else {
             scopeRule = new Rule("*");
@@ -67,9 +73,14 @@
         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());
+                && versionRule.match(dependency.getVersion()) && scopeRule.match(dependency.getScope())
+                && classifierRule.match(dependency.getClassifier());
     }
 
     public Dependency apply(Dependency dependency) {
@@ -78,7 +89,8 @@
                 typeRule.apply(dependency.getType()),
                 versionRule.apply(dependency.getVersion()),
                 scopeRule.apply(dependency.getScope()),
-                dependency.isOptional());
+                dependency.isOptional(),
+                classifierRule.apply(dependency.getClassifier()));
     }
 
     /**
@@ -114,6 +126,12 @@
         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;
         }
@@ -143,6 +161,9 @@
         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;
+        }
         if (this.scopeRule != other.scopeRule && (this.scopeRule == null || !this.scopeRule.equals(other.scopeRule))) {
             return false;
         }
@@ -155,17 +176,18 @@
         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()
-                + ":" + scopeRule.getPattern();
+                + ":" + classifierRule.getPattern() + ":" + scopeRule.getPattern();
     }
 
     public String toString() {
-        return groupRule + " " + artifactRule + " " + typeRule + " " + versionRule + " " + scopeRule;
+        return groupRule + " " + artifactRule + " " + typeRule + " " + versionRule + " " + classifierRule + " " + scopeRule;
     }
 
 }

Added: trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/DependencyRuleSet.java
===================================================================
--- trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/DependencyRuleSet.java	                        (rev 0)
+++ trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/DependencyRuleSet.java	2010-07-25 12:23:25 UTC (rev 12809)
@@ -0,0 +1,132 @@
+package org.debian.maven.repo;
+
+import java.io.*;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * @author Ludovic Claude <ludovicc at users.sourceforge.net>
+ */
+public class DependencyRuleSet {
+
+    private static final Logger log = Logger.getLogger(DependencyRuleSet.class.getName());
+
+    private File rulesFile;
+    private Set rules;
+    private boolean verbose;
+    private String name;
+    private String description;
+
+    public DependencyRuleSet(String name) {
+        this.name = name;
+    }
+
+    public DependencyRuleSet(String name, File rulesFile) {
+        this(name);
+        this.rulesFile = rulesFile;
+    }
+
+    public File getRulesFile() {
+        return rulesFile;
+    }
+
+    public void setRulesFile(File rulesFile) {
+        this.rulesFile = rulesFile;
+        rules = null;
+        readRules();
+    }
+
+    public Set getRules() {
+        if (rules == null) {
+            readRules();
+        }
+        return rules;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public Iterator iterator() {
+        return getRules().iterator();
+    }
+
+    public boolean isEmpty() {
+        return getRules().isEmpty();
+    }
+
+    public void add(DependencyRule rule) {
+        getRules().add(rule);
+    }
+
+    public boolean isVerbose() {
+        return verbose;
+    }
+
+    public void setVerbose(boolean verbose) {
+        this.verbose = verbose;
+    }
+
+    public void save() {
+        try {
+            PrintWriter out = new PrintWriter(new FileWriter(getRulesFile()));
+            out.println(description);
+
+            for (Iterator i = getRules().iterator(); i.hasNext();) {
+                DependencyRule rule = (DependencyRule) i.next();
+                out.println(rule.toString());
+            }
+            out.flush();
+            out.close();
+        } catch (IOException ex) {
+            log.log(Level.SEVERE, null, ex);
+        }
+    }
+
+    private void readRules() {
+        rules = new TreeSet();
+        if (rulesFile == null) {
+            return;
+        }
+        if (!rulesFile.exists()) {
+            if (verbose) {
+                System.out.println("Rules file does not exist: " + rulesFile.getAbsolutePath());
+            }
+            return;
+        }
+        try {
+            if (verbose) {
+                System.out.println(name + ":");
+            }
+            LineNumberReader lnr = new LineNumberReader(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("---------");
+            }
+
+        } catch (IOException ex) {
+            log.log(Level.SEVERE, null, ex);
+        }
+    }
+
+}

Added: trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/ListOfPOMs.java
===================================================================
--- trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/ListOfPOMs.java	                        (rev 0)
+++ trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/ListOfPOMs.java	2010-07-25 12:23:25 UTC (rev 12809)
@@ -0,0 +1,212 @@
+package org.debian.maven.repo;
+
+import java.io.*;
+import java.util.*;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ * @author Ludovic Claude <ludovicc at users.sourceforge.net>
+ */
+public class ListOfPOMs {
+
+    private static final Logger log = Logger.getLogger(ListOfPOMs.class.getName());
+
+    private boolean verbose;
+    private File poms;
+    private List pomList;
+    private Map pomOptions;
+
+    public ListOfPOMs() {
+    }
+
+    public ListOfPOMs(File poms) {
+        this.poms = poms;
+    }
+
+    public boolean isVerbose() {
+        return verbose;
+    }
+
+    public void setVerbose(boolean verbose) {
+        this.verbose = verbose;
+    }
+
+    public File getListOfPOMsFile() {
+        return poms;
+    }
+
+    public void setListOfPOMsFile(File poms) {
+        this.poms = poms;
+        pomList = null;
+        pomOptions = null;
+    }
+
+    public void foreachPoms(POMHandler handler) {
+        if (pomList == null) {
+            readPomsFile();
+        }
+        for (Iterator i = pomList.iterator(); i.hasNext(); ) {
+            String pomPath = (String) i.next();
+            POMOptions options = getPOMOptions(pomPath);
+            if (options.isIgnore()) {
+                try {
+                    handler.ignorePOM(new File(pomPath));
+                } catch (Exception e) {
+                    log.log(Level.SEVERE, null, e);
+                }
+            }
+        }
+        for (Iterator i = pomList.iterator(); i.hasNext(); ) {
+            String pomPath = (String) i.next();
+            POMOptions options = getPOMOptions(pomPath);
+            if (!options.isIgnore()) {
+                try {
+                    handler.handlePOM(new File(pomPath), options.isNoParent());
+                } catch (Exception e) {
+                    log.log(Level.SEVERE, null, e);
+                }
+            }
+        }
+    }
+
+    public POMOptions getPOMOptions(String pomPath) {
+        return (POMOptions) getPomOptions().get(pomPath);
+    }
+
+    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;
+    }
+
+    public POMOptions addPOM(String pomPath) {
+        if (pomList == null) {
+            readPomsFile();
+        }
+        pomList.add(pomPath);
+        POMOptions options = new POMOptions();
+        pomOptions.put(pomPath, options);
+        return options;
+    }
+
+    private void readPomsFile() {
+        if (pomList == null) {
+            pomList = new ArrayList();
+            pomOptions = new HashMap();
+        }
+
+        if (poms == null || !poms.exists()) {
+            return;
+        }
+
+        try {
+            if (verbose) {
+                System.out.println("Read list of poms from " + poms.getAbsolutePath());
+            }
+            LineNumberReader reader = new LineNumberReader(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 pom = st.nextToken();
+                POMOptions options = addPOM(pom);
+                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()));
+                    }
+                }
+                if (verbose) {
+                    System.out.println(pom + options);
+                }
+            }
+            reader.close();
+        } catch (IOException e) {
+            log.log(Level.SEVERE, null, e);
+        }
+    }
+
+    public void save() {
+        if (poms != null && !poms.exists()) {
+            try {
+                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("# <path to pom file> [option]");
+                out.println("# where option can be:");
+                out.println("#   --ignore: ignore this POM or");
+                out.println("#   --no-parent: remove the <parent> tag from the POM");
+                for (Iterator i = pomList.iterator(); i.hasNext();) {
+                    String pomPath = (String) i.next();
+                    out.println(pomPath + getPOMOptions(pomPath));
+                }
+                out.flush();
+                out.close();
+            } catch (Exception ex) {
+                log.log(Level.SEVERE, null, ex);
+            }
+        }
+    }
+
+    public static class POMOptions {
+        private boolean ignore;
+        private boolean noParent;
+        private String destPackage;
+
+        public boolean isIgnore() {
+            return ignore;
+        }
+
+        public void setIgnore(boolean ignore) {
+            this.ignore = ignore;
+        }
+
+        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 String toString() {
+            if (ignore) {
+               return " --ignore";
+            }
+            String options = "";
+            if (noParent) {
+                options += " --no-parent ";
+            }
+            if (destPackage != null) {
+                options += " --package=" + destPackage;
+            }
+            return options;
+        }
+    }
+}

Modified: trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/POMCleaner.java
===================================================================
--- trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/POMCleaner.java	2010-07-23 23:08:27 UTC (rev 12808)
+++ trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/POMCleaner.java	2010-07-25 12:23:25 UTC (rev 12809)
@@ -3,12 +3,11 @@
 import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Properties;
+import java.util.*;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
 
 /**
  * Cleans up a POM for inclusion in the /usr/share/maven-repo/ repository.
@@ -57,6 +56,7 @@
             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();
@@ -92,6 +92,24 @@
         return "pom".equals(info.getThisPom().getType()) || !"test".equals(dependency.getScope());
     }
 
+    protected void writeDebianProperties(XMLStreamWriter writer, int inLevel, POMInfo original, POMInfo info, String debianPackage) throws XMLStreamException {
+        super.writeDebianProperties(writer, inLevel, original, info, debianPackage);
+        Map dependencyVersions = new TreeMap();
+        for (Iterator i = original.getDependencies().iterator(); i.hasNext(); ) {
+            Dependency dependency = (Dependency) i.next();
+            if (dependency.getVersion() != null) {
+                dependencyVersions.put(dependency.getGroupId() + "." + dependency.getArtifactId(), dependency.getVersion());
+            }
+        }
+        for (Iterator i = dependencyVersions.entrySet().iterator(); i.hasNext(); ) {
+            Map.Entry depVer = (Map.Entry) i.next();
+            indent(writer, inLevel + 1);
+            writer.writeStartElement("debian." + depVer.getKey() + ".originalVersion");
+            writer.writeCharacters(depVer.getValue().toString());
+            writer.writeEndElement();
+        }
+    }
+
     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");
@@ -191,8 +209,8 @@
         String debianPackage = "";
         String setVersion = null;
         File rulesFile = null;
-        File publishedRulesFile = new File("debian/maven.publishedRules");
-        File ignoreRulesFile = new File("debian/maven.ignoreRules");
+        File publishedRulesFile = null;
+        File ignoreRulesFile = null;
         File mavenRepo = null;
         while (i < args.length && (args[i].trim().startsWith("-") || args[i].trim().length() == 0)) {
             String arg = args[i].trim();
@@ -224,12 +242,6 @@
                 } else {
                     ignoreRulesFile = new File(arg.substring("--ignore-rules=".length()));
                 }
-                if (ignoreRulesFile.exists()) {
-                    cleaner.addIgnoreRules(ignoreRulesFile);
-                } else {
-                    System.err.println("Cannot find file: " + ignoreRulesFile);
-                }
-
             } else if (arg.startsWith("-e")) {
                 setVersion = arg.substring(2);
             } else if (arg.startsWith("--set-version=")) {
@@ -251,25 +263,35 @@
         }
 
         if (!noRules) {
-            cleaner.addDefaultRules();
             if (rulesFile != null) {
                 if (!rulesFile.exists()) {
                     if (verbose) {
                         System.err.println("Cannot find file: " + rulesFile);
                     }
                 } else {
-                    cleaner.addRules(rulesFile);
+                    cleaner.getRules().setRulesFile(rulesFile);
                 }
             }
+
+            if (ignoreRulesFile != null) {
+                if (ignoreRulesFile.exists()) {
+                    cleaner.getIgnoreRules().setRulesFile(ignoreRulesFile);
+                } else {
+                    System.err.println("Cannot find file: " + ignoreRulesFile);
+                }
+            }
+
             if (publishedRulesFile != null && publishedRulesFile.exists()) {
-                cleaner.addPublishedRules(publishedRulesFile);
+                cleaner.getPublishedRules().setRulesFile(publishedRulesFile);
             }
+
+            cleaner.addDefaultRules();
         }
 
         if (mavenRepo != null) {
             Repository repository = new Repository(mavenRepo);
             cleaner.setRepository(repository);
-            cleaner.addPluginRulesFromRepository();
+            cleaner.usePluginVersionsFromRepository();
         }
 
         cleaner.setKeepAllElements(keepAllElements);

Added: trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/POMHandler.java
===================================================================
--- trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/POMHandler.java	                        (rev 0)
+++ trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/POMHandler.java	2010-07-25 12:23:25 UTC (rev 12809)
@@ -0,0 +1,14 @@
+package org.debian.maven.repo;
+
+import java.io.File;
+
+/**
+ * @author Ludovic Claude <ludovicc at users.sourceforge.net>
+ */
+public interface POMHandler {
+
+    void handlePOM(File pomFile, boolean noParent) throws Exception;
+
+    void ignorePOM(File pomFile) throws Exception;
+    
+}

Modified: trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/POMInfo.java
===================================================================
--- trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/POMInfo.java	2010-07-23 23:08:27 UTC (rev 12808)
+++ trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/POMInfo.java	2010-07-25 12:23:25 UTC (rev 12809)
@@ -9,6 +9,10 @@
 import java.util.StringTokenizer;
 import java.util.TreeSet;
 
+/**
+ *
+ * @author Ludovic Claude <ludovicc at users.sourceforge.net>
+ */
 public class POMInfo {
     
     public static final String DEPENDENCY_MANAGEMENT_LIST = "DependencyManagement";
@@ -16,11 +20,15 @@
     public static final String DEPENDENCIES = "Dependencies";
     public static final String PROFILE_DEPENDENCIES = "ProfileDependencies";
     public static final String PLUGIN_DEPENDENCIES = "PluginDependencies";
+    public static final String REPORTING_PLUGINS = "ReportingDependencies";
+    public static final String PROFILE_PLUGINS = "ProfilePlugins";
     public static final String PROFILE_PLUGIN_DEPENDENCIES = "ProfilePluginDependencies";
+    public static final String PROFILE_REPORTING_PLUGINS = "ProfileReportingPlugins";
     public static final String PLUGINS = "Plugins";
     public static final String PLUGIN_MANAGEMENT = "PluginManagement";
     public static final String EXTENSIONS = "Extensions";
     public static final String MODULES = "Modules";
+    public static final String PARENT = "Parent";
 
     private String originalParentVersion;
     private Dependency originalPom;
@@ -33,9 +41,12 @@
     private List plugins;
     private List pluginManagement;
     private List pluginDependencies;
+    private List reportingPlugins;
     private List profileDependencies;
     private List profileDependencyManagement;
+    private List profilePlugins;
     private List profilePluginDependencies;
+    private List profileReportingPlugins;
     private Map properties;
     private POMInfo parentPOM;
 
@@ -182,6 +193,22 @@
         this.pluginDependencies = pluginDependencies;
     }
 
+    public List getReportingPlugins() {
+        return reportingPlugins;
+    }
+
+    public void setReportingPlugins(List reportingPlugins) {
+        this.reportingPlugins = reportingPlugins;
+    }
+
+    public List getProfilePlugins() {
+        return profilePlugins;
+    }
+
+    public void setProfilePlugins(List profilePlugins) {
+        this.profilePlugins = profilePlugins;
+    }
+
     public List getProfilePluginDependencies() {
         return profilePluginDependencies;
     }
@@ -190,6 +217,22 @@
         this.profilePluginDependencies = profilePluginDependencies;
     }
 
+    public List getProfileReportingPlugins() {
+        return profileReportingPlugins;
+    }
+
+    public void setProfileReportingPlugins(List profileReportingPlugins) {
+        this.profileReportingPlugins = profileReportingPlugins;
+    }
+
+    public List getParentAsList() {
+        List parentList = new ArrayList();
+        if (getParent() != null) {
+            parentList.add(getParent());
+        }
+        return parentList;
+    }
+
     public Set getPublishedRules(boolean includeDefault) {
         Set rules = new TreeSet();
         if (includeDefault) {
@@ -228,9 +271,13 @@
         result.setPlugins(Dependency.applyRules(getPlugins(), rules));
         result.setPluginDependencies(Dependency.applyRules(getPluginDependencies(), rules));
         result.setPluginManagement(Dependency.applyRules(getPluginManagement(), rules));
+        result.setReportingPlugins(Dependency.applyRules(getReportingPlugins(), rules));
         result.setProfileDependencies(Dependency.applyRules(getProfileDependencies(), rules));
+        result.setProfilePlugins(Dependency.applyRules(getProfilePlugins(), rules));
         result.setProfilePluginDependencies(Dependency.applyRules(getProfilePluginDependencies(), rules));
         result.setProfileDependencyManagement(Dependency.applyRules(getProfileDependencyManagement(), rules));
+        result.setProfileReportingPlugins(Dependency.applyRules(getProfileReportingPlugins(), rules));
+
         result.setProperties(getProperties());
         result.setModules(getModules());
 
@@ -244,13 +291,29 @@
         setPlugins(Dependency.applyRules(getPlugins(), rules));
         setPluginDependencies(Dependency.applyRules(getPluginDependencies(), rules));
         setPluginManagement(Dependency.applyRules(getPluginManagement(), rules));
+        setReportingPlugins(Dependency.applyRules(getReportingPlugins(), rules));
         setProfileDependencies(Dependency.applyRules(getProfileDependencies(), rules));
+        setProfilePlugins(Dependency.applyRules(getProfilePlugins(), rules));
         setProfilePluginDependencies(Dependency.applyRules(getProfilePluginDependencies(), rules));
         setProfileDependencyManagement(Dependency.applyRules(getProfileDependencyManagement(), rules));
-        setProperties(getProperties());
-        setModules(getModules());
+        setProfileReportingPlugins(Dependency.applyRules(getProfileReportingPlugins(), rules));
     }
 
+    public void applyIgnoreRulesOnDependenciesAndPlugins(Set rules) {
+        setDependencies(Dependency.applyIgnoreRules(getDependencies(), rules));
+        setDependencyManagement(Dependency.applyIgnoreRules(getDependencyManagement(), rules));
+        setExtensions(Dependency.applyIgnoreRules(getExtensions(), rules));
+        setPlugins(Dependency.applyIgnoreRules(getPlugins(), rules));
+        setPluginDependencies(Dependency.applyIgnoreRules(getPluginDependencies(), rules));
+        setPluginManagement(Dependency.applyIgnoreRules(getPluginManagement(), rules));
+        setReportingPlugins(Dependency.applyIgnoreRules(getReportingPlugins(), rules));
+        setProfileDependencies(Dependency.applyIgnoreRules(getProfileDependencies(), rules));
+        setProfilePlugins(Dependency.applyIgnoreRules(getProfilePlugins(), rules));
+        setProfilePluginDependencies(Dependency.applyIgnoreRules(getProfilePluginDependencies(), rules));
+        setProfileDependencyManagement(Dependency.applyIgnoreRules(getProfileDependencyManagement(), rules));
+        setProfileReportingPlugins(Dependency.applyIgnoreRules(getProfileReportingPlugins(), rules));
+    }
+
     public void mergeManagement(POMInfo parentPOM) {
         this.parentPOM = parentPOM;
         if (parentPOM != null) {
@@ -258,7 +321,9 @@
             mergeManagement(pluginManagement, parentPOM.getPluginManagement());
         }
         resolveVersions(dependencies, dependencyManagement);
+        resolveVersions(pluginDependencies, dependencyManagement);
         resolveVersions(plugins, pluginManagement);
+        resolveVersions(reportingPlugins, pluginManagement);
     }
 
     private void mergeManagement(List target, List management) {
@@ -328,21 +393,34 @@
         if (PLUGIN_DEPENDENCIES.equals(listSelector)) {
             return getPluginDependencies();
         }
+        if (PROFILE_PLUGINS.equals(listSelector)) {
+            return getProfilePlugins();
+        }
         if (PROFILE_PLUGIN_DEPENDENCIES.equals(listSelector)) {
             return getProfilePluginDependencies();
         }
+        if (PROFILE_REPORTING_PLUGINS.equals(listSelector)) {
+            return getProfileReportingPlugins();
+        }
         if (PLUGINS.equals(listSelector)) {
             return getPlugins();
         }
         if (PLUGIN_MANAGEMENT.equals(listSelector)) {
             return getPluginManagement();
         }
+        if (REPORTING_PLUGINS.equals(listSelector)) {
+            return getReportingPlugins();
+        }
         if (EXTENSIONS.equals(listSelector)) {
             return getExtensions();
         }
         if (MODULES.equals(listSelector)) {
             return getModules();
         }
+        if (PARENT.equals(listSelector)) {
+            return getParentAsList();
+        }
         return null;
     }
+
 }

Modified: trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/POMReader.java
===================================================================
--- trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/POMReader.java	2010-07-23 23:08:27 UTC (rev 12808)
+++ trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/POMReader.java	2010-07-25 12:23:25 UTC (rev 12809)
@@ -45,9 +45,12 @@
         List plugins = new ArrayList();
         List pluginManagement = new ArrayList();
         List pluginDependencies = new ArrayList();
+        List reportingPlugins = new ArrayList();
         List profileDependencies = new ArrayList();
         List profileDependencyManagement = new ArrayList();
+        List profilePlugins = new ArrayList();
         List profilePluginDependencies = new ArrayList();
+        List profileReportingPlugins = new ArrayList();
         List modules = new ArrayList();
 
         Map properties = new TreeMap();
@@ -69,7 +72,10 @@
             switch (event) {
                 case XMLStreamConstants.START_ELEMENT: {
                     element = parser.getLocalName();
-                    if (isReadIgnoredElement(element) || inIgnoredElement > 0) {
+                    if (isReadIgnoredElement(element) || 
+                            (inPlugin > 0 && ("executions".equals(element) || "configuration".equals(element)) || "goals".equals(element) || "reportSets".equals(element)) ||
+                            (inDependency > 0 && "exclusions".equals(element)) ||
+                            inIgnoredElement > 0) {
                         inIgnoredElement++;
                     } else {
                         inLevel++;
@@ -108,10 +114,22 @@
                             inPlugin++;
                             String parentElement = (String) path.get(path.size() - 2);
                             String parentParentElement = (String) path.get(path.size() - 3);
+                            String parentParentParentElement = null;
+                            if (path.size() > 4) {
+                                parentParentParentElement = (String) path.get(path.size() - 4);
+                            }
                             currentDependency = new Dependency("org.apache.maven.plugins", null, "maven-plugin", null);
                             if ("plugins".equals(parentElement)) {
                                 if ("pluginManagement".equals(parentParentElement)) {
                                     pluginManagement.add(currentDependency);
+                                } else if ("reporting".equals(parentParentElement)) {
+                                    if ("profile".equals(parentParentParentElement)) {
+                                        profileReportingPlugins.add(currentDependency);
+                                    } else {
+                                        reportingPlugins.add(currentDependency);
+                                    }
+                                } else if ("profile".equals(parentParentParentElement)) {
+                                    profilePlugins.add(currentDependency);
                                 } else {
                                     plugins.add(currentDependency);
                                 }
@@ -130,12 +148,14 @@
                             inModule++;
                         } else if (inLevel == 2 && "parent".equals(element)) {
                             inParent++;
-                            parent = new Dependency();
-                            parent.setType("pom");
+                            parent = new Dependency(null, null, "pom", null);
                         } else if (inParent > 0) {
                             inParent++;
                         } else if (inLevel == 2 && "properties".equals(element)) {
                             inProperties++;
+                        } else if (inProperties == 1) {
+                            properties.put(element, "true");
+                            inProperties++;
                         } else if (inProperties > 0) {
                             inProperties++;
                         }
@@ -182,6 +202,8 @@
                             currentDependency.setOptional("true".equals(value));
                         } else if ("scope".equals(element)) {
                             currentDependency.setScope(value);
+                        } else if ("classifier".equals(element)) {
+                            currentDependency.setClassifier(value);
                         }
                     } else if (inModule > 1) {
                         modules.add(value);
@@ -246,6 +268,9 @@
             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);
@@ -254,9 +279,12 @@
         expendProperties(plugins, inferedProperties);
         expendProperties(pluginManagement, inferedProperties);
         expendProperties(pluginDependencies, inferedProperties);
+        expendProperties(reportingPlugins, inferedProperties);
         expendProperties(profileDependencies, inferedProperties);
         expendProperties(profileDependencyManagement, inferedProperties);
+        expendProperties(profilePlugins, inferedProperties);
         expendProperties(profilePluginDependencies, inferedProperties);
+        expendProperties(profileReportingPlugins, inferedProperties);
 
         POMInfo info = new POMInfo();
         if (properties.get("debian.originalVersion") != null) {
@@ -274,9 +302,12 @@
         info.setPlugins(plugins);
         info.setPluginManagement(pluginManagement);
         info.setPluginDependencies(pluginDependencies);
+        info.setReportingPlugins(reportingPlugins);
         info.setProfileDependencies(profileDependencies);
         info.setProfileDependencyManagement(profileDependencyManagement);
+        info.setProfilePlugins(profilePlugins);
         info.setProfilePluginDependencies(profilePluginDependencies);
+        info.setProfileReportingPlugins(profileReportingPlugins);
         info.setProperties(properties);
         return info;
     }

Modified: trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/POMTransformer.java
===================================================================
--- trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/POMTransformer.java	2010-07-23 23:08:27 UTC (rev 12808)
+++ trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/POMTransformer.java	2010-07-25 12:23:25 UTC (rev 12809)
@@ -7,7 +7,6 @@
 import java.io.FileReader;
 import java.io.FileWriter;
 import java.io.IOException;
-import java.io.LineNumberReader;
 import java.io.StringWriter;
 import java.io.Writer;
 import java.util.ArrayList;
@@ -18,8 +17,6 @@
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
-import java.util.StringTokenizer;
-import java.util.TreeSet;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 import javax.xml.stream.XMLOutputFactory;
@@ -43,15 +40,16 @@
                 "reports", "reporting", "site"});
     private static final List INFO_ELEMENTS = Arrays.asList(new String[]{"groupId",
                 "artifactId", "packaging", "version"});
-    private Set rules = new TreeSet();
-    private Set automaticRules = new TreeSet();
-    private Set publishedRules = new TreeSet();
-    private Set ignoreRules = new TreeSet();
+    private DependencyRuleSet rules = new DependencyRuleSet("Rules", new File("debian/maven.rules"));
+    private DependencyRuleSet automaticRules = new DependencyRuleSet("Automatic rules");
+    private DependencyRuleSet publishedRules = new DependencyRuleSet("Published rules", new File("debian/maven.publishedRules"));
+    private DependencyRuleSet ignoreRules = new DependencyRuleSet("Ignore rules", new File("debian/maven.ignoreRules"));
     private Map ignoredModules = new HashMap();
     private Repository repository;
     private boolean verbose;
     private boolean isDebianBuild;
     private boolean isBuildWithoutDoc;
+    private ListOfPOMs listOfPOMs;
 
     public POMTransformer() {
     }
@@ -64,6 +62,14 @@
         this.repository = repository;
     }
 
+    public ListOfPOMs getListOfPOMs() {
+        return listOfPOMs;
+    }
+
+    public void setListOfPOMs(ListOfPOMs listOfPOMs) {
+        this.listOfPOMs = listOfPOMs;
+    }
+
     public boolean isBuildWithoutDoc() {
         return isBuildWithoutDoc;
     }
@@ -80,7 +86,23 @@
         this.isDebianBuild = isDebianBuild;
     }
 
-    public void addPluginRulesFromRepository() {
+    public DependencyRuleSet getRules() {
+        return rules;
+    }
+
+    public DependencyRuleSet getAutomaticRules() {
+        return automaticRules;
+    }
+
+    public DependencyRuleSet getPublishedRules() {
+        return publishedRules;
+    }
+
+    public DependencyRuleSet getIgnoreRules() {
+        return ignoreRules;
+    }
+
+    public void usePluginVersionsFromRepository() {
         repository.scanOnce();
         for (Iterator i = repository.resolvedPomsIterator(); i.hasNext();) {
             POMInfo pom = (POMInfo) i.next();
@@ -115,35 +137,14 @@
         rules.add(rule);
     }
 
-    public void addRules(File file) {
-        if (verbose) {
-            System.out.println("Add rules:");
-        }
-        addRules(file, rules);
-    }
-
     public void addPublishedRule(DependencyRule rule) {
-        if (verbose) {
-            System.out.println("Publish rules:");
-        }
         publishedRules.add(rule);
     }
 
-    public void addPublishedRules(File file) {
-        addRules(file, publishedRules);
-    }
-
     public void addIgnoreRule(DependencyRule rule) {
-        if (verbose) {
-            System.out.println("Ignore rules:");
-        }
         ignoreRules.add(rule);
     }
 
-    public void addIgnoreRules(File file) {
-        addRules(file, ignoreRules);
-    }
-
     public void addIgnoreModule(File pomFile, String module) {
         Set modules = (Set) ignoredModules.get(pomFile);
         if (modules == null) {
@@ -153,34 +154,11 @@
         modules.add(module);
     }
 
-    private void addRules(File file, Set dest) {
-        try {
-            LineNumberReader lnr = new LineNumberReader(new FileReader(file));
-            String line = null;
-            while ((line = lnr.readLine()) != null) {
-                line = line.trim();
-                if (line.length() > 0 && !line.startsWith("#")) {
-                    if (verbose) {
-                        System.out.println("  " + line);
-                    }
-                    dest.add(new DependencyRule(line));
-                }
-            }
-            if (verbose) {
-                System.out.println("---------");
-            }
+    public void keepPomVersions() {
+        listOfPOMs.foreachPoms(new POMHandler() {
 
-        } catch (IOException ex) {
-            log.log(Level.SEVERE, null, ex);
-        }
-    }
-
-    public void keepPomVersions(File poms, final String debianPackage) {
-        foreachPoms(poms, new POMHandler() {
-
             public void handlePOM(File pomFile, boolean noParent) throws Exception {
-                Dependency pom = readPom(pomFile).getThisPom();
-                addRule(new DependencyRule(pom.getGroupId() + " " + pom.getArtifactId() + " " + pom.getType() + " " + pom.getVersion()));
+                keepPomVersion(pomFile);
             }
 
             public void ignorePOM(File pomFile) throws Exception {
@@ -195,9 +173,9 @@
         addRule(new DependencyRule(pom.getGroupId() + " " + pom.getArtifactId() + " " + pom.getType() + " " + pom.getVersion()));
     }
 
-    public void transformPoms(File poms, final String debianPackage, final boolean keepPomVersion,
+    public void transformPoms(final String debianPackage, final boolean keepPomVersion,
             final String setVersion) {
-        foreachPoms(poms, new POMHandler() {
+        listOfPOMs.foreachPoms(new POMHandler() {
 
             public void handlePOM(File pomFile, boolean noParent) throws Exception {
                 File targetFile = new File(pomFile.getAbsolutePath() + ".new");
@@ -211,21 +189,22 @@
         });
     }
 
-    public void transformPom(File pomFile, String debianPackage,
-            boolean noParent, boolean keepPomVersion, String setVersion) throws XMLStreamException, FileNotFoundException, IOException {
+    public POMInfo transformPom(File pomFile, String debianPackage,
+            boolean noParent, boolean keepPomVersion, String setVersion) throws XMLStreamException, IOException {
 
         File targetFile = new File(pomFile.getAbsolutePath() + ".new");
-        transformPom(pomFile, targetFile, noParent, keepPomVersion, setVersion, debianPackage);
+        POMInfo pom = transformPom(pomFile, targetFile, noParent, keepPomVersion, setVersion, debianPackage);
         pomFile.delete();
         targetFile.renameTo(pomFile);
+        return pom;
     }
 
-    public void transformPom(File originalPom, File targetPom) throws XMLStreamException, FileNotFoundException, IOException {
-        transformPom(originalPom, targetPom, false, false, null, null);
+    public POMInfo transformPom(File originalPom, File targetPom) throws XMLStreamException, IOException {
+        return transformPom(originalPom, targetPom, false, false, null, null);
     }
 
     public POMInfo transformPom(File originalPom, File targetPom,
-            boolean noParent, boolean keepPomVersion, String setVersion, String debianPackage) throws XMLStreamException, FileNotFoundException, IOException {
+            boolean noParent, boolean keepPomVersion, String setVersion, String debianPackage) throws XMLStreamException, IOException {
 
         if (targetPom.getParentFile() != null) {
             targetPom.getParentFile().mkdirs();
@@ -235,19 +214,24 @@
         Writer out = null;
         try {
             // First pass - read information for this POM
-            POMInfo info = readPom(originalPom);
+            POMInfo original = readPom(originalPom);
 
             if (setVersion != null) {
-                info.getThisPom().setVersion(setVersion);
+                original.getThisPom().setVersion(setVersion);
             }
 
-            transformingPom(info);
+            transformingPom(original);
 
-            info = info.applyRules(rules);
-            info.applyRulesOnDependenciesAndPlugins(automaticRules);
+            POMInfo info = original.applyRules(rules.getRules());
+            info.applyRulesOnDependenciesAndPlugins(automaticRules.getRules());
 
             if (repository != null) {
-                repository.registerPom(targetPom, info);
+                try {
+                    repository.registerPom(targetPom, info);
+                } catch (DependencyNotFoundException e) {
+                    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();
@@ -255,6 +239,7 @@
 
             // Second pass - create the new document
             int inIgnoredElement = 0;
+            int inCopyOnlyElement = 0;
             int inDependency = 0;
             int inExclusion = 0;
             int inExtension = 0;
@@ -266,6 +251,7 @@
             List path = new ArrayList();
             Map dependencyIndexes = new HashMap();
             Dependency dependency = null;
+            Dependency parentDependency = null;
             String element = null;
             boolean afterText = false;
             XMLStreamReader parser = factory.createXMLStreamReader(new BufferedReader(new FileReader(originalPom)));
@@ -284,6 +270,17 @@
                             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++;
+
+                            inLevel++;
+                            path.add(element);
+
+                            indent(writer, inLevel - 1);
+                            writer.writeStartElement(element);
+                            copyNsAndAttributes(parser, writer);
+
                         } else {
                             inLevel++;
                             path.add(element);
@@ -320,17 +317,32 @@
                                         if (listSelector != null) {
                                             int index = inc(dependencyIndexes, listSelector);
                                             List dependencyList = info.getDependencyList(listSelector);
+                                            if (dependency != null) {
+                                                parentDependency = dependency;
+                                            }
                                             dependency = (Dependency) dependencyList.get(index);
                                         }
                                     }
                                 } else if ("plugin".equals(element)) {
                                     String parentElement = (String) path.get(path.size() - 2);
                                     String parentParentElement = (String) path.get(path.size() - 3);
+                                    String parentParentParentElement = null;
+                                    if (path.size() > 4) {
+                                        parentParentParentElement = (String) path.get(path.size() - 4);
+                                    }
                                     if ("plugins".equals(parentElement)) {
                                         sawVersion = false;
                                         String listSelector = POMInfo.PLUGINS;
                                         if ("pluginManagement".equals(parentParentElement)) {
                                             listSelector = POMInfo.PLUGIN_MANAGEMENT;
+                                        } else if ("reporting".equals(parentParentElement)) {
+                                            if ("profile".equals(parentParentParentElement)) {
+                                                listSelector = POMInfo.PROFILE_REPORTING_PLUGINS;
+                                            } else {
+                                                listSelector = POMInfo.REPORTING_PLUGINS;
+                                            }
+                                        } else if ("profile".equals(parentParentParentElement)) {
+                                            listSelector = POMInfo.PROFILE_PLUGINS;
                                         }
                                         int index = inc(dependencyIndexes, listSelector);
                                         List dependencyList = info.getDependencyList(listSelector);
@@ -373,7 +385,7 @@
                             copyNsAndAttributes(parser, writer);
 
                             if ("project".equals(element) && inLevel == 1) {
-                                copyAndFillProjectHeader(parser, writer, inLevel, pomInfo, keepPomVersion, info, parent, debianPackage);
+                                copyAndFillProjectHeader(parser, writer, inLevel, keepPomVersion, original, info, parent, debianPackage);
                             } else if (inLevel == 2 && "properties".equals(element)) {
                                 inProperty++;
                             } else if (inProperty > 0) {
@@ -411,7 +423,7 @@
                             inIgnoredElement--;
                         } else {
                             // Attempt to repair missing version information on dependencies
-                            if (dependency != null && !sawVersion) {
+                            if (dependency != null && !sawVersion && inCopyOnlyElement == 0) {
                                 if ((inDependency == 1 || inPlugin == 1 || inExtension == 1)
                                         && ((parent == null && repository == null) || (repository != null && info.getVersionFromManagementDependency(dependency) == null))) {
                                     String oldVersion = dependency.getVersion();
@@ -421,12 +433,18 @@
                                         // Give a chance to customize the version
                                         // In maven.rules, you can write:
                                         // myDependencyGroup myDependencyArtifact * s/.*/myVersion/
-                                        dependency = dependency.applyRules(rules);
-                                        dependency = dependency.applyRules(automaticRules);
+                                        dependency = dependency.applyRules(rules.getRules());
+                                        dependency = dependency.applyRules(automaticRules.getRules());
                                     }
                                     // 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
-                                    if (inPlugin != 1 || !oldVersion.equals(dependency.getVersion())) {
+                                    // 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
+                                    boolean insertVersion = (info.getVersionFromManagementDependency(dependency) == null);
+                                    if (inPlugin == 1 && insertVersion) {
+                                        insertVersion = !"debian".equals(dependency.getVersion());
+                                    }
+                                    if (insertVersion) {
                                         indent(writer, inLevel);
                                         writer.writeStartElement("version");
                                         writer.writeCharacters(dependency.getVersion());
@@ -439,6 +457,8 @@
                             path.remove(path.size() - 1);
                             if (inExclusion > 0) {
                                 inExclusion--;
+                            } else if (inCopyOnlyElement > 0) {
+                                inCopyOnlyElement--;
                             } else if (inDependency > 0) {
                                 inDependency--;
                             } else if (inPlugin > 0) {
@@ -450,11 +470,15 @@
                             }
                             if (inDependency + inPlugin + inExtension == 0) {
                                 dependency = null;
+                                if (parentDependency != null) {
+                                    dependency = parentDependency;
+                                    parentDependency = null;
+                                }
                             }
                             if (inProperty > 0) {
                                 inProperty--;
                                 if (inProperty == 0) {
-                                    writeDebianProperties(writer, inLevel, info, debianPackage);
+                                    writeDebianProperties(writer, inLevel, original, info, debianPackage);
                                 }
                             }
                             if (!afterText) {
@@ -496,6 +520,8 @@
             writer.flush();
             writer.close();
 
+            info.applyIgnoreRulesOnDependenciesAndPlugins(ignoreRules.getRules());
+
             return info;
 
         } finally {
@@ -509,7 +535,7 @@
         }
     }
 
-    private void copyAndFillProjectHeader(XMLStreamReader parser, XMLStreamWriter writer, int inLevel, Dependency pomInfo, boolean keepPomVersion, POMInfo info, Dependency parent, String debianPackage) throws XMLStreamException {
+    private void copyAndFillProjectHeader(XMLStreamReader parser, XMLStreamWriter writer, int inLevel, boolean keepPomVersion, POMInfo original, POMInfo info, Dependency parent, String debianPackage) throws XMLStreamException {
         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");
@@ -522,23 +548,23 @@
         writer.writeEndElement();
         indent(writer, inLevel);
         writer.writeStartElement("groupId");
-        writer.writeCharacters(pomInfo.getGroupId());
+        writer.writeCharacters(info.getThisPom().getGroupId());
         writer.writeEndElement();
         indent(writer, inLevel);
         writer.writeStartElement("artifactId");
-        writer.writeCharacters(pomInfo.getArtifactId());
+        writer.writeCharacters(info.getThisPom().getArtifactId());
         writer.writeEndElement();
         indent(writer, inLevel);
         writer.writeStartElement("version");
         if (keepPomVersion) {
             writer.writeCharacters(info.getOriginalVersion());
         } else {
-            writer.writeCharacters(pomInfo.getVersion());
+            writer.writeCharacters(info.getThisPom().getVersion());
         }
         writer.writeEndElement();
         indent(writer, inLevel);
         writer.writeStartElement("packaging");
-        writer.writeCharacters(pomInfo.getType());
+        writer.writeCharacters(info.getThisPom().getType());
         writer.writeEndElement();
         indent(writer, inLevel);
         if (parent != null) {
@@ -566,7 +592,7 @@
         }
         if (info.getProperties().isEmpty()) {
             writer.writeStartElement("properties");
-            writeDebianProperties(writer, inLevel, info, debianPackage);
+            writeDebianProperties(writer, inLevel, original, info, debianPackage);
             indent(writer, inLevel);
             writer.writeEndElement();
             indent(writer, inLevel);
@@ -578,10 +604,16 @@
         for (int i = 0; i < nbNamespace; i++) {
             String nsPrefix = parser.getNamespacePrefix(i);
             String nsURI = parser.getNamespaceURI(i);
-            if (nsPrefix == null) {
-                nsPrefix = "";
+            // 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) {
             }
-            writer.writeNamespace(nsPrefix, nsURI);
         }
         int nbAttributes = parser.getAttributeCount();
         for (int i = 0; i < nbAttributes; i++) {
@@ -589,6 +621,8 @@
             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 {
@@ -619,13 +653,7 @@
     }
 
     protected boolean acceptDependency(Dependency dependency, POMInfo info) {
-        for (Iterator i = ignoreRules.iterator(); i.hasNext();) {
-            DependencyRule ignoreRule = (DependencyRule) i.next();
-            if (ignoreRule.matches(dependency)) {
-                return false;
-            }
-        }
-        return true;
+        return dependency.findMatchingRule(ignoreRules.getRules()) == null;
     }
 
     private int inc(Map dependencyIndexes, String selector) {
@@ -639,7 +667,7 @@
         return index.intValue();
     }
 
-    private void writeDebianProperties(XMLStreamWriter writer, int inLevel, POMInfo info, String debianPackage) throws XMLStreamException {
+    protected void writeDebianProperties(XMLStreamWriter writer, int inLevel, POMInfo original, POMInfo info, String debianPackage) throws XMLStreamException {
         indent(writer, inLevel + 1);
         writer.writeStartElement("debian.originalVersion");
         writer.writeCharacters(info.getOriginalVersion());
@@ -651,7 +679,7 @@
             writer.writeEndElement();
         }
         if (info.getOriginalPom() != null) {
-            DependencyRule usedRule = info.getOriginalPom().findMatchingRule(rules);
+            DependencyRule usedRule = info.getOriginalPom().findMatchingRule(rules.getRules());
             if (usedRule != null && !usedRule.equals(DependencyRule.TO_DEBIAN_VERSION_RULE) && !usedRule.equals(DependencyRule.MAVEN_PLUGINS_KEEP_VERSION_RULE)) {
                 addPublishedRule(usedRule);
             }
@@ -672,11 +700,19 @@
             }
             writer.writeCData(sw.toString());
             writer.writeEndElement();
+            info.getProperties().put("debian.mavenRules", sw.toString());
         }
     }
 
     public void setVerbose(boolean verbose) {
         this.verbose = verbose;
+        this.rules.setVerbose(verbose);
+        this.automaticRules.setVerbose(verbose);
+        this.publishedRules.setVerbose(verbose);
+        this.ignoreRules.setVerbose(verbose);
+        if (listOfPOMs != null) {
+            this.listOfPOMs.setVerbose(verbose);
+        }
     }
 
     private boolean acceptModule(String module, File pomFile) {
@@ -690,80 +726,6 @@
     protected void transformingPom(POMInfo info) {
     }
 
-    private interface POMHandler {
-
-        void handlePOM(File pomFile, boolean noParent) throws Exception;
-
-        void ignorePOM(File pomFile) throws Exception;
-    }
-
-    private static void foreachPoms(File poms, POMHandler handler) {
-        try {
-            LineNumberReader reader = new LineNumberReader(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 pom = st.nextToken();
-                File pomFile = new File(pom);
-                while (st.hasMoreTokens()) {
-                    String option = st.nextToken();
-                    if ("--ignore".equals(option)) {
-                        handler.ignorePOM(pomFile);
-                        break;
-                    }
-                }
-            }
-
-            reader = new LineNumberReader(new FileReader(poms));
-            newline:
-            while ((line = reader.readLine()) != null) {
-                line = line.trim();
-                StringTokenizer st = new StringTokenizer(line, " \t");
-                if (!st.hasMoreTokens() || line.startsWith("#")) {
-                    continue;
-                }
-                String pom = st.nextToken();
-                File pomFile = new File(pom);
-                boolean noParent = false;
-                while (st.hasMoreTokens()) {
-                    String option = st.nextToken();
-                    if ("--no-parent".equals(option)) {
-                        noParent = true;
-                    } else if ("--ignore".equals(option)) {
-                        break newline;
-                    }
-                }
-                handler.handlePOM(pomFile, noParent);
-            }
-        } catch (Exception ex) {
-            ex.printStackTrace();
-        }
-    }
-
-    public static Map getPomOptions(File poms) {
-        final Map pomOptions = new HashMap();
-        foreachPoms(poms, new POMHandler() {
-
-            public void handlePOM(File pomFile, boolean noParent) throws Exception {
-                String option = "";
-                if (noParent) {
-                    option = "--no-parent";
-                }
-                pomOptions.put(pomFile.getAbsoluteFile(), option);
-            }
-
-            public void ignorePOM(File pomFile) throws Exception {
-                pomOptions.put(pomFile.getAbsoluteFile(), "--ignore");
-            }
-        });
-
-        return pomOptions;
-    }
-
     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.");
@@ -857,12 +819,6 @@
                 } else {
                     ignoreRulesFile = new File(arg.substring("--ignore-rules=".length()));
                 }
-                if (ignoreRulesFile.exists()) {
-                    transformer.addIgnoreRules(ignoreRulesFile);
-                } else {
-                    System.err.println("Cannot find file: " + ignoreRulesFile);
-                }
-
             } else if (arg.startsWith("-e")) {
                 setVersion = arg.substring(2);
             } else if (arg.startsWith("--set-version=")) {
@@ -877,21 +833,27 @@
 
         transformer.setVerbose(verbose);
 
-        File poms = null;
-        File pom = null;
+        ListOfPOMs listOfPOMs;
 
         if (singlePom) {
-            pom = new File(args[i++].trim());
-        } else if (i + 1 < args.length) {
-            poms = new File(args[i++].trim());
+            String pomPath = args[i++].trim();
+            listOfPOMs = new ListOfPOMs();
+            ListOfPOMs.POMOptions options = listOfPOMs.addPOM(pomPath);
+            options.setNoParent(noParent);
         } else {
-            poms = new File("debian/" + debianPackage + ".poms");
+            File poms;
+            if (i + 1 < args.length) {
+                poms = new File(args[i++].trim());
+            } else {
+                poms = new File("debian/" + debianPackage + ".poms");
+            }
+            listOfPOMs = new ListOfPOMs(poms);
         }
+        transformer.setListOfPOMs(listOfPOMs);
 
         if (noRules) {
             transformer.addRule(DependencyRule.NO_CHANGE_RULE);
         } else {
-            transformer.addDefaultRules();
             if (rulesFile != null) {
                 if (!rulesFile.exists()) {
                     if (verbose) {
@@ -899,54 +861,44 @@
                     }
 
                 } else {
-                    transformer.addRules(rulesFile);
+                    transformer.getRules().setRulesFile(rulesFile);
                 }
 
             } else {
                 System.out.println("No rules file");
             }
 
-            if (keepPomVersion) {
-                if (singlePom) {
-                    try {
-                        transformer.keepPomVersion(pom);
-                    } catch (XMLStreamException e) {
-                        e.printStackTrace();
-                    } catch (FileNotFoundException e) {
-                        e.printStackTrace();
-                    }
+            if (ignoreRulesFile != null) {
+                if (ignoreRulesFile.exists()) {
+                    transformer.getIgnoreRules().setRulesFile(ignoreRulesFile);
                 } else {
-                    transformer.keepPomVersions(poms, debianPackage);
+                    System.err.println("Cannot find file: " + ignoreRulesFile);
                 }
             }
 
+            if (keepPomVersion) {
+                transformer.keepPomVersions();
+            }
+
             if (publishedRulesFile != null) {
                 if (publishedRulesFile.exists()) {
-                    transformer.addPublishedRules(publishedRulesFile);
+                    transformer.getPublishedRules().setRulesFile(publishedRulesFile);
                 } else {
                     System.err.println("Cannot find file: " + publishedRulesFile);
                 }
 
             }
+            
+            transformer.addDefaultRules();
         }
 
         if (mavenRepo != null) {
             Repository repository = new Repository(mavenRepo);
             transformer.setRepository(repository);
-            transformer.addPluginRulesFromRepository();
+            transformer.usePluginVersionsFromRepository();
         }
 
-        if (singlePom) {
-            try {
-                transformer.transformPom(pom, debianPackage, noParent, keepPomVersion, setVersion);
-            } catch (XMLStreamException e) {
-                e.printStackTrace();
-            } catch (IOException e) {
-                e.printStackTrace();
-            }
-        } else {
-            transformer.transformPoms(poms, debianPackage, keepPomVersion, setVersion);
-        }
+        transformer.transformPoms(debianPackage, keepPomVersion, setVersion);
     }
 
     private static int inc(int i, String[] args) {
@@ -955,4 +907,5 @@
         } while (i < args.length && args[i].length() == 0);
         return i;
     }
+
 }

Modified: trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/Repository.java
===================================================================
--- trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/Repository.java	2010-07-23 23:08:27 UTC (rev 12808)
+++ trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/Repository.java	2010-07-25 12:23:25 UTC (rev 12809)
@@ -8,23 +8,15 @@
 import java.io.FileNotFoundException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 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;
 
 /**
  *
- * @author ludo
+ * @author Ludovic Claude <ludovicc at users.sourceforge.net>
  */
 public class Repository {
 
@@ -46,6 +38,9 @@
             // 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");
             }
         } catch (XMLStreamException ex) {
             log.log(Level.SEVERE, null, ex);
@@ -64,6 +59,28 @@
         return (POMInfo) 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
      *
@@ -78,7 +95,7 @@
 
         // Map<DependencyRule,POMInfo>
         Map potentialMatches = new TreeMap();
-        for (Iterator i = resolvedPomsIterator(); i.hasNext();) {
+        for (Iterator i = getAllPoms().iterator(); i.hasNext();) {
             POMInfo testPom = (POMInfo) i.next();
             Set rules = testPom.getPublishedRules(true);
             for (Iterator j = rules.iterator(); j.hasNext();) {
@@ -120,7 +137,6 @@
         if (scanned) {
             return;
         }
-        scanned = true;
         scan();
     }
 
@@ -146,6 +162,7 @@
             }
             unresolved = unresolvedPoms.size();
         }
+        scanned = true;
     }
 
     public void report() {
@@ -238,21 +255,58 @@
             }
             orderedPoms.add(pom);
         }
-        System.out.println("POM files with the most issues:");
-        int count = 0;
-        for (Iterator i = pomsWithNumberOfIssues.values().iterator(); i.hasNext() && count < 10;) {
-            List orderedPoms = (List) i.next();
-            for (Iterator j = orderedPoms.iterator(); j.hasNext() && count < 10; count++) {
-                File pom = (File) j.next();
-                List missingDeps = (List) pomsWithIssues.get(pom);
-                System.out.println("Missing dependencies in " + pom);
-                for (Iterator k = missingDeps.iterator(); k.hasNext();) {
-                    Dependency dependency = (Dependency) k.next();
-                    System.out.println("\t" + dependency);
+        if (!pomsWithNumberOfIssues.isEmpty()) {
+            System.out.println("Top 10 POM files with issues:");
+            int count = 0;
+            for (Iterator i = pomsWithNumberOfIssues.values().iterator(); i.hasNext() && count < 10;) {
+                List orderedPoms = (List) i.next();
+                for (Iterator j = orderedPoms.iterator(); j.hasNext() && count < 10; count++) {
+                    File pom = (File) j.next();
+                    List missingDeps = (List) pomsWithIssues.get(pom);
+                    System.out.println("Missing dependencies in " + pom);
+                    for (Iterator k = missingDeps.iterator(); k.hasNext();) {
+                        Dependency dependency = (Dependency) k.next();
+                        System.out.println("\t" + dependency);
+                    }
                 }
             }
         }
 
+        // Find the dependencies that need packaging most
+        Map missingDependenciesCounts = new HashMap();
+        for (Iterator i = pomsWithIssues.entrySet().iterator(); i.hasNext();) {
+            Entry entry = (Entry) i.next();
+            List missingDeps = (List) entry.getValue();
+            for (Iterator j = missingDeps.iterator(); j.hasNext();) {
+                Dependency missingDependency = (Dependency) j.next();
+                Integer lastCount = (Integer) missingDependenciesCounts.remove(missingDependency);
+                if (lastCount == null) {
+                    lastCount = new Integer(0);
+                }
+                missingDependenciesCounts.put(missingDependency, new Integer(lastCount.intValue() + 1));
+            }
+        }
+        List missingDependenciesCountList = new ArrayList(missingDependenciesCounts.entrySet());
+        Collections.sort(missingDependenciesCountList, new Comparator() {
+
+            public int compare(Object o, Object o2) {
+                Map.Entry entry1 = (Entry) o;
+                Map.Entry entry2 = (Entry) o2;
+                Integer count1 = (Integer) entry1.getValue();
+                Integer count2 = (Integer) entry2.getValue();
+                return count2.compareTo(count1);
+            }
+        });
+        if (! missingDependenciesCountList.isEmpty()) {
+            System.out.println("Top 10 missing dependencies:");
+            int count = 0;
+            for (Iterator i = missingDependenciesCountList.iterator(); i.hasNext() && count < 10; count++) {
+                Map.Entry entry = (Entry) i.next();
+                Dependency missingDependency = (Dependency) entry.getKey();
+                Integer numberOfTimes = (Integer) entry.getValue();
+                System.out.println("Missing dependency " + missingDependency + " is needed in " + numberOfTimes + " places");
+            }
+        }
     }
 
     private void resolveAll(Map file2pom) {
@@ -260,7 +314,11 @@
         Map copy = new HashMap(file2pom);
         for (Iterator i = copy.entrySet().iterator(); i.hasNext();) {
             Entry entry = (Entry) i.next();
-            registerPom((File) entry.getKey(), (POMInfo) entry.getValue());
+            try {
+                registerPom((File) entry.getKey(), (POMInfo) entry.getValue());
+            } catch (DependencyNotFoundException e) {
+                // Ignore
+            }
         }
     }
 
@@ -277,12 +335,14 @@
                     ex.printStackTrace();
                 } catch (FileNotFoundException ex) {
                     ex.printStackTrace();
+                } catch (DependencyNotFoundException ex) {
+                    // Ignore
                 }
             }
         }
     }
 
-    public void registerPom(File file, POMInfo pomInfo) {
+    public void registerPom(File file, POMInfo pomInfo) throws DependencyNotFoundException {
         dep2info.put(pomInfo.getThisPom(), pomInfo);
         unresolvedPoms.put(file, pomInfo);
 
@@ -292,13 +352,13 @@
                 POMInfo foundParent = getPOM(pomInfo.getParent());
                 if (foundParent == null) {
                     pomsWithMissingParent.put(file, pomInfo);
-                    return;
+                    throw new DependencyNotFoundException(pomInfo.getParent());
                 } else {
                     parentPOM = foundParent;
                     pomsWithMissingParent.remove(file);
                 }
                 if (!resolvedPoms.values().contains(parentPOM)) {
-                    return;
+                    throw new DependencyNotFoundException(parentPOM.getThisPom());
                 }
             }
         } finally {
@@ -307,23 +367,24 @@
             // the true parent POM is not known and will be eliminated, yet we need
             // the versions from the super POM.
             pomInfo.mergeManagement(parentPOM);
+
+            pomsWithMissingVersions.remove(file);
+            for (Iterator i = pomInfo.getDependencies().iterator(); i.hasNext();) {
+                Dependency dependency = (Dependency) i.next();
+                if (dependency.getVersion() == null) {
+                    pomsWithMissingVersions.put(file, pomInfo);
+                }
+            }
+            for (Iterator i = pomInfo.getPlugins().iterator(); i.hasNext();) {
+                Dependency dependency = (Dependency) i.next();
+                if (dependency.getVersion() == null) {
+                    pomsWithMissingVersions.put(file, pomInfo);
+                }
+            }
         }
 
         resolvedPoms.put(file, pomInfo);
         unresolvedPoms.remove(file);
-
-        for (Iterator i = pomInfo.getDependencies().iterator(); i.hasNext();) {
-            Dependency dependency = (Dependency) i.next();
-            if (dependency.getVersion() == null) {
-                pomsWithMissingVersions.put(file, pomInfo);
-            }
-        }
-        for (Iterator i = pomInfo.getPlugins().iterator(); i.hasNext();) {
-            Dependency dependency = (Dependency) i.next();
-            if (dependency.getVersion() == null) {
-                pomsWithMissingVersions.put(file, pomInfo);
-            }
-        }
     }
 
     public static void main(String[] args) {

Modified: trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/Rule.java
===================================================================
--- trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/Rule.java	2010-07-23 23:08:27 UTC (rev 12808)
+++ trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/Rule.java	2010-07-25 12:23:25 UTC (rev 12809)
@@ -4,6 +4,10 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+/**
+ *
+ * @author Ludovic Claude <ludovicc at users.sourceforge.net>
+ */
 public class Rule {
     private static Pattern generic = Pattern.compile("([\\[\\?\\+\\*\\|])|([^\\\\]\\.)");
 
@@ -27,13 +31,18 @@
 
     public boolean match(String s) {
         if (s == null) {
-            return isGeneric();
+            return matchesNull();
         }
         return pattern.matcher(s).matches();
     }
 
     public String apply(String s) {
         if (s == null) {
+            if (matchesNull()) {
+                if (replace.indexOf("$1") < 0) {
+                    return replace;
+                }
+            }
             return null;
         }
         Matcher m = pattern.matcher(s);
@@ -47,9 +56,14 @@
     }
 
     public boolean isGeneric() {
-        return generic.matcher(pattern.pattern()).find();
+        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();
     }

Modified: trunk/maven-repo-helper/src/main/share/mh_lib.sh
===================================================================
--- trunk/maven-repo-helper/src/main/share/mh_lib.sh	2010-07-23 23:08:27 UTC (rev 12808)
+++ trunk/maven-repo-helper/src/main/share/mh_lib.sh	2010-07-25 12:23:25 UTC (rev 12809)
@@ -4,7 +4,7 @@
 # - package selection
 #
 
-MH_VERSION=${MH_VERSION:-1.1}
+MH_VERSION=${MH_VERSION:-1.2}
 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"
 

Modified: trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/DependencyRuleTest.java
===================================================================
--- trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/DependencyRuleTest.java	2010-07-23 23:08:27 UTC (rev 12808)
+++ trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/DependencyRuleTest.java	2010-07-25 12:23:25 UTC (rev 12809)
@@ -17,13 +17,19 @@
      * Test of matches method, of class DependencyRule.
      */
     public void testMatches() {
-        Dependency dependency = new Dependency("javax.servlet", "servlet-api", "jar", "2.3");
         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));
     }
 
     /**

Added: trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/ListOfPOMsTest.java
===================================================================
--- trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/ListOfPOMsTest.java	                        (rev 0)
+++ trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/ListOfPOMsTest.java	2010-07-25 12:23:25 UTC (rev 12809)
@@ -0,0 +1,17 @@
+package org.debian.maven.repo;
+
+/**
+ * @author ludo
+ */
+public class ListOfPOMsTest extends TestBase {
+
+    public void testRead() throws Exception {
+        ListOfPOMs poms = new ListOfPOMs(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());
+    }
+}

Modified: trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/POMCleanerTest.java
===================================================================
--- trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/POMCleanerTest.java	2010-07-23 23:08:27 UTC (rev 12808)
+++ trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/POMCleanerTest.java	2010-07-25 12:23:25 UTC (rev 12809)
@@ -16,6 +16,17 @@
     private File pomProperties;
     private File specialDependencies;
 
+    private POMCleaner instance;
+
+    public void setUp() {
+        super.setUp();
+        instance = new POMCleaner();
+        instance.getRules().setRulesFile(null);
+        instance.getIgnoreRules().setRulesFile(null);
+        instance.getPublishedRules().setRulesFile(null);
+    }
+
+
     public void tearDown() {
         super.tearDown();
         if (specialDependencies != null && specialDependencies.exists()) {
@@ -35,7 +46,6 @@
         pomProperties = new File(testDir, "pom.properties");
         usePom("maven.xml");
         boolean noParent = true;
-        POMCleaner instance = new POMCleaner();
         instance.addDefaultRules();
         instance.addRule(new DependencyRule("org.codehaus.plexus plexus-container-default jar s/1\\.0-alpha-.*/1.0-alpha/"));
         instance.cleanPom(pom, updatedPom, pomProperties, noParent, false, null, "maven2");
@@ -56,7 +66,6 @@
         pomProperties = new File(testDir, "pom.properties");
         usePom("modello-core.xml");
         boolean noParent = false;
-        POMCleaner instance = new POMCleaner();
         instance.addDefaultRules();
         instance.cleanPom(pom, updatedPom, pomProperties, noParent, false, null, "libmodello-java");
         assertXMLEqual(read("modello-core.cleaned"), read(updatedPom));
@@ -87,7 +96,6 @@
         pomProperties = new File(testDir, "pom.properties");
         usePom("wagon-http-lightweight.xml");
         boolean noParent = false;
-        POMCleaner instance = new POMCleaner();
         instance.addDefaultRules();
         instance.cleanPom(pom, updatedPom, pomProperties, noParent, false, null, "libwagon-java");
         assertXMLEqual(read("wagon-http-lightweight.cleaned"), read(updatedPom));
@@ -107,7 +115,6 @@
         pomProperties = new File(testDir, "pom.properties");
         usePom("plexus-container-default.xml");
         boolean noParent = true;
-        POMCleaner instance = new POMCleaner();
         instance.addDefaultRules();
         instance.addRule(new DependencyRule("org.codehaus.plexus plexus-container-default jar s/1\\.0-alpha-.*/1.0-alpha/"));
         instance.cleanPom(pom, updatedPom, pomProperties, noParent, false, null, "libplexus-container-default-java");
@@ -128,7 +135,6 @@
         pomProperties = new File(testDir, "pom.properties");
         usePom("plexus-active-collections.pom");
         boolean noParent = true;
-        POMCleaner instance = new POMCleaner();
         instance.addDefaultRules();
         instance.addRule(new DependencyRule("junit junit jar s/3\\..*/3.x/"));
         instance.addRule(new DependencyRule("org.codehaus.plexus plexus-container-default jar s/1\\.0-alpha.*/1.0-alpha/"));
@@ -151,7 +157,6 @@
         pomProperties = new File(testDir, "pom.properties");
         usePom("plexus-archiver.pom");
         boolean noParent = true;
-        POMCleaner instance = new POMCleaner();
         instance.addDefaultRules();
         instance.cleanPom(pom, updatedPom, pomProperties, noParent, false, null, "libplexus-archiver-java");
         assertXMLEqual(read("plexus-archiver.cleaned"), read(updatedPom));
@@ -171,7 +176,6 @@
         pomProperties = new File(testDir, "pom.properties");
         usePom("slf4j.xml");
         boolean noParent = true;
-        POMCleaner instance = new POMCleaner();
         instance.addDefaultRules();
         instance.cleanPom(pom, updatedPom, pomProperties, noParent, false, null, "libslf4j-java");
         assertXMLEqual(read("slf4j.cleaned"), read(updatedPom));
@@ -191,7 +195,6 @@
         pomProperties = new File(testDir, "pom.properties");
         usePom("commons-validator.xml");
         boolean noParent = true;
-        POMCleaner instance = new POMCleaner();
         instance.addDefaultRules();
         instance.addRule(new DependencyRule("junit junit jar s/3\\..*/3.x/"));
         instance.cleanPom(pom, updatedPom, pomProperties, noParent, false, null, "libcommons-validator-java");
@@ -212,7 +215,6 @@
         pomProperties = new File(testDir, "pom.properties");
         usePom("servlet-api.pom");
         boolean noParent = true;
-        POMCleaner instance = new POMCleaner();
         instance.addDefaultRules();
         instance.addRule(new DependencyRule("s/org.apache.tomcat/javax.servlet/ servlet-api jar s/.*/2.5/"));
         instance.cleanPom(pom, updatedPom, pomProperties, noParent, false, null, "libservlet2.5-java");
@@ -229,16 +231,15 @@
     /**
      * Test of cleanPom method, of class POMCleaner.
      */
-    public void testCleanHibernateValidatorPom() throws Exception {
+    public void testCleanHibernateValidatorParentPom() throws Exception {
         pomProperties = new File(testDir, "pom.properties");
-        usePom("hibernate-validator.pom");
+        usePom("hibernate-validator-parent.pom");
         boolean noParent = true;
-        POMCleaner instance = new POMCleaner();
         instance.addDefaultRules();
         instance.addIgnoreRule(new DependencyRule("org.apache.maven.wagon wagon-webdav jar *"));
         instance.addIgnoreRule(new DependencyRule("org.jboss.maven.plugins maven-jdocbook-plugin maven-plugin *"));
         instance.cleanPom(pom, updatedPom, pomProperties, noParent, false, null, "libhibernate-validator-java");
-        assertXMLEqual(read("hibernate-validator.cleaned"), read(updatedPom));
+        assertXMLEqual(read("hibernate-validator-parent.cleaned"), read(updatedPom));
         Properties pomInfo = new Properties();
         pomInfo.load(new FileInputStream(pomProperties));
         assertEquals("org.hibernate", pomInfo.get("groupId"));

Modified: trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/POMReaderTest.java
===================================================================
--- trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/POMReaderTest.java	2010-07-23 23:08:27 UTC (rev 12808)
+++ trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/POMReaderTest.java	2010-07-25 12:23:25 UTC (rev 12809)
@@ -4,6 +4,8 @@
  */
 package org.debian.maven.repo;
 
+import java.util.Iterator;
+
 /**
  *
  * @author ludo
@@ -52,13 +54,18 @@
         assertEquals("2.1", dependency.getVersion());
         assertEquals("maven-plugin", dependency.getType());
 
-        assertEquals(6, info.getPlugins().size());
-        dependency = (Dependency) info.getPlugins().get(0);
+        assertEquals(0, info.getPlugins().size());
+        assertEquals(0, info.getReportingPlugins().size());
+
+        assertEquals(2, info.getProfilePlugins().size());
+        dependency = (Dependency) info.getProfilePlugins().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.getProfileReportingPlugins().size());
+
         assertEquals(2, info.getProperties().size());
         assertEquals("2.1.0-SNAPSHOT", info.getProperties().get("mavenVersion"));
         assertEquals("1.0-beta-5", info.getProperties().get("wagonVersion"));
@@ -69,4 +76,192 @@
 
     }
 
+    public void testReadHibernateValidatorTckRunner() throws Exception {
+        usePom("hibernate-validator-tck-runner.pom");
+        POMReader instance = new POMReader();
+        POMInfo info = instance.readPom(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().size());
+        Dependency dependency = (Dependency) info.getDependencies().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.getDependencyManagement().size());
+        assertEquals(0, info.getProfileDependencies().size());
+        assertEquals(0, info.getProfileDependencyManagement().size());
+        assertEquals(0, info.getPluginManagement().size());
+
+        assertEquals(3, info.getPlugins().size());
+        dependency = (Dependency) info.getPlugins().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.getProfilePlugins().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());
+    }
+
+    public void testReadHibernateValidator() throws Exception {
+        usePom("hibernate-validator.pom");
+        POMReader instance = new POMReader();
+        POMInfo info = instance.readPom(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().size());
+        Dependency dependency = (Dependency) info.getDependencies().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 = (Dependency) info.getDependencies().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 = (Dependency) info.getDependencies().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 = (Dependency) info.getDependencies().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 = (Dependency) info.getDependencies().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 = (Dependency) info.getDependencies().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.getDependencyManagement().size());
+        assertEquals(2, info.getProfileDependencies().size());
+        assertEquals(0, info.getProfileDependencyManagement().size());
+        assertEquals(0, info.getPluginManagement().size());
+
+        assertEquals(1, info.getReportingPlugins().size());
+        dependency = (Dependency) info.getReportingPlugins().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.getPlugins().size());
+        dependency = (Dependency) info.getPlugins().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 = (Dependency) info.getPlugins().get(1);
+        assertEquals("org.codehaus.mojo", dependency.getGroupId());
+        assertEquals("jaxb2-maven-plugin", dependency.getArtifactId());
+        assertEquals(null, dependency.getVersion());
+        assertEquals("maven-plugin", dependency.getType());
+
+        dependency = (Dependency) info.getPlugins().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 = (Dependency) info.getPlugins().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 = (Dependency) info.getPlugins().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 = (Dependency) info.getPlugins().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 = (Dependency) info.getPlugins().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 = (Dependency) info.getPlugins().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 = (Dependency) info.getPlugins().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.getProfilePlugins().size());
+        assertEquals(1, info.getPluginDependencies().size());
+        dependency = (Dependency) info.getPluginDependencies().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());
+    }
+
 }
\ No newline at end of file

Modified: trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/POMTransformerTest.java
===================================================================
--- trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/POMTransformerTest.java	2010-07-23 23:08:27 UTC (rev 12808)
+++ trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/POMTransformerTest.java	2010-07-25 12:23:25 UTC (rev 12809)
@@ -4,6 +4,8 @@
  */
 package org.debian.maven.repo;
 
+import org.custommonkey.xmlunit.XMLUnit;
+
 import java.io.File;
 
 /**
@@ -12,13 +14,22 @@
  */
 public class POMTransformerTest extends TestBase {
 
+    private POMTransformer instance;
+
+    public void setUp() {
+        super.setUp();
+        instance = new POMTransformer();
+        instance.getRules().setRulesFile(null);
+        instance.getIgnoreRules().setRulesFile(null);
+        instance.getPublishedRules().setRulesFile(null);
+    }
+
     /**
      * Test of cleanPom method, of class POMCleaner.
      */
     public void testTransformMavenPom() throws Exception {
         usePom("maven.xml");
         boolean noParent = true;
-        POMTransformer instance = new POMTransformer();
         instance.addDefaultRules();
         instance.addRule(new DependencyRule("org.codehaus.plexus plexus-container-default jar s/1\\.0-alpha-.*/1.0-alpha/"));
         instance.addRule(new DependencyRule("org.apache.maven.plugins maven-assembly-plugin maven-plugin s/.*/2.2/"));
@@ -32,7 +43,6 @@
     public void testTransformMavenCorePom() throws Exception {
         usePom("maven-core.xml");
         boolean noParent = false;
-        POMTransformer instance = new POMTransformer();
         instance.addDefaultRules();
         instance.addRule(new DependencyRule("org.codehaus.plexus plexus-container-default jar s/1\\.0-alpha-.*/1.0-alpha/"));
         instance.transformPom(pom, updatedPom, noParent, false, null, "maven2");
@@ -43,9 +53,10 @@
      * Test of cleanPom method, of class POMCleaner.
      */
     public void testTransformMavenJavadocPluginPom() throws Exception {
+        XMLUnit.setIgnoreComments(true);
+
         usePom("maven-javadoc-plugin.xml");
         boolean noParent = true;
-        POMTransformer instance = new POMTransformer();
         instance.addDefaultRules();
         instance.addRule(new DependencyRule("org.codehaus.modello modello-maven-plugin maven-plugin s/.*/1.0.1/"));
         instance.addRule(new DependencyRule("org.codehaus.mojo clirr-maven-plugin * *"));
@@ -61,7 +72,6 @@
     public void testTransformModelloPom() throws Exception {
         usePom("modello-core.xml");
         boolean noParent = false;
-        POMTransformer instance = new POMTransformer();
         instance.addDefaultRules();
         instance.transformPom(pom, updatedPom, noParent, false, null, "libmodello-java");
         assertXMLEqual(read("modello-core.transformed"), read(updatedPom));
@@ -72,7 +82,6 @@
      */
     public void testTransformPlexusContainerDefaultPom() throws Exception {
         usePom("plexus-container-default.xml");
-        POMTransformer instance = new POMTransformer();
         instance.addDefaultRules();
         instance.addRule(new DependencyRule("org.codehaus.plexus plexus-container-default jar s/1\\.0-alpha-.*/1.0-alpha/"));
         instance.transformPom(pom, updatedPom);
@@ -85,7 +94,6 @@
     public void testTransformDoxiaFmlPom() throws Exception {
         usePom("doxia-module-fml.xml");
         boolean noParent = false;
-        POMTransformer instance = new POMTransformer();
         instance.addDefaultRules();
         instance.transformPom(pom, updatedPom, noParent, true, null, "libdoxia-java");
         assertXMLEqual(read("doxia-module-fml.transformed"), read(updatedPom));
@@ -97,7 +105,6 @@
     public void testTransformAntlr3Pom() throws Exception {
         usePom("antlr3.xml");
         boolean noParent = false;
-        POMTransformer instance = new POMTransformer();
         instance.addDefaultRules();
         instance.addRule(new DependencyRule("org.antlr stringtemplate * s/3\\..*/3.x/ *"));
         instance.addRule(new DependencyRule("antlr antlr jar s/2\\..*/2.x/ *"));
@@ -115,7 +122,6 @@
     public void testTransformAntlr3ParentPom() throws Exception {
         usePom("antlr3-parent.xml");
         boolean noParent = false;
-        POMTransformer instance = new POMTransformer();
         instance.addDefaultRules();
         instance.addRule(new DependencyRule("org.antlr stringtemplate * s/3\\..*/3.x/ *"));
         instance.addRule(new DependencyRule("antlr antlr jar s/2\\..*/2.x/ *"));
@@ -137,9 +143,10 @@
      * Test of cleanPom method, of class POMCleaner.
      */
     public void testTransformAntlr3ToolsPom() throws Exception {
+        XMLUnit.setIgnoreComments(true);
+
         usePom("antlr3-tools.xml");
         boolean noParent = false;
-        POMTransformer instance = new POMTransformer();
         Repository repository = new Repository(new File("/usr/share/maven-repo"));
         instance.setRepository(repository);
 
@@ -149,7 +156,7 @@
         instance.addRule(new DependencyRule("junit junit jar s/4\\..*/4.x/ *"));
         instance.addRule(new DependencyRule("org.antlr stringtemplate jar s/3\\..*/3.x/ *"));
         instance.addRule(new DependencyRule("org.antlr antlr3-maven-plugin maven-plugin s/.*/3.2/"));
-        instance.addPluginRulesFromRepository();
+        instance.usePluginVersionsFromRepository();
         //instance.addRule(new DependencyRule("org.codehaus.mojo antlr-maven-plugin maven-plugin s/.*/2.1/"));
         instance.addIgnoreRule(new DependencyRule("org.codehaus.mojo findbugs-maven-plugin maven-plugin *"));
         instance.addIgnoreRule(new DependencyRule("org.codehaus.mojo buildnumber-maven-plugin maven-plugin *"));
@@ -162,4 +169,36 @@
         assertXMLEqual(read("antlr3-tools.transformed"), read(updatedPom));
     }
 
+    /**
+     * Test of cleanPom method, of class POMCleaner.
+     */
+    public void testTransformHivernateValidatorTckRunnerPom() throws Exception {
+        usePom("hibernate-validator-tck-runner.pom");
+        boolean noParent = false;
+        Repository repository = new Repository(new File("/usr/share/maven-repo"));
+        instance.setRepository(repository);
+
+        instance.addDefaultRules();
+        instance.usePluginVersionsFromRepository();
+
+        instance.transformPom(pom, updatedPom, noParent, true, null, "libhibernate-validator-java");
+        assertXMLEqual(read("hibernate-validator-tck-runner.transformed"), read(updatedPom));
+    }
+
+    /**
+     * Test of cleanPom method, of class POMCleaner.
+     */
+    public void testTransformHivernateValidatorPom() throws Exception {
+        usePom("hibernate-validator.pom");
+        boolean noParent = false;
+        Repository repository = new Repository(new File("/usr/share/maven-repo"));
+        instance.setRepository(repository);
+
+        instance.addDefaultRules();
+        instance.usePluginVersionsFromRepository();
+
+        instance.transformPom(pom, updatedPom, noParent, true, null, "libhibernate-validator-java");
+        assertXMLEqual(read("hibernate-validator.transformed"), read(updatedPom));
+    }
+
 }

Added: trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/RepositoryTest.java
===================================================================
--- trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/RepositoryTest.java	                        (rev 0)
+++ trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/RepositoryTest.java	2010-07-25 12:23:25 UTC (rev 12809)
@@ -0,0 +1,113 @@
+package org.debian.maven.repo;
+
+import javax.xml.stream.XMLStreamException;
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: ludo
+ * Date: 5 juil. 2010
+ * Time: 23:50:05
+ * To change this template use File | Settings | File Templates.
+ */
+public class RepositoryTest extends TestBase {
+
+    public void testScan() throws Exception {
+        Repository repo = getRepository();
+        repo.scan();
+
+        assertEquals(8, repo.getResolvedPoms().size());
+        assertEquals(0, repo.getUnresolvedPoms().size());
+        assertEquals(0, repo.getPomsWithMissingParent().size());
+        assertEquals(0, 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));
+    }
+
+    public void testRegisterPom() throws Exception {
+        Repository repo = getRepository();
+        repo.scan();
+
+        File pomFile = getFileInClasspath("antlr3-tools.xml");
+        POMInfo pom = getAntlrPom(repo, pomFile);
+        try {
+            repo.registerPom(pomFile, pom);
+        } catch (DependencyNotFoundException ignore) {}
+
+        assertEquals(8, repo.getResolvedPoms().size());
+        assertEquals(1, repo.getUnresolvedPoms().size());
+        assertEquals(1, repo.getPomsWithMissingParent().size());
+        assertEquals(1, repo.getPomsWithMissingVersions().size());
+
+        assertEquals(pom, repo.getPOM(pom.getThisPom()));
+        assertEquals(pom, repo.searchMatchingPOM(pom.getThisPom()));
+    }
+
+    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 = 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.addDefaultRules();
+        pomCleaner.addRule(new DependencyRule("org.antlr * * s/3\\..*/3.x/"));
+        POMInfo pom = pomCleaner.transformPom(pomFile, updatedPom);
+        return pom;
+    }
+
+    private Repository getRepository() {
+        File baseDir = getFileInClasspath("repository/root.dir");
+        baseDir = baseDir.getParentFile();
+
+        return new Repository(baseDir);
+    }
+}

Modified: trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/TestBase.java
===================================================================
--- trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/TestBase.java	2010-07-23 23:08:27 UTC (rev 12808)
+++ trunk/maven-repo-helper/src/test/java/org/debian/maven/repo/TestBase.java	2010-07-25 12:23:25 UTC (rev 12809)
@@ -12,6 +12,8 @@
 import java.io.InputStreamReader;
 import java.io.LineNumberReader;
 import java.io.Reader;
+import java.net.URISyntaxException;
+import java.net.URL;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
@@ -70,6 +72,20 @@
         useFile(resource, pom);
     }
 
+    protected File getFileInClasspath(String resource) {
+        if (! resource.startsWith("/")) {
+            resource = "/" + resource;
+        }
+        URL url = this.getClass().getResource(resource);
+        File f;
+        try {
+          f = new File(url.toURI());
+        } catch(URISyntaxException e) {
+          f = new File(url.getPath());
+        }
+        return f;
+    }
+
     protected Reader read(String resource) {
         Reader r = new InputStreamReader(this.getClass().getResourceAsStream("/" + resource));
         openedReaders.add(r);

Modified: trunk/maven-repo-helper/src/test/resources/antlr3-tools.transformed
===================================================================
--- trunk/maven-repo-helper/src/test/resources/antlr3-tools.transformed	2010-07-23 23:08:27 UTC (rev 12808)
+++ trunk/maven-repo-helper/src/test/resources/antlr3-tools.transformed	2010-07-25 12:23:25 UTC (rev 12809)
@@ -63,6 +63,9 @@
 						</goals>
 					</execution>
 				</executions>
+				<!-- version is inserted because of the implicit rules coming from the repository
+				     (it may change if the version of antlr-maven-plugin is upgraded in the repository,
+				     so update this value) -->
 				<version>2.1</version>
 			</plugin>
 			<plugin>

Added: trunk/maven-repo-helper/src/test/resources/antlr3.poms
===================================================================
--- trunk/maven-repo-helper/src/test/resources/antlr3.poms	                        (rev 0)
+++ trunk/maven-repo-helper/src/test/resources/antlr3.poms	2010-07-25 12:23:25 UTC (rev 12809)
@@ -0,0 +1,6 @@
+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

Modified: trunk/maven-repo-helper/src/test/resources/commons-validator.cleaned
===================================================================
--- trunk/maven-repo-helper/src/test/resources/commons-validator.cleaned	2010-07-23 23:08:27 UTC (rev 12808)
+++ trunk/maven-repo-helper/src/test/resources/commons-validator.cleaned	2010-07-25 12:23:25 UTC (rev 12809)
@@ -8,6 +8,12 @@
 	<properties>
 		<debian.originalVersion>1.3.1</debian.originalVersion>
 		<debian.package>libcommons-validator-java</debian.package>
+		<debian.commons-beanutils.commons-beanutils.originalVersion>1.7.0</debian.commons-beanutils.commons-beanutils.originalVersion>
+		<debian.commons-digester.commons-digester.originalVersion>1.6</debian.commons-digester.commons-digester.originalVersion>
+		<debian.commons-logging.commons-logging.originalVersion>1.0.4</debian.commons-logging.commons-logging.originalVersion>
+		<debian.junit.junit.originalVersion>3.8.1</debian.junit.junit.originalVersion>
+		<debian.oro.oro.originalVersion>2.0.8</debian.oro.oro.originalVersion>
+		<debian.xml-apis.xml-apis.originalVersion>2.0.2</debian.xml-apis.xml-apis.originalVersion>
 	</properties>
 
 	<name>Validator</name>

Modified: trunk/maven-repo-helper/src/test/resources/doxia-module-fml.transformed
===================================================================
--- trunk/maven-repo-helper/src/test/resources/doxia-module-fml.transformed	2010-07-23 23:08:27 UTC (rev 12808)
+++ trunk/maven-repo-helper/src/test/resources/doxia-module-fml.transformed	2010-07-25 12:23:25 UTC (rev 12809)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
         <modelVersion>4.0.0</modelVersion>
         <groupId>org.apache.maven.doxia</groupId>
         <artifactId>doxia-module-fml</artifactId>

Added: trunk/maven-repo-helper/src/test/resources/hibernate-validator-parent.cleaned
===================================================================
--- trunk/maven-repo-helper/src/test/resources/hibernate-validator-parent.cleaned	                        (rev 0)
+++ trunk/maven-repo-helper/src/test/resources/hibernate-validator-parent.cleaned	2010-07-25 12:23:25 UTC (rev 12809)
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.hibernate</groupId>
+	<artifactId>hibernate-validator-parent</artifactId>
+	<version>debian</version>
+	<packaging>pom</packaging>
+	<properties>
+		<debian.originalVersion>4.0.2.GA</debian.originalVersion>
+		<debian.package>libhibernate-validator-java</debian.package>
+	</properties>
+
+	<name>Hibernate Validator Parent</name>
+	<url>http://validator.hibernate.org</url>
+	<description>Hibernate's Bean Validation (JSR-303) reference implementation.</description>
+	<developers>
+		<developer>
+			<id>epbernard</id>
+			<name>Emmanuel Bernard</name>
+			<email>emmanuel at hibernate.org</email>
+			<organization>JBoss, a division of Red Hat</organization>
+			<url>http://in.relation.to/Bloggers/Emmanuel</url>
+		</developer>
+		<developer>
+			<id>hardy.ferentschik</id>
+			<name>Hardy Ferentschik</name>
+			<email>hferents at redhat.com</email>
+			<organization>JBoss, a division of Red Hat</organization>
+			<url>http://in.relation.to/Bloggers/Hardy</url>
+		</developer>
+	</developers>
+	<mailingLists>
+		<mailingList>
+			<name>hibernate-dev</name>
+			<post>hibernate-dev at lists.jboss.org</post>
+		</mailingList>
+	</mailingLists>
+	<modules>
+		<module>hibernate-validator</module>
+		<module>hibernate-validator-archetype</module>
+		<module>hibernate-validator-legacy</module>
+		<module>hibernate-validator-tck-runner</module>
+	</modules>
+	<dependencyManagement>
+		<dependencies>
+			<dependency>
+				<groupId>javax.validation</groupId>
+				<artifactId>validation-api</artifactId>
+				<version>debian</version>
+			</dependency>
+			<dependency>
+				<groupId>org.slf4j</groupId>
+				<artifactId>slf4j-api</artifactId>
+				<version>debian</version>
+			</dependency>
+			<dependency>
+				<groupId>org.slf4j</groupId>
+				<artifactId>slf4j-log4j12</artifactId>
+				<version>debian</version>
+			</dependency>
+			<dependency>
+				<groupId>org.testng</groupId>
+				<artifactId>testng</artifactId>
+				<version>debian</version>
+				<classifier>jdk15</classifier>
+			</dependency>
+		</dependencies>
+	</dependencyManagement>
+	<issueManagement>
+		<system>JIRA</system>
+		<url>http://opensource.atlassian.com/projects/hibernate/browse/HV</url>
+	</issueManagement>
+	<inceptionYear>2007</inceptionYear>
+	<licenses>
+		<license>
+			<name>Apache License, Version 2.0</name>
+			<url>license.txt</url>
+		</license>
+	</licenses>
+	<scm>
+		<connection>scm:svn:https://svn.jboss.org/repos/hibernate/validator/tags/v4_0_2_GA</connection>
+		<url>http://fisheye.jboss.org/browse/Hibernate/validator/tags/v4_0_2_GA</url>
+	</scm>
+</project>
\ No newline at end of file

Added: trunk/maven-repo-helper/src/test/resources/hibernate-validator-parent.pom
===================================================================
--- trunk/maven-repo-helper/src/test/resources/hibernate-validator-parent.pom	                        (rev 0)
+++ trunk/maven-repo-helper/src/test/resources/hibernate-validator-parent.pom	2010-07-25 12:23:25 UTC (rev 12809)
@@ -0,0 +1,250 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.hibernate</groupId>
+    <artifactId>hibernate-validator-parent</artifactId>
+    <packaging>pom</packaging>
+    <version>4.0.2.GA</version>
+    <name>Hibernate Validator Parent</name>
+    <url>http://validator.hibernate.org</url>
+
+    <description>
+        Hibernate's Bean Validation (JSR-303) reference implementation.
+    </description>
+
+    <developers>
+        <developer>
+            <id>epbernard</id>
+            <name>Emmanuel Bernard</name>
+            <email>emmanuel at hibernate.org</email>
+            <organization>JBoss, a division of Red Hat</organization>
+            <url>http://in.relation.to/Bloggers/Emmanuel</url>
+        </developer>
+        <developer>
+            <id>hardy.ferentschik</id>
+            <name>Hardy Ferentschik</name>
+            <email>hferents at redhat.com</email>
+            <organization>JBoss, a division of Red Hat</organization>
+            <url>http://in.relation.to/Bloggers/Hardy</url>
+        </developer>
+    </developers>
+
+    <mailingLists>
+        <mailingList>
+            <name>hibernate-dev</name>
+            <post>hibernate-dev at lists.jboss.org</post>
+        </mailingList>
+    </mailingLists>
+
+    <modules>
+        <module>hibernate-validator</module>
+        <module>hibernate-validator-archetype</module>
+        <module>hibernate-validator-legacy</module>
+        <module>hibernate-validator-tck-runner</module>
+    </modules>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>javax.validation</groupId>
+                <artifactId>validation-api</artifactId>
+                <version>1.0.0.GA</version>
+            </dependency>
+            <dependency>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-api</artifactId>
+                <version>1.5.6</version>
+            </dependency>
+            <dependency>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-log4j12</artifactId>
+                <version>1.5.6</version>
+            </dependency>
+            <dependency>
+                <groupId>org.testng</groupId>
+                <artifactId>testng</artifactId>
+                <version>5.8</version>
+                <classifier>jdk15</classifier>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <build>
+        <extensions>
+            <extension>
+                <groupId>org.apache.maven.wagon</groupId>
+                <artifactId>wagon-webdav</artifactId>
+                <version>1.0-beta-2</version>
+            </extension>
+        </extensions>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-jar-plugin</artifactId>
+                    <version>2.2</version>
+                    <configuration>
+                        <archive>
+                            <manifestEntries>
+                                <Implementation-Title>${pom.artifactId}</Implementation-Title>
+                                <Implementation-Version>${pom.version}</Implementation-Version>
+                                <Implementation-Vendor>${pom.groupId}</Implementation-Vendor>
+                                <Implementation-Vendor-Id>${pom.groupId}</Implementation-Vendor-Id>
+                                <Implementation-URL>${pom.url}</Implementation-URL>
+                                <Specification-Title>Bean Validation</Specification-Title>
+                            </manifestEntries>
+                        </archive>
+                    </configuration>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-compiler-plugin</artifactId>
+                    <version>2.0.2</version>
+                    <configuration>
+                        <source>1.5</source>
+                        <target>1.5</target>
+                    </configuration>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-surefire-plugin</artifactId>
+                    <configuration>
+                        <forkMode>always</forkMode>
+                        <redirectTestOutputToFile>true</redirectTestOutputToFile>
+                        <includes>
+                            <include>**/*Test.java</include>
+                        </includes>
+                    </configuration>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-source-plugin</artifactId>
+                    <executions>
+                        <execution>
+                            <id>attach-sources</id>
+                            <goals>
+                                <goal>jar</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                </plugin>
+                <plugin>
+                    <artifactId>maven-assembly-plugin</artifactId>
+                    <configuration>
+                        <descriptorRefs>
+                            <descriptorRef>project</descriptorRef>
+                        </descriptorRefs>
+                    </configuration>
+                </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-release-plugin</artifactId>
+                    <version>2.0-beta-9</version>
+                    <configuration>
+                        <preparationGoals>clean install</preparationGoals>
+                        <autoVersionSubmodules>true</autoVersionSubmodules>
+                        <allowTimestampedSnapshots>true</allowTimestampedSnapshots>
+                        <remoteTagging>true</remoteTagging>
+                        <goals>package site assembly:assembly deploy</goals>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
+
+    <ciManagement>
+        <system>Hudson</system>
+        <url>http://hudson.qa.jboss.com/hudson/job/beanvalidation</url>
+    </ciManagement>
+
+    <issueManagement>
+        <system>JIRA</system>
+        <url>http://opensource.atlassian.com/projects/hibernate/browse/HV</url>
+    </issueManagement>
+
+    <inceptionYear>2007</inceptionYear>
+
+    <licenses>
+        <license>
+            <name>Apache License, Version 2.0</name>
+            <url>license.txt</url>
+        </license>
+    </licenses>
+
+    <scm>
+        <connection>scm:svn:https://svn.jboss.org/repos/hibernate/validator/tags/v4_0_2_GA</connection>
+        <url>http://fisheye.jboss.org/browse/Hibernate/validator/tags/v4_0_2_GA</url>
+    </scm>
+
+    <distributionManagement>
+        <repository>
+            <!-- Copy the dist to the local checkout of the JBoss maven2 repo ${maven.repository.root} -->
+            <!-- It is anticipated that ${maven.repository.root} be set in user's settings.xml -->
+            <!-- todo : replace this with direct svn access once the svnkit providers are available -->
+            <id>repository.jboss.org</id>
+            <url>file://${maven.repository.root}</url>
+        </repository>
+        <snapshotRepository>
+            <id>snapshots.jboss.org</id>
+            <name>JBoss Snapshot Repository</name>
+            <url>dav:https://snapshots.jboss.org/maven2</url>
+        </snapshotRepository>
+    </distributionManagement>
+
+    <reporting>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-project-info-reports-plugin</artifactId>
+                <version>2.0.1</version>
+            </plugin>
+            <plugin>
+                <artifactId>maven-javadoc-plugin</artifactId>
+                <reportSets>
+                    <reportSet>
+                        <id>html</id>
+                        <configuration>
+                            <tags>
+                                <tag>
+                                    <name>todo</name>
+                                    <placement>a</placement>
+                                    <head>ToDo:</head>
+                                </tag>
+                            </tags>
+                        </configuration>
+                        <reports>
+                            <report>javadoc</report>
+                        </reports>
+                    </reportSet>
+                </reportSets>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>jxr-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <artifactId>maven-surefire-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <artifactId>maven-clover-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-pmd-plugin</artifactId>
+                <configuration>
+                    <targetJdk>1.5</targetJdk>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>taglist-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>changelog-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>changes-maven-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </reporting>
+</project>
\ No newline at end of file

Added: trunk/maven-repo-helper/src/test/resources/hibernate-validator-tck-runner.pom
===================================================================
--- trunk/maven-repo-helper/src/test/resources/hibernate-validator-tck-runner.pom	                        (rev 0)
+++ trunk/maven-repo-helper/src/test/resources/hibernate-validator-tck-runner.pom	2010-07-25 12:23:25 UTC (rev 12809)
@@ -0,0 +1,246 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <parent>
+        <artifactId>hibernate-validator-parent</artifactId>
+        <groupId>org.hibernate</groupId>
+        <version>4.0.2.GA</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>hibernate-validator-tck-runner</artifactId>
+    <name>Hibernate Validator TCK Runner</name>
+    <description>Aggregates dependencies and run's the JSR-303 TCK</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>javax.validation</groupId>
+            <artifactId>validation-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-validator</artifactId>
+            <version>${version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.testng</groupId>
+            <artifactId>testng</artifactId>
+            <classifier>jdk15</classifier>
+        </dependency>
+        <dependency>
+            <groupId>org.hibernate.jsr303.tck</groupId>
+            <artifactId>jsr303-tck</artifactId>
+            <version>1.0.1.GA</version>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.test-harness</groupId>
+            <artifactId>jboss-test-harness-jboss-as-51</artifactId>
+            <version>1.0.0</version>
+        </dependency>
+    </dependencies>
+
+    <properties>
+        <jboss.home>/opt/java/jboss-5.1.0.GA</jboss.home>
+        <validation.provider>org.hibernate.validator.HibernateValidator</validation.provider>
+        <remote.debug />
+    </properties>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copy</id>
+                        <phase>generate-test-sources</phase>
+                        <goals>
+                            <goal>copy</goal>
+                        </goals>
+                        <configuration>
+                            <stripVersion>true</stripVersion>
+                            <artifactItems>
+                                <artifactItem>
+                                    <groupId>org.hibernate.jsr303.tck</groupId>
+                                    <artifactId>jsr303-tck</artifactId>
+                                    <type>xml</type>
+                                    <classifier>suite</classifier>
+                                    <overWrite>false</overWrite>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>javax.validation</groupId>
+                                    <artifactId>validation-api</artifactId>
+                                    <overWrite>true</overWrite>
+                                    <outputDirectory>${project.build.directory}/dependency/lib</outputDirectory>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>org.hibernate</groupId>
+                                    <artifactId>hibernate-validator</artifactId>
+                                    <overWrite>true</overWrite>
+                                    <outputDirectory>${project.build.directory}/dependency/lib</outputDirectory>
+                                </artifactItem>
+                                <artifactItem>
+                                    <groupId>org.slf4j</groupId>
+                                    <artifactId>slf4j-log4j12</artifactId>
+                                    <overWrite>true</overWrite>
+                                    <outputDirectory>${project.build.directory}/dependency/lib</outputDirectory>
+                                </artifactItem>
+                            </artifactItems>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <suiteXmlFiles>
+                        <suiteXmlFile>${project.build.directory}/dependency/jsr303-tck-suite.xml</suiteXmlFile>
+                    </suiteXmlFiles>
+                    <argLine>-Xmx128m</argLine>
+                    <forkMode>once</forkMode>
+                    <systemProperties>
+                        <property>
+                            <name>validation.provider</name>
+                            <value>${validation.provider}</value>
+                        </property>
+                    </systemProperties>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-report-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>generate-test-report</id>
+                        <phase>test</phase>
+                        <goals>
+                            <goal>report-only</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <outputDirectory>${project.build.directory}/surefire-reports</outputDirectory>
+                    <outputName>test-report</outputName>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+    <profiles>
+        <profile>
+            <id>incontainer-debug</id>
+            <activation>
+                <property>
+                    <name>debug</name>
+                </property>
+            </activation>
+            <properties>
+                <remote.debug>-Xnoagent -Djava.compiler=NONE -Xdebug
+                    -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
+                </remote.debug>
+            </properties>
+        </profile>
+        <profile>
+            <id>incontainer</id>
+            <activation>
+                <property>
+                    <name>incontainer</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-surefire-plugin</artifactId>
+                        <configuration>
+                            <suiteXmlFiles>
+                                <suiteXmlFile>${project.build.directory}/dependency/jsr303-tck-suite.xml</suiteXmlFile>
+                            </suiteXmlFiles>
+                            <systemProperties>
+                                <property>
+                                    <name>validation.provider</name>
+                                    <value>${validation.provider}</value>
+                                </property>
+                                <property>
+                                    <name>org.jboss.testharness.standalone</name>
+                                    <value>false</value>
+                                </property>
+                                <property>
+                                    <name>jboss.home</name>
+                                    <value>${jboss.home}</value>
+                                </property>
+                                <property>
+                                    <name>org.jboss.testharness.container.javaOpts</name>
+                                    <value>-Xms128m -Xmx384m -XX:MaxPermSize=128m -Dorg.jboss.resolver.warning=true
+                                        -Dvalidation.provider=${validation.provider} ${remote.debug}
+                                    </value>
+                                </property>
+                                <property>
+                                    <name>org.jboss.testharness.container.forceRestart</name>
+                                    <value>true</value>
+                                </property>
+                                <property>
+                                    <name>org.jboss.testharness.runIntegrationTests</name>
+                                    <value>true</value>
+                                </property>
+                                <property>
+                                    <name>org.jboss.testharness.libraryDirectory</name>
+                                    <value>target/dependency/lib</value>
+                                </property>
+                                <property>
+                                    <name>org.jboss.testharness.outputDirectory</name>
+                                    <value>target</value>
+                                </property>
+                            </systemProperties>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+            <id>write-artifacts-to-disk</id>
+            <activation>
+                <property>
+                    <name>dumpArtifacts</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>generate-jsr-303-artifacts</id>
+                                <phase>test-compile</phase>
+                                <goals>
+                                    <goal>java</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                        <configuration>
+                            <classpathScope>test</classpathScope>
+                            <mainClass>org.jboss.testharness.api.TCK</mainClass>
+                            <systemProperties>
+                                <systemProperty>
+                                    <key>dumpArtifacts</key>
+                                    <value>true</value>
+                                </systemProperty>
+                                <systemProperty>
+                                    <key>org.jboss.testharness.outputDirectory</key>
+                                    <value>target/jsr303-artifacts</value>
+                                </systemProperty>
+                                <systemProperty>
+                                    <key>org.jboss.testharness.libraryDirectory</key>
+                                    <value>target/jsr303-artifacts/dependencies</value>
+                                </systemProperty>
+                            </systemProperties>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+</project>
\ No newline at end of file

Added: trunk/maven-repo-helper/src/test/resources/hibernate-validator-tck-runner.transformed
===================================================================
--- trunk/maven-repo-helper/src/test/resources/hibernate-validator-tck-runner.transformed	                        (rev 0)
+++ trunk/maven-repo-helper/src/test/resources/hibernate-validator-tck-runner.transformed	2010-07-25 12:23:25 UTC (rev 12809)
@@ -0,0 +1,255 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.hibernate</groupId>
+	<artifactId>hibernate-validator-tck-runner</artifactId>
+	<version>4.0.2.GA</version>
+	<packaging>jar</packaging>
+	<parent>
+		<groupId>org.hibernate</groupId>
+		<artifactId>hibernate-validator-parent</artifactId>
+		<version>4.0.2.GA</version>
+	</parent>
+
+	<name>Hibernate Validator TCK Runner</name>
+	<description>Aggregates dependencies and run's the JSR-303 TCK</description>
+	<dependencies>
+		<dependency>
+			<groupId>javax.validation</groupId>
+			<artifactId>validation-api</artifactId>
+			<version>debian</version>
+		</dependency>
+		<dependency>
+			<groupId>org.hibernate</groupId>
+			<artifactId>hibernate-validator</artifactId>
+			<version>debian</version>
+		</dependency>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-log4j12</artifactId>
+			<scope>runtime</scope>
+			<version>debian</version>
+		</dependency>
+		<dependency>
+			<groupId>org.testng</groupId>
+			<artifactId>testng</artifactId>
+			<classifier>jdk15</classifier>
+			<version>debian</version>
+		</dependency>
+		<dependency>
+			<groupId>org.hibernate.jsr303.tck</groupId>
+			<artifactId>jsr303-tck</artifactId>
+			<version>debian</version>
+		</dependency>
+		<dependency>
+			<groupId>org.jboss.test-harness</groupId>
+			<artifactId>jboss-test-harness-jboss-as-51</artifactId>
+			<version>debian</version>
+		</dependency>
+	</dependencies>
+	<properties>
+		<jboss.home>/opt/java/jboss-5.1.0.GA</jboss.home>
+		<validation.provider>org.hibernate.validator.HibernateValidator</validation.provider>
+		<remote.debug>
+		</remote.debug>
+		<debian.originalVersion>4.0.2.GA</debian.originalVersion>
+		<debian.package>libhibernate-validator-java</debian.package>
+	</properties>
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-dependency-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>copy</id>
+						<phase>generate-test-sources</phase>
+						<goals>
+							<goal>copy</goal>
+						</goals>
+						<configuration>
+							<stripVersion>true</stripVersion>
+							<artifactItems>
+								<artifactItem>
+									<groupId>org.hibernate.jsr303.tck</groupId>
+									<artifactId>jsr303-tck</artifactId>
+									<type>xml</type>
+									<classifier>suite</classifier>
+									<overWrite>false</overWrite>
+								</artifactItem>
+								<artifactItem>
+									<groupId>javax.validation</groupId>
+									<artifactId>validation-api</artifactId>
+									<overWrite>true</overWrite>
+									<outputDirectory>${project.build.directory}/dependency/lib</outputDirectory>
+								</artifactItem>
+								<artifactItem>
+									<groupId>org.hibernate</groupId>
+									<artifactId>hibernate-validator</artifactId>
+									<overWrite>true</overWrite>
+									<outputDirectory>${project.build.directory}/dependency/lib</outputDirectory>
+								</artifactItem>
+								<artifactItem>
+									<groupId>org.slf4j</groupId>
+									<artifactId>slf4j-log4j12</artifactId>
+									<overWrite>true</overWrite>
+									<outputDirectory>${project.build.directory}/dependency/lib</outputDirectory>
+								</artifactItem>
+							</artifactItems>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-surefire-plugin</artifactId>
+				<configuration>
+					<suiteXmlFiles>
+						<suiteXmlFile>${project.build.directory}/dependency/jsr303-tck-suite.xml</suiteXmlFile>
+					</suiteXmlFiles>
+					<argLine>-Xmx128m</argLine>
+					<forkMode>once</forkMode>
+					<systemProperties>
+						<property>
+							<name>validation.provider</name>
+							<value>${validation.provider}</value>
+						</property>
+					</systemProperties>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-surefire-report-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>generate-test-report</id>
+						<phase>test</phase>
+						<goals>
+							<goal>report-only</goal>
+						</goals>
+					</execution>
+				</executions>
+				<configuration>
+					<outputDirectory>${project.build.directory}/surefire-reports</outputDirectory>
+					<outputName>test-report</outputName>
+				</configuration>
+				<version>2.4.3</version>
+			</plugin>
+		</plugins>
+	</build>
+	<profiles>
+		<profile>
+			<id>incontainer-debug</id>
+			<activation>
+				<property>
+					<name>debug</name>
+				</property>
+			</activation>
+			<properties>
+				<remote.debug>-Xnoagent -Djava.compiler=NONE -Xdebug
+                    -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
+				</remote.debug>
+			</properties>
+		</profile>
+		<profile>
+			<id>incontainer</id>
+			<activation>
+				<property>
+					<name>incontainer</name>
+				</property>
+			</activation>
+			<build>
+				<plugins>
+					<plugin>
+						<groupId>org.apache.maven.plugins</groupId>
+						<artifactId>maven-surefire-plugin</artifactId>
+						<configuration>
+							<suiteXmlFiles>
+								<suiteXmlFile>${project.build.directory}/dependency/jsr303-tck-suite.xml</suiteXmlFile>
+							</suiteXmlFiles>
+							<systemProperties>
+								<property>
+									<name>validation.provider</name>
+									<value>${validation.provider}</value>
+								</property>
+								<property>
+									<name>org.jboss.testharness.standalone</name>
+									<value>false</value>
+								</property>
+								<property>
+									<name>jboss.home</name>
+									<value>${jboss.home}</value>
+								</property>
+								<property>
+									<name>org.jboss.testharness.container.javaOpts</name>
+									<value>-Xms128m -Xmx384m -XX:MaxPermSize=128m -Dorg.jboss.resolver.warning=true
+                                        -Dvalidation.provider=${validation.provider} ${remote.debug}
+									</value>
+								</property>
+								<property>
+									<name>org.jboss.testharness.container.forceRestart</name>
+									<value>true</value>
+								</property>
+								<property>
+									<name>org.jboss.testharness.runIntegrationTests</name>
+									<value>true</value>
+								</property>
+								<property>
+									<name>org.jboss.testharness.libraryDirectory</name>
+									<value>target/dependency/lib</value>
+								</property>
+								<property>
+									<name>org.jboss.testharness.outputDirectory</name>
+									<value>target</value>
+								</property>
+							</systemProperties>
+						</configuration>
+					</plugin>
+				</plugins>
+			</build>
+		</profile>
+		<profile>
+			<id>write-artifacts-to-disk</id>
+			<activation>
+				<property>
+					<name>dumpArtifacts</name>
+				</property>
+			</activation>
+			<build>
+				<plugins>
+					<plugin>
+						<groupId>org.codehaus.mojo</groupId>
+						<artifactId>exec-maven-plugin</artifactId>
+						<executions>
+							<execution>
+								<id>generate-jsr-303-artifacts</id>
+								<phase>test-compile</phase>
+								<goals>
+									<goal>java</goal>
+								</goals>
+							</execution>
+						</executions>
+						<configuration>
+							<classpathScope>test</classpathScope>
+							<mainClass>org.jboss.testharness.api.TCK</mainClass>
+							<systemProperties>
+								<systemProperty>
+									<key>dumpArtifacts</key>
+									<value>true</value>
+								</systemProperty>
+								<systemProperty>
+									<key>org.jboss.testharness.outputDirectory</key>
+									<value>target/jsr303-artifacts</value>
+								</systemProperty>
+								<systemProperty>
+									<key>org.jboss.testharness.libraryDirectory</key>
+									<value>target/jsr303-artifacts/dependencies</value>
+								</systemProperty>
+							</systemProperties>
+						</configuration>
+					</plugin>
+				</plugins>
+			</build>
+		</profile>
+	</profiles>
+</project>
\ No newline at end of file

Deleted: trunk/maven-repo-helper/src/test/resources/hibernate-validator.cleaned
===================================================================
--- trunk/maven-repo-helper/src/test/resources/hibernate-validator.cleaned	2010-07-23 23:08:27 UTC (rev 12808)
+++ trunk/maven-repo-helper/src/test/resources/hibernate-validator.cleaned	2010-07-25 12:23:25 UTC (rev 12809)
@@ -1,84 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-	<modelVersion>4.0.0</modelVersion>
-	<groupId>org.hibernate</groupId>
-	<artifactId>hibernate-validator-parent</artifactId>
-	<version>debian</version>
-	<packaging>pom</packaging>
-	<properties>
-		<debian.originalVersion>4.0.2.GA</debian.originalVersion>
-		<debian.package>libhibernate-validator-java</debian.package>
-	</properties>
-
-	<name>Hibernate Validator Parent</name>
-	<url>http://validator.hibernate.org</url>
-	<description>Hibernate's Bean Validation (JSR-303) reference implementation.</description>
-	<developers>
-		<developer>
-			<id>epbernard</id>
-			<name>Emmanuel Bernard</name>
-			<email>emmanuel at hibernate.org</email>
-			<organization>JBoss, a division of Red Hat</organization>
-			<url>http://in.relation.to/Bloggers/Emmanuel</url>
-		</developer>
-		<developer>
-			<id>hardy.ferentschik</id>
-			<name>Hardy Ferentschik</name>
-			<email>hferents at redhat.com</email>
-			<organization>JBoss, a division of Red Hat</organization>
-			<url>http://in.relation.to/Bloggers/Hardy</url>
-		</developer>
-	</developers>
-	<mailingLists>
-		<mailingList>
-			<name>hibernate-dev</name>
-			<post>hibernate-dev at lists.jboss.org</post>
-		</mailingList>
-	</mailingLists>
-	<modules>
-		<module>hibernate-validator</module>
-		<module>hibernate-validator-archetype</module>
-		<module>hibernate-validator-legacy</module>
-		<module>hibernate-validator-tck-runner</module>
-	</modules>
-	<dependencyManagement>
-		<dependencies>
-			<dependency>
-				<groupId>javax.validation</groupId>
-				<artifactId>validation-api</artifactId>
-				<version>debian</version>
-			</dependency>
-			<dependency>
-				<groupId>org.slf4j</groupId>
-				<artifactId>slf4j-api</artifactId>
-				<version>debian</version>
-			</dependency>
-			<dependency>
-				<groupId>org.slf4j</groupId>
-				<artifactId>slf4j-log4j12</artifactId>
-				<version>debian</version>
-			</dependency>
-			<dependency>
-				<groupId>org.testng</groupId>
-				<artifactId>testng</artifactId>
-				<version>debian</version>
-				<classifier>jdk15</classifier>
-			</dependency>
-		</dependencies>
-	</dependencyManagement>
-	<issueManagement>
-		<system>JIRA</system>
-		<url>http://opensource.atlassian.com/projects/hibernate/browse/HV</url>
-	</issueManagement>
-	<inceptionYear>2007</inceptionYear>
-	<licenses>
-		<license>
-			<name>Apache License, Version 2.0</name>
-			<url>license.txt</url>
-		</license>
-	</licenses>
-	<scm>
-		<connection>scm:svn:https://svn.jboss.org/repos/hibernate/validator/tags/v4_0_2_GA</connection>
-		<url>http://fisheye.jboss.org/browse/Hibernate/validator/tags/v4_0_2_GA</url>
-	</scm>
-</project>
\ No newline at end of file

Modified: trunk/maven-repo-helper/src/test/resources/hibernate-validator.pom
===================================================================
--- trunk/maven-repo-helper/src/test/resources/hibernate-validator.pom	2010-07-23 23:08:27 UTC (rev 12808)
+++ trunk/maven-repo-helper/src/test/resources/hibernate-validator.pom	2010-07-25 12:23:25 UTC (rev 12809)
@@ -1,250 +1,280 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <parent>
+        <artifactId>hibernate-validator-parent</artifactId>
+        <groupId>org.hibernate</groupId>
+        <version>4.0.2.GA</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.hibernate</groupId>
-    <artifactId>hibernate-validator-parent</artifactId>
-    <packaging>pom</packaging>
-    <version>4.0.2.GA</version>
-    <name>Hibernate Validator Parent</name>
-    <url>http://validator.hibernate.org</url>
+    <artifactId>hibernate-validator</artifactId>
+    <name>Hibernate Validator</name>
+    <distributionManagement>
+        <site>
+            <id>site</id>
+            <url>http://validator.hibernate.org</url>
+        </site>
+    </distributionManagement>
+    <dependencies>
+        <!--
+        Compile time dependencies
+        -->
+        <dependency>
+            <groupId>javax.validation</groupId>
+            <artifactId>validation-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.googlecode.jtype</groupId>
+            <artifactId>jtype</artifactId>
+            <version>0.1.0</version>
+        </dependency>
 
-    <description>
-        Hibernate's Bean Validation (JSR-303) reference implementation.
-    </description>
+        <!--
+        Runtime dependencies
+        -->
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+            <scope>runtime</scope>
+            <optional>true</optional>
+        </dependency>
 
-    <developers>
-        <developer>
-            <id>epbernard</id>
-            <name>Emmanuel Bernard</name>
-            <email>emmanuel at hibernate.org</email>
-            <organization>JBoss, a division of Red Hat</organization>
-            <url>http://in.relation.to/Bloggers/Emmanuel</url>
-        </developer>
-        <developer>
-            <id>hardy.ferentschik</id>
-            <name>Hardy Ferentschik</name>
-            <email>hferents at redhat.com</email>
-            <organization>JBoss, a division of Red Hat</organization>
-            <url>http://in.relation.to/Bloggers/Hardy</url>
-        </developer>
-    </developers>
+        <!--
+        Optional dependencies
+        -->
+        <dependency>
+            <groupId>org.hibernate.java-persistence</groupId>
+            <artifactId>jpa-api</artifactId>
+            <version>2.0.Beta-20090815</version>
+            <optional>true</optional>
+        </dependency>
 
-    <mailingLists>
-        <mailingList>
-            <name>hibernate-dev</name>
-            <post>hibernate-dev at lists.jboss.org</post>
-        </mailingList>
-    </mailingLists>
-
-    <modules>
-        <module>hibernate-validator</module>
-        <module>hibernate-validator-archetype</module>
-        <module>hibernate-validator-legacy</module>
-        <module>hibernate-validator-tck-runner</module>
-    </modules>
-
-    <dependencyManagement>
-        <dependencies>
-            <dependency>
-                <groupId>javax.validation</groupId>
-                <artifactId>validation-api</artifactId>
-                <version>1.0.0.GA</version>
-            </dependency>
-            <dependency>
-                <groupId>org.slf4j</groupId>
-                <artifactId>slf4j-api</artifactId>
-                <version>1.5.6</version>
-            </dependency>
-            <dependency>
-                <groupId>org.slf4j</groupId>
-                <artifactId>slf4j-log4j12</artifactId>
-                <version>1.5.6</version>
-            </dependency>
-            <dependency>
-                <groupId>org.testng</groupId>
-                <artifactId>testng</artifactId>
-                <version>5.8</version>
-                <classifier>jdk15</classifier>
-            </dependency>
-        </dependencies>
-    </dependencyManagement>
-
+        <!--
+        Test dependencies
+        -->
+        <dependency>
+            <groupId>org.testng</groupId>
+            <artifactId>testng</artifactId>
+            <scope>test</scope>
+            <classifier>jdk15</classifier>
+        </dependency>
+    </dependencies>
     <build>
-        <extensions>
-            <extension>
-                <groupId>org.apache.maven.wagon</groupId>
-                <artifactId>wagon-webdav</artifactId>
-                <version>1.0-beta-2</version>
-            </extension>
-        </extensions>
-        <pluginManagement>
-            <plugins>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-jar-plugin</artifactId>
-                    <version>2.2</version>
-                    <configuration>
-                        <archive>
-                            <manifestEntries>
-                                <Implementation-Title>${pom.artifactId}</Implementation-Title>
-                                <Implementation-Version>${pom.version}</Implementation-Version>
-                                <Implementation-Vendor>${pom.groupId}</Implementation-Vendor>
-                                <Implementation-Vendor-Id>${pom.groupId}</Implementation-Vendor-Id>
-                                <Implementation-URL>${pom.url}</Implementation-URL>
-                                <Specification-Title>Bean Validation</Specification-Title>
-                            </manifestEntries>
-                        </archive>
-                    </configuration>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-compiler-plugin</artifactId>
-                    <version>2.0.2</version>
-                    <configuration>
-                        <source>1.5</source>
-                        <target>1.5</target>
-                    </configuration>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-surefire-plugin</artifactId>
-                    <configuration>
-                        <forkMode>always</forkMode>
-                        <redirectTestOutputToFile>true</redirectTestOutputToFile>
-                        <includes>
-                            <include>**/*Test.java</include>
-                        </includes>
-                    </configuration>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-source-plugin</artifactId>
-                    <executions>
-                        <execution>
-                            <id>attach-sources</id>
-                            <goals>
-                                <goal>jar</goal>
-                            </goals>
-                        </execution>
-                    </executions>
-                </plugin>
-                <plugin>
-                    <artifactId>maven-assembly-plugin</artifactId>
-                    <configuration>
-                        <descriptorRefs>
-                            <descriptorRef>project</descriptorRef>
-                        </descriptorRefs>
-                    </configuration>
-                </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-release-plugin</artifactId>
-                    <version>2.0-beta-9</version>
-                    <configuration>
-                        <preparationGoals>clean install</preparationGoals>
-                        <autoVersionSubmodules>true</autoVersionSubmodules>
-                        <allowTimestampedSnapshots>true</allowTimestampedSnapshots>
-                        <remoteTagging>true</remoteTagging>
-                        <goals>package site assembly:assembly deploy</goals>
-                    </configuration>
-                </plugin>
-            </plugins>
-        </pluginManagement>
-    </build>
-
-    <ciManagement>
-        <system>Hudson</system>
-        <url>http://hudson.qa.jboss.com/hudson/job/beanvalidation</url>
-    </ciManagement>
-
-    <issueManagement>
-        <system>JIRA</system>
-        <url>http://opensource.atlassian.com/projects/hibernate/browse/HV</url>
-    </issueManagement>
-
-    <inceptionYear>2007</inceptionYear>
-
-    <licenses>
-        <license>
-            <name>Apache License, Version 2.0</name>
-            <url>license.txt</url>
-        </license>
-    </licenses>
-
-    <scm>
-        <connection>scm:svn:https://svn.jboss.org/repos/hibernate/validator/tags/v4_0_2_GA</connection>
-        <url>http://fisheye.jboss.org/browse/Hibernate/validator/tags/v4_0_2_GA</url>
-    </scm>
-
-    <distributionManagement>
-        <repository>
-            <!-- Copy the dist to the local checkout of the JBoss maven2 repo ${maven.repository.root} -->
-            <!-- It is anticipated that ${maven.repository.root} be set in user's settings.xml -->
-            <!-- todo : replace this with direct svn access once the svnkit providers are available -->
-            <id>repository.jboss.org</id>
-            <url>file://${maven.repository.root}</url>
-        </repository>
-        <snapshotRepository>
-            <id>snapshots.jboss.org</id>
-            <name>JBoss Snapshot Repository</name>
-            <url>dav:https://snapshots.jboss.org/maven2</url>
-        </snapshotRepository>
-    </distributionManagement>
-
-    <reporting>
+        <defaultGoal>test</defaultGoal>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+                <filtering>true</filtering>
+            </resource>
+            <resource>
+                <directory>src/main/xsd</directory>
+                <targetPath>META-INF</targetPath>
+            </resource>
+        </resources>
         <plugins>
             <plugin>
+                <inherited>true</inherited>
                 <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-project-info-reports-plugin</artifactId>
-                <version>2.0.1</version>
+                <artifactId>maven-source-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>attach-sources</id>
+                        <goals>
+                            <goal>jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
             </plugin>
             <plugin>
-                <artifactId>maven-javadoc-plugin</artifactId>
-                <reportSets>
-                    <reportSet>
-                        <id>html</id>
-                        <configuration>
-                            <tags>
-                                <tag>
-                                    <name>todo</name>
-                                    <placement>a</placement>
-                                    <head>ToDo:</head>
-                                </tag>
-                            </tags>
-                        </configuration>
-                        <reports>
-                            <report>javadoc</report>
-                        </reports>
-                    </reportSet>
-                </reportSets>
-            </plugin>
-            <plugin>
                 <groupId>org.codehaus.mojo</groupId>
-                <artifactId>jxr-maven-plugin</artifactId>
+                <artifactId>jaxb2-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>xjc</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <packageName>org.hibernate.validator.xml</packageName>
+                    <outputDirectory>${basedir}/target/generated-sources</outputDirectory>
+                    <extension>true</extension>
+                </configuration>
             </plugin>
             <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <suiteXmlFiles>
+                        <suiteXmlFile>${basedir}/src/test/suite/unit-tests.xml</suiteXmlFile>
+                    </suiteXmlFiles>
+                </configuration>
             </plugin>
             <plugin>
-                <artifactId>maven-clover-plugin</artifactId>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-report-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>generate-test-report</id>
+                        <phase>test</phase>
+                        <goals>
+                            <goal>report-only</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <outputDirectory>${project.build.directory}/surefire-reports</outputDirectory>
+                    <outputName>test-report</outputName>
+                </configuration>
             </plugin>
+
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-pmd-plugin</artifactId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <artifactSet>
+                                <includes>
+                                    <include>com.googlecode.jtype:jtype</include>
+                                </includes>
+                            </artifactSet>
+                            <relocations>
+                                <relocation>
+                                    <pattern>com.googlecode.jtype</pattern>
+                                    <shadedPattern>org.hibernate.validator.jtype</shadedPattern>
+                                </relocation>
+                            </relocations>
+                            <transformers>
+                                <transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer" />
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.jboss.maven.plugins</groupId>
+                <artifactId>maven-jdocbook-plugin</artifactId>
+                <version>2.2.0</version>
+                <extensions>true</extensions>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.hibernate</groupId>
+                        <artifactId>hibernate-jdocbook-style</artifactId>
+                        <version>2.0.0</version>
+                        <type>jdocbook-style</type>
+                    </dependency>
+                </dependencies>
                 <configuration>
-                    <targetJdk>1.5</targetJdk>
+                    <sourceDocumentName>master.xml</sourceDocumentName>
+                    <sourceDirectory>${basedir}/src/main/docbook</sourceDirectory>
+                    <masterTranslation>en-US</masterTranslation>
+                    <imageResource>
+                        <directory>${basedir}/src/main/docbook/en-US/images</directory>
+                    </imageResource>
+                    <formats>
+                        <format>
+                            <formatName>pdf</formatName>
+                            <stylesheetResource>classpath:/xslt/org/hibernate/jdocbook/xslt/pdf.xsl</stylesheetResource>
+                            <finalName>hibernate_reference.pdf</finalName>
+                        </format>
+                        <format>
+                            <formatName>html_single</formatName>
+                            <stylesheetResource>classpath:/xslt/org/hibernate/jdocbook/xslt/xhtml-single.xsl
+                            </stylesheetResource>
+                            <finalName>index.html</finalName>
+                        </format>
+                        <format>
+                            <formatName>html</formatName>
+                            <stylesheetResource>classpath:/xslt/org/hibernate/jdocbook/xslt/xhtml.xsl
+                            </stylesheetResource>
+                            <finalName>index.html</finalName>
+                        </format>
+                    </formats>
+                    <options>
+                        <xincludeSupported>true</xincludeSupported>
+                        <xmlTransformerType>saxon</xmlTransformerType>
+                        <!-- needed for uri-resolvers; can be ommitted if using 'current' uri scheme -->
+                        <!--     could also locate the docbook dependency and inspect its version... -->
+                        <docbookVersion>1.72.0</docbookVersion>
+                        <localeSeparator>-</localeSeparator>
+                    </options>
                 </configuration>
+                <executions>
+                    <execution>
+                        <id>make-doc</id>
+                        <phase>site</phase>
+                        <goals>
+                            <goal>resources</goal>
+                            <goal>generate</goal>
+                        </goals>
+                    </execution>
+                </executions>
             </plugin>
             <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>taglist-maven-plugin</artifactId>
+                <groupId>org.jboss.maven.plugins</groupId>
+                <artifactId>maven-jdocbook-style-plugin</artifactId>
+                <version>2.0.0</version>
             </plugin>
             <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>changelog-maven-plugin</artifactId>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <configuration>
+                    <descriptors>
+                        <descriptor>src/main/assembly/dist.xml</descriptor>
+                    </descriptors>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>make-assembly</id>
+                        <phase>site</phase>
+                        <goals>
+                            <goal>assembly</goal>
+                        </goals>
+                    </execution>
+                </executions>
             </plugin>
             <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>changes-maven-plugin</artifactId>
+                <groupId>org.twdata.maven</groupId>
+                <artifactId>maven-cli-plugin</artifactId>
+                <version>0.6.3.CR3</version>
             </plugin>
         </plugins>
+    </build>
+    <reporting>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-project-info-reports-plugin</artifactId>
+                <version>2.0.1</version>
+            </plugin>
+        </plugins>
     </reporting>
+    <profiles>
+        <profile>
+            <id>jaxb</id>
+            <activation>
+                <jdk>1.5</jdk>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>javax.xml.bind</groupId>
+                    <artifactId>jaxb-api</artifactId>
+                    <version>2.1</version>
+                </dependency>
+                <dependency>
+                    <groupId>com.sun.xml.bind</groupId>
+                    <artifactId>jaxb-impl</artifactId>
+                    <version>2.1.3</version>
+                </dependency>
+            </dependencies>
+        </profile>
+    </profiles>
 </project>
\ No newline at end of file

Added: trunk/maven-repo-helper/src/test/resources/hibernate-validator.transformed
===================================================================
--- trunk/maven-repo-helper/src/test/resources/hibernate-validator.transformed	                        (rev 0)
+++ trunk/maven-repo-helper/src/test/resources/hibernate-validator.transformed	2010-07-25 12:23:25 UTC (rev 12809)
@@ -0,0 +1,274 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.hibernate</groupId>
+	<artifactId>hibernate-validator</artifactId>
+	<version>4.0.2.GA</version>
+	<packaging>jar</packaging>
+	<parent>
+		<groupId>org.hibernate</groupId>
+		<artifactId>hibernate-validator-parent</artifactId>
+		<version>4.0.2.GA</version>
+	</parent>
+	<properties>
+		<debian.originalVersion>4.0.2.GA</debian.originalVersion>
+		<debian.package>libhibernate-validator-java</debian.package>
+	</properties>
+
+	<name>Hibernate Validator</name>
+	<distributionManagement>
+		<site>
+			<id>site</id>
+			<url>http://validator.hibernate.org</url>
+		</site>
+	</distributionManagement>
+	<dependencies>
+		<dependency>
+			<groupId>javax.validation</groupId>
+			<artifactId>validation-api</artifactId>
+			<version>debian</version>
+		</dependency>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-api</artifactId>
+			<version>debian</version>
+		</dependency>
+		<dependency>
+			<groupId>com.googlecode.jtype</groupId>
+			<artifactId>jtype</artifactId>
+			<version>debian</version>
+		</dependency>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-log4j12</artifactId>
+			<scope>runtime</scope>
+			<optional>true</optional>
+			<version>debian</version>
+		</dependency>
+		<dependency>
+			<groupId>org.hibernate.java-persistence</groupId>
+			<artifactId>jpa-api</artifactId>
+			<version>debian</version>
+			<optional>true</optional>
+		</dependency>
+		<dependency>
+			<groupId>org.testng</groupId>
+			<artifactId>testng</artifactId>
+			<scope>test</scope>
+			<classifier>jdk15</classifier>
+			<version>debian</version>
+		</dependency>
+	</dependencies>
+	<build>
+		<defaultGoal>test</defaultGoal>
+		<resources>
+			<resource>
+				<directory>src/main/resources</directory>
+				<filtering>true</filtering>
+			</resource>
+			<resource>
+				<directory>src/main/xsd</directory>
+				<targetPath>META-INF</targetPath>
+			</resource>
+		</resources>
+		<plugins>
+			<plugin>
+				<inherited>true</inherited>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-source-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>attach-sources</id>
+						<goals>
+							<goal>jar</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>jaxb2-maven-plugin</artifactId>
+				<executions>
+					<execution>
+						<goals>
+							<goal>xjc</goal>
+						</goals>
+					</execution>
+				</executions>
+				<configuration>
+					<packageName>org.hibernate.validator.xml</packageName>
+					<outputDirectory>${basedir}/target/generated-sources</outputDirectory>
+					<extension>true</extension>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-surefire-plugin</artifactId>
+				<configuration>
+					<suiteXmlFiles>
+						<suiteXmlFile>${basedir}/src/test/suite/unit-tests.xml</suiteXmlFile>
+					</suiteXmlFiles>
+				</configuration>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-surefire-report-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>generate-test-report</id>
+						<phase>test</phase>
+						<goals>
+							<goal>report-only</goal>
+						</goals>
+					</execution>
+				</executions>
+				<configuration>
+					<outputDirectory>${project.build.directory}/surefire-reports</outputDirectory>
+					<outputName>test-report</outputName>
+				</configuration>
+				<version>2.4.3</version>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-shade-plugin</artifactId>
+				<executions>
+					<execution>
+						<phase>package</phase>
+						<goals>
+							<goal>shade</goal>
+						</goals>
+						<configuration>
+							<artifactSet>
+								<includes>
+									<include>com.googlecode.jtype:jtype</include>
+								</includes>
+							</artifactSet>
+							<relocations>
+								<relocation>
+									<pattern>com.googlecode.jtype</pattern>
+									<shadedPattern>org.hibernate.validator.jtype</shadedPattern>
+								</relocation>
+							</relocations>
+							<transformers>
+								<transformer implementation="org.apache.maven.plugins.shade.resource.ComponentsXmlResourceTransformer">
+								</transformer>
+							</transformers>
+						</configuration>
+					</execution>
+				</executions>
+				<version>1.2.1</version>
+			</plugin>
+			<plugin>
+				<groupId>org.jboss.maven.plugins</groupId>
+				<artifactId>maven-jdocbook-plugin</artifactId>
+				<version>2.2.0</version>
+				<extensions>true</extensions>
+				<dependencies>
+					<dependency>
+						<groupId>org.hibernate</groupId>
+						<artifactId>hibernate-jdocbook-style</artifactId>
+						<version>debian</version>
+						<type>jdocbook-style</type>
+					</dependency>
+				</dependencies>
+				<configuration>
+					<sourceDocumentName>master.xml</sourceDocumentName>
+					<sourceDirectory>${basedir}/src/main/docbook</sourceDirectory>
+					<masterTranslation>en-US</masterTranslation>
+					<imageResource>
+						<directory>${basedir}/src/main/docbook/en-US/images</directory>
+					</imageResource>
+					<formats>
+						<format>
+							<formatName>pdf</formatName>
+							<stylesheetResource>classpath:/xslt/org/hibernate/jdocbook/xslt/pdf.xsl</stylesheetResource>
+							<finalName>hibernate_reference.pdf</finalName>
+						</format>
+						<format>
+							<formatName>html_single</formatName>
+							<stylesheetResource>classpath:/xslt/org/hibernate/jdocbook/xslt/xhtml-single.xsl</stylesheetResource>
+							<finalName>index.html</finalName>
+						</format>
+						<format>
+							<formatName>html</formatName>
+							<stylesheetResource>classpath:/xslt/org/hibernate/jdocbook/xslt/xhtml.xsl</stylesheetResource>
+							<finalName>index.html</finalName>
+						</format>
+					</formats>
+					<options>
+						<xincludeSupported>true</xincludeSupported>
+						<xmlTransformerType>saxon</xmlTransformerType>
+						<docbookVersion>1.72.0</docbookVersion>
+						<localeSeparator>-</localeSeparator>
+					</options>
+				</configuration>
+				<executions>
+					<execution>
+						<id>make-doc</id>
+						<phase>site</phase>
+						<goals>
+							<goal>resources</goal>
+							<goal>generate</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>org.jboss.maven.plugins</groupId>
+				<artifactId>maven-jdocbook-style-plugin</artifactId>
+				<version>2.0.0</version>
+			</plugin>
+			<plugin>
+				<artifactId>maven-assembly-plugin</artifactId>
+				<configuration>
+					<descriptors>
+						<descriptor>src/main/assembly/dist.xml</descriptor>
+					</descriptors>
+				</configuration>
+				<executions>
+					<execution>
+						<id>make-assembly</id>
+						<phase>site</phase>
+						<goals>
+							<goal>assembly</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>org.twdata.maven</groupId>
+				<artifactId>maven-cli-plugin</artifactId>
+				<version>0.6.3.CR3</version>
+			</plugin>
+		</plugins>
+	</build>
+	<reporting>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-project-info-reports-plugin</artifactId>
+				<version>2.0.1</version>
+			</plugin>
+		</plugins>
+	</reporting>
+	<profiles>
+		<profile>
+			<id>jaxb</id>
+			<activation>
+				<jdk>1.5</jdk>
+			</activation>
+			<dependencies>
+				<dependency>
+					<groupId>javax.xml.bind</groupId>
+					<artifactId>jaxb-api</artifactId>
+					<version>debian</version>
+				</dependency>
+				<dependency>
+					<groupId>com.sun.xml.bind</groupId>
+					<artifactId>jaxb-impl</artifactId>
+					<version>debian</version>
+				</dependency>
+			</dependencies>
+		</profile>
+	</profiles>
+</project>
\ No newline at end of file

Modified: trunk/maven-repo-helper/src/test/resources/maven-javadoc-plugin.transformed
===================================================================
--- trunk/maven-repo-helper/src/test/resources/maven-javadoc-plugin.transformed	2010-07-23 23:08:27 UTC (rev 12808)
+++ trunk/maven-repo-helper/src/test/resources/maven-javadoc-plugin.transformed	2010-07-25 12:23:25 UTC (rev 12809)
@@ -1,14 +1,15 @@
-<?xml version='1.0' encoding='UTF-8'?>
+<?xml version="1.0" encoding="UTF-8"?>
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 	<modelVersion>4.0.0</modelVersion>
 	<groupId>org.apache.maven.plugins</groupId>
 	<artifactId>maven-javadoc-plugin</artifactId>
 	<version>2.5</version>
 	<packaging>maven-plugin</packaging>
-
+	
 	<name>Maven Javadoc Plugin</name>
 	<description>The Maven Javadoc Plugin is a plugin that uses the javadoc tool for
-    generating javadocs for the specified project.</description>
+    generating javadocs for the specified project.
+	</description>
 	<inceptionYear>2004</inceptionYear>
 	<prerequisites>
 		<maven>2.0.9</maven>
@@ -265,173 +266,172 @@
 						<version>2.5</version>
 					</plugin>
 					<plugin>
-						<groupId>org.codehaus.plexus</groupId>
-						<artifactId>plexus-javadoc</artifactId>
-						<version>1.0</version>
+						<groupId>org.apache.maven.plugins</groupId>
+						<artifactId>maven-javadoc-plugin</artifactId>
+						<version>2.4</version>
 						<configuration>
-              <taglets>
-                <taglet>
-                  <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoAggregatorTypeTaglet</tagletClass>
-                  <tagletArtifact>
-                    <groupId>org.apache.maven.plugin-tools</groupId>
-                    <artifactId>maven-plugin-tools-javadoc</artifactId>
-                    <version>2.4.3</version>
-                  </tagletArtifact>
-                </taglet>
-                <taglet>
-                  <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoComponentFieldTaglet</tagletClass>
-                  <tagletArtifact>
-                    <groupId>org.apache.maven.plugin-tools</groupId>
-                    <artifactId>maven-plugin-tools-javadoc</artifactId>
-                    <version>2.4.3</version>
-                  </tagletArtifact>
-                </taglet>
-                <taglet>
-                  <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoConfiguratorTypeTaglet</tagletClass>
-                  <tagletArtifact>
-                    <groupId>org.apache.maven.plugin-tools</groupId>
-                    <artifactId>maven-plugin-tools-javadoc</artifactId>
-                    <version>2.4.3</version>
-                  </tagletArtifact>
-                </taglet>
-                <taglet>
-                  <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoExecuteTypeTaglet</tagletClass>
-                  <tagletArtifact>
-                    <groupId>org.apache.maven.plugin-tools</groupId>
-                    <artifactId>maven-plugin-tools-javadoc</artifactId>
-                    <version>2.4.3</version>
-                  </tagletArtifact>
-                </taglet>
-                <taglet>
-                  <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoExecutionStrategyTypeTaglet</tagletClass>
-                  <tagletArtifact>
-                    <groupId>org.apache.maven.plugin-tools</groupId>
-                    <artifactId>maven-plugin-tools-javadoc</artifactId>
-                    <version>2.4.3</version>
-                  </tagletArtifact>
-                </taglet>
-                <taglet>
-                  <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoGoalTypeTaglet</tagletClass>
-                  <tagletArtifact>
-                    <groupId>org.apache.maven.plugin-tools</groupId>
-                    <artifactId>maven-plugin-tools-javadoc</artifactId>
-                    <version>2.4.3</version>
-                  </tagletArtifact>
-                </taglet>
-                <taglet>
-                  <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoInheritByDefaultTypeTaglet</tagletClass>
-                  <tagletArtifact>
-                    <groupId>org.apache.maven.plugin-tools</groupId>
-                    <artifactId>maven-plugin-tools-javadoc</artifactId>
-                    <version>2.4.3</version>
-                  </tagletArtifact>
-                </taglet>
-                <taglet>
-                  <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoInstantiationStrategyTypeTaglet</tagletClass>
-                  <tagletArtifact>
-                    <groupId>org.apache.maven.plugin-tools</groupId>
-                    <artifactId>maven-plugin-tools-javadoc</artifactId>
-                    <version>2.4.3</version>
-                  </tagletArtifact>
-                </taglet>
-                <taglet>
-                  <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoParameterFieldTaglet</tagletClass>
-                  <tagletArtifact>
-                    <groupId>org.apache.maven.plugin-tools</groupId>
-                    <artifactId>maven-plugin-tools-javadoc</artifactId>
-                    <version>2.4.3</version>
-                  </tagletArtifact>
-                </taglet>
-                <taglet>
-                  <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoPhaseTypeTaglet</tagletClass>
-                  <tagletArtifact>
-                    <groupId>org.apache.maven.plugin-tools</groupId>
-                    <artifactId>maven-plugin-tools-javadoc</artifactId>
-                    <version>2.4.3</version>
-                  </tagletArtifact>
-                </taglet>
-                <taglet>
-                  <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoReadOnlyFieldTaglet</tagletClass>
-                  <tagletArtifact>
-                    <groupId>org.apache.maven.plugin-tools</groupId>
-                    <artifactId>maven-plugin-tools-javadoc</artifactId>
-                    <version>2.4.3</version>
-                  </tagletArtifact>
-                </taglet>
-                <taglet>
-                  <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiredFieldTaglet</tagletClass>
-                  <tagletArtifact>
-                    <groupId>org.apache.maven.plugin-tools</groupId>
-                    <artifactId>maven-plugin-tools-javadoc</artifactId>
-                    <version>2.4.3</version>
-                  </tagletArtifact>
-                </taglet>
-                <taglet>
-                  <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresDependencyResolutionTypeTaglet</tagletClass>
-                  <tagletArtifact>
-                    <groupId>org.apache.maven.plugin-tools</groupId>
-                    <artifactId>maven-plugin-tools-javadoc</artifactId>
-                    <version>2.4.3</version>
-                  </tagletArtifact>
-                </taglet>
-                <taglet>
-                  <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresDirectInvocationTypeTaglet</tagletClass>
-                  <tagletArtifact>
-                    <groupId>org.apache.maven.plugin-tools</groupId>
-                    <artifactId>maven-plugin-tools-javadoc</artifactId>
-                    <version>2.4.3</version>
-                  </tagletArtifact>
-                </taglet>
-                <taglet>
-                  <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresOnLineTypeTaglet</tagletClass>
-                  <tagletArtifact>
-                    <groupId>org.apache.maven.plugin-tools</groupId>
-                    <artifactId>maven-plugin-tools-javadoc</artifactId>
-                    <version>2.4.3</version>
-                  </tagletArtifact>
-                </taglet>
-                <taglet>
-                  <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresProjectTypeTaglet</tagletClass>
-                  <tagletArtifact>
-                    <groupId>org.apache.maven.plugin-tools</groupId>
-                    <artifactId>maven-plugin-tools-javadoc</artifactId>
-                    <version>2.4.3</version>
-                  </tagletArtifact>
-                </taglet>
-                <taglet>
-                  <tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresReportsTypeTaglet</tagletClass>
-                  <tagletArtifact>
-                    <groupId>org.apache.maven.plugin-tools</groupId>
-                    <artifactId>maven-plugin-tools-javadoc</artifactId>
-                    <version>2.4.3</version>
-                  </tagletArtifact>
-                </taglet>
-
-                <taglet>
-                  <tagletClass>org.codehaus.plexus.javadoc.PlexusComponentTaglet</tagletClass>
-                  <tagletArtifact>
-                    <groupId>org.codehaus.plexus</groupId>
-                    <artifactId>plexus-javadoc</artifactId>
-                    <version>1.0</version>
-                  </tagletArtifact>
-                </taglet>
-                <taglet>
-                  <tagletClass>org.codehaus.plexus.javadoc.PlexusConfigurationTaglet</tagletClass>
-                  <tagletArtifact>
-                    <groupId>org.codehaus.plexus</groupId>
-                    <artifactId>plexus-javadoc</artifactId>
-                    <version>1.0</version>
-                  </tagletArtifact>
-                </taglet>
-                <taglet>
-                  <tagletClass>org.codehaus.plexus.javadoc.PlexusRequirementTaglet</tagletClass>
-                  <tagletArtifact>
-                    <groupId>org.codehaus.plexus</groupId>
-                    <artifactId>plexus-javadoc</artifactId>
-                    <version>1.0</version>
-                  </tagletArtifact>
-                </taglet>
-              </taglets>
+							<taglets>
+								<taglet>
+									<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoAggregatorTypeTaglet</tagletClass>
+									<tagletArtifact>
+										<groupId>org.apache.maven.plugin-tools</groupId>
+										<artifactId>maven-plugin-tools-javadoc</artifactId>
+										<version>2.4.3</version>
+									</tagletArtifact>
+								</taglet>
+								<taglet>
+									<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoComponentFieldTaglet</tagletClass>
+									<tagletArtifact>
+										<groupId>org.apache.maven.plugin-tools</groupId>
+										<artifactId>maven-plugin-tools-javadoc</artifactId>
+										<version>2.4.3</version>
+									</tagletArtifact>
+								</taglet>
+								<taglet>
+									<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoConfiguratorTypeTaglet</tagletClass>
+									<tagletArtifact>
+										<groupId>org.apache.maven.plugin-tools</groupId>
+										<artifactId>maven-plugin-tools-javadoc</artifactId>
+										<version>2.4.3</version>
+									</tagletArtifact>
+								</taglet>
+								<taglet>
+									<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoExecuteTypeTaglet</tagletClass>
+									<tagletArtifact>
+										<groupId>org.apache.maven.plugin-tools</groupId>
+										<artifactId>maven-plugin-tools-javadoc</artifactId>
+										<version>2.4.3</version>
+									</tagletArtifact>
+								</taglet>
+								<taglet>
+									<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoExecutionStrategyTypeTaglet</tagletClass>
+									<tagletArtifact>
+										<groupId>org.apache.maven.plugin-tools</groupId>
+										<artifactId>maven-plugin-tools-javadoc</artifactId>
+										<version>2.4.3</version>
+									</tagletArtifact>
+								</taglet>
+								<taglet>
+									<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoGoalTypeTaglet</tagletClass>
+									<tagletArtifact>
+										<groupId>org.apache.maven.plugin-tools</groupId>
+										<artifactId>maven-plugin-tools-javadoc</artifactId>
+										<version>2.4.3</version>
+									</tagletArtifact>
+								</taglet>
+								<taglet>
+									<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoInheritByDefaultTypeTaglet</tagletClass>
+									<tagletArtifact>
+										<groupId>org.apache.maven.plugin-tools</groupId>
+										<artifactId>maven-plugin-tools-javadoc</artifactId>
+										<version>2.4.3</version>
+									</tagletArtifact>
+								</taglet>
+								<taglet>
+									<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoInstantiationStrategyTypeTaglet</tagletClass>
+									<tagletArtifact>
+										<groupId>org.apache.maven.plugin-tools</groupId>
+										<artifactId>maven-plugin-tools-javadoc</artifactId>
+										<version>2.4.3</version>
+									</tagletArtifact>
+								</taglet>
+								<taglet>
+									<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoParameterFieldTaglet</tagletClass>
+									<tagletArtifact>
+										<groupId>org.apache.maven.plugin-tools</groupId>
+										<artifactId>maven-plugin-tools-javadoc</artifactId>
+										<version>2.4.3</version>
+									</tagletArtifact>
+								</taglet>
+								<taglet>
+									<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoPhaseTypeTaglet</tagletClass>
+									<tagletArtifact>
+										<groupId>org.apache.maven.plugin-tools</groupId>
+										<artifactId>maven-plugin-tools-javadoc</artifactId>
+										<version>2.4.3</version>
+									</tagletArtifact>
+								</taglet>
+								<taglet>
+									<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoReadOnlyFieldTaglet</tagletClass>
+									<tagletArtifact>
+										<groupId>org.apache.maven.plugin-tools</groupId>
+										<artifactId>maven-plugin-tools-javadoc</artifactId>
+										<version>2.4.3</version>
+									</tagletArtifact>
+								</taglet>
+								<taglet>
+									<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiredFieldTaglet</tagletClass>
+									<tagletArtifact>
+										<groupId>org.apache.maven.plugin-tools</groupId>
+										<artifactId>maven-plugin-tools-javadoc</artifactId>
+										<version>2.4.3</version>
+									</tagletArtifact>
+								</taglet>
+								<taglet>
+									<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresDependencyResolutionTypeTaglet</tagletClass>
+									<tagletArtifact>
+										<groupId>org.apache.maven.plugin-tools</groupId>
+										<artifactId>maven-plugin-tools-javadoc</artifactId>
+										<version>2.4.3</version>
+									</tagletArtifact>
+								</taglet>
+								<taglet>
+									<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresDirectInvocationTypeTaglet</tagletClass>
+									<tagletArtifact>
+										<groupId>org.apache.maven.plugin-tools</groupId>
+										<artifactId>maven-plugin-tools-javadoc</artifactId>
+										<version>2.4.3</version>
+									</tagletArtifact>
+								</taglet>
+								<taglet>
+									<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresOnLineTypeTaglet</tagletClass>
+									<tagletArtifact>
+										<groupId>org.apache.maven.plugin-tools</groupId>
+										<artifactId>maven-plugin-tools-javadoc</artifactId>
+										<version>2.4.3</version>
+									</tagletArtifact>
+								</taglet>
+								<taglet>
+									<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresProjectTypeTaglet</tagletClass>
+									<tagletArtifact>
+										<groupId>org.apache.maven.plugin-tools</groupId>
+										<artifactId>maven-plugin-tools-javadoc</artifactId>
+										<version>2.4.3</version>
+									</tagletArtifact>
+								</taglet>
+								<taglet>
+									<tagletClass>org.apache.maven.tools.plugin.javadoc.MojoRequiresReportsTypeTaglet</tagletClass>
+									<tagletArtifact>
+										<groupId>org.apache.maven.plugin-tools</groupId>
+										<artifactId>maven-plugin-tools-javadoc</artifactId>
+										<version>2.4.3</version>
+									</tagletArtifact>
+								</taglet>
+								<taglet>
+									<tagletClass>org.codehaus.plexus.javadoc.PlexusComponentTaglet</tagletClass>
+									<tagletArtifact>
+										<groupId>org.codehaus.plexus</groupId>
+										<artifactId>plexus-javadoc</artifactId>
+										<version>1.0</version>
+									</tagletArtifact>
+								</taglet>
+								<taglet>
+									<tagletClass>org.codehaus.plexus.javadoc.PlexusConfigurationTaglet</tagletClass>
+									<tagletArtifact>
+										<groupId>org.codehaus.plexus</groupId>
+										<artifactId>plexus-javadoc</artifactId>
+										<version>1.0</version>
+									</tagletArtifact>
+								</taglet>
+								<taglet>
+									<tagletClass>org.codehaus.plexus.javadoc.PlexusRequirementTaglet</tagletClass>
+									<tagletArtifact>
+										<groupId>org.codehaus.plexus</groupId>
+										<artifactId>plexus-javadoc</artifactId>
+										<version>1.0</version>
+									</tagletArtifact>
+								</taglet>
+							</taglets>
 						</configuration>
 					</plugin>
 				</plugins>

Modified: trunk/maven-repo-helper/src/test/resources/maven.cleaned
===================================================================
--- trunk/maven-repo-helper/src/test/resources/maven.cleaned	2010-07-23 23:08:27 UTC (rev 12808)
+++ trunk/maven-repo-helper/src/test/resources/maven.cleaned	2010-07-25 12:23:25 UTC (rev 12809)
@@ -115,6 +115,7 @@
 		<wagonVersion>1.0-beta-5</wagonVersion>
 		<debian.originalVersion>2.1.0-SNAPSHOT</debian.originalVersion>
         <debian.package>maven2</debian.package>
+		<debian.junit.junit.originalVersion>3.8.1</debian.junit.junit.originalVersion>
 	</properties>
 	<dependencies>
 		<dependency>

Modified: trunk/maven-repo-helper/src/test/resources/plexus-active-collections.cleaned
===================================================================
--- trunk/maven-repo-helper/src/test/resources/plexus-active-collections.cleaned	2010-07-23 23:08:27 UTC (rev 12808)
+++ trunk/maven-repo-helper/src/test/resources/plexus-active-collections.cleaned	2010-07-25 12:23:25 UTC (rev 12809)
@@ -8,6 +8,9 @@
 	<properties>
 		<debian.originalVersion>1.0-beta-2</debian.originalVersion>
 		<debian.package>libplexus-active-collections-java</debian.package>
+		<debian.junit.junit.originalVersion>3.8.1</debian.junit.junit.originalVersion>
+		<debian.org.codehaus.plexus.plexus-component-api.originalVersion>1.0-alpha-22</debian.org.codehaus.plexus.plexus-component-api.originalVersion>
+		<debian.org.codehaus.plexus.plexus-container-default.originalVersion>1.0-alpha-22</debian.org.codehaus.plexus.plexus-container-default.originalVersion>
 	</properties>
 
 	<name>Plexus Container-Backed Active Collections</name>

Modified: trunk/maven-repo-helper/src/test/resources/plexus-archiver.cleaned
===================================================================
--- trunk/maven-repo-helper/src/test/resources/plexus-archiver.cleaned	2010-07-23 23:08:27 UTC (rev 12808)
+++ trunk/maven-repo-helper/src/test/resources/plexus-archiver.cleaned	2010-07-25 12:23:25 UTC (rev 12809)
@@ -8,6 +8,7 @@
 	<properties>
 		<debian.originalVersion>1.0-alpha-12</debian.originalVersion>
 		<debian.package>libplexus-archiver-java</debian.package>
+		<debian.org.codehaus.plexus.plexus-io.originalVersion>1.0-alpha-4</debian.org.codehaus.plexus.plexus-io.originalVersion>
 	</properties>
 
 	<name>Plexus Archiver Component</name>

Modified: trunk/maven-repo-helper/src/test/resources/plexus-container-default.cleaned
===================================================================
--- trunk/maven-repo-helper/src/test/resources/plexus-container-default.cleaned	2010-07-23 23:08:27 UTC (rev 12808)
+++ trunk/maven-repo-helper/src/test/resources/plexus-container-default.cleaned	2010-07-25 12:23:25 UTC (rev 12809)
@@ -8,7 +8,10 @@
   <properties>
     <debian.originalVersion>1.0-alpha-9-stable-1</debian.originalVersion>
     <debian.package>libplexus-container-default-java</debian.package>
-    <debian.mavenRules><![CDATA[org.codehaus.plexus plexus-container-default jar s/1\.0-alpha-.*/1.0-alpha/ *]]></debian.mavenRules>
+    <debian.mavenRules><![CDATA[org.codehaus.plexus plexus-container-default jar s/1\.0-alpha-.*/1.0-alpha/ * *]]></debian.mavenRules>
+    <debian.classworlds.classworlds.originalVersion>1.1-alpha-2</debian.classworlds.classworlds.originalVersion>
+    <debian.junit.junit.originalVersion>3.8.1</debian.junit.junit.originalVersion>
+    <debian.org.codehaus.plexus.plexus-utils.originalVersion>1.0.4</debian.org.codehaus.plexus.plexus-utils.originalVersion>
   </properties>
   <name>Default Plexus Container</name>
 

Modified: trunk/maven-repo-helper/src/test/resources/plexus-container-default.transformed
===================================================================
--- trunk/maven-repo-helper/src/test/resources/plexus-container-default.transformed	2010-07-23 23:08:27 UTC (rev 12808)
+++ trunk/maven-repo-helper/src/test/resources/plexus-container-default.transformed	2010-07-25 12:23:25 UTC (rev 12809)
@@ -12,7 +12,7 @@
 	</parent>
 	<properties>
 		<debian.originalVersion>1.0-alpha-9-stable-1</debian.originalVersion>
-		<debian.mavenRules><![CDATA[org.codehaus.plexus plexus-container-default jar s/1\.0-alpha-.*/1.0-alpha/ *]]></debian.mavenRules>
+		<debian.mavenRules><![CDATA[org.codehaus.plexus plexus-container-default jar s/1\.0-alpha-.*/1.0-alpha/ * *]]></debian.mavenRules>
 	</properties>
 
 	<name>Default Plexus Container</name>

Added: trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant/1.7.1/ant-1.7.1.pom
===================================================================
--- trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant/1.7.1/ant-1.7.1.pom	                        (rev 0)
+++ trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant/1.7.1/ant-1.7.1.pom	2010-07-25 12:23:25 UTC (rev 12809)
@@ -0,0 +1,43 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.apache.ant</groupId>
+	<artifactId>ant</artifactId>
+	<version>1.7.1</version>
+	<packaging>jar</packaging>
+	<parent>
+		<groupId>org.apache.ant</groupId>
+		<artifactId>ant-parent</artifactId>
+		<version>1.7.1</version>
+	</parent>
+	<properties>
+		<debian.originalVersion>1.7.1</debian.originalVersion>
+		<debian.package>ant</debian.package>
+		<debian.mavenRules><![CDATA[s/ant/org.apache.ant/ * * s/.*/debian/ *]]></debian.mavenRules>
+	</properties>
+	
+	<name>org.apache.tools.ant</name>
+	<description>Apache Ant</description>
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.ant</groupId>
+			<artifactId>ant-launcher</artifactId>
+			<version>debian</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>xerces</groupId>
+			<artifactId>xercesImpl</artifactId>
+			<version>debian</version>
+			<optional>true</optional>
+			<scope>runtime</scope>
+		</dependency>
+		<dependency>
+			<groupId>xml-apis</groupId>
+			<artifactId>xml-apis</artifactId>
+			<version>debian</version>
+			<optional>true</optional>
+			<scope>compile</scope>
+		</dependency>
+	</dependencies>
+</project>
\ No newline at end of file

Added: trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant/debian/ant-debian.pom
===================================================================
--- trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant/debian/ant-debian.pom	                        (rev 0)
+++ trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant/debian/ant-debian.pom	2010-07-25 12:23:25 UTC (rev 12809)
@@ -0,0 +1,43 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.apache.ant</groupId>
+	<artifactId>ant</artifactId>
+	<version>debian</version>
+	<packaging>jar</packaging>
+	<parent>
+		<groupId>org.apache.ant</groupId>
+		<artifactId>ant-parent</artifactId>
+		<version>debian</version>
+	</parent>
+	<properties>
+		<debian.originalVersion>1.7.1</debian.originalVersion>
+		<debian.package>ant</debian.package>
+		<debian.mavenRules><![CDATA[s/ant/org.apache.ant/ * * s/.*/debian/ *]]></debian.mavenRules>
+	</properties>
+	
+	<name>org.apache.tools.ant</name>
+	<description>Apache Ant</description>
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.ant</groupId>
+			<artifactId>ant-launcher</artifactId>
+			<version>debian</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>xerces</groupId>
+			<artifactId>xercesImpl</artifactId>
+			<version>debian</version>
+			<optional>true</optional>
+			<scope>runtime</scope>
+		</dependency>
+		<dependency>
+			<groupId>xml-apis</groupId>
+			<artifactId>xml-apis</artifactId>
+			<version>debian</version>
+			<optional>true</optional>
+			<scope>compile</scope>
+		</dependency>
+	</dependencies>
+</project>
\ No newline at end of file

Added: trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant-apache-bcel/1.7.1/ant-apache-bcel-1.7.1.pom
===================================================================
--- trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant-apache-bcel/1.7.1/ant-apache-bcel-1.7.1.pom	                        (rev 0)
+++ trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant-apache-bcel/1.7.1/ant-apache-bcel-1.7.1.pom	2010-07-25 12:23:25 UTC (rev 12809)
@@ -0,0 +1,33 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.apache.ant</groupId>
+	<artifactId>ant-apache-bcel</artifactId>
+	<version>1.7.1</version>
+	<packaging>jar</packaging>
+	<parent>
+		<groupId>org.apache.ant</groupId>
+		<artifactId>ant-parent</artifactId>
+		<version>1.7.1</version>
+	</parent>
+	<properties>
+		<debian.originalVersion>1.7.1</debian.originalVersion>
+		<debian.package>ant-optional</debian.package>
+		<debian.mavenRules><![CDATA[s/ant/org.apache.ant/ * * s/.*/debian/ *]]></debian.mavenRules>
+	</properties>
+	
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.ant</groupId>
+			<artifactId>ant</artifactId>
+			<version>debian</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.bcel</groupId>
+			<artifactId>bcel</artifactId>
+			<version>5.x</version>
+			<scope>compile</scope>
+		</dependency>
+	</dependencies>
+</project>
\ No newline at end of file

Added: trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant-apache-bcel/debian/ant-apache-bcel-debian.pom
===================================================================
--- trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant-apache-bcel/debian/ant-apache-bcel-debian.pom	                        (rev 0)
+++ trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant-apache-bcel/debian/ant-apache-bcel-debian.pom	2010-07-25 12:23:25 UTC (rev 12809)
@@ -0,0 +1,33 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.apache.ant</groupId>
+	<artifactId>ant-apache-bcel</artifactId>
+	<version>debian</version>
+	<packaging>jar</packaging>
+	<parent>
+		<groupId>org.apache.ant</groupId>
+		<artifactId>ant-parent</artifactId>
+		<version>debian</version>
+	</parent>
+	<properties>
+		<debian.originalVersion>1.7.1</debian.originalVersion>
+		<debian.package>ant-optional</debian.package>
+		<debian.mavenRules><![CDATA[s/ant/org.apache.ant/ * * s/.*/debian/ *]]></debian.mavenRules>
+	</properties>
+	
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.ant</groupId>
+			<artifactId>ant</artifactId>
+			<version>debian</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.bcel</groupId>
+			<artifactId>bcel</artifactId>
+			<version>5.x</version>
+			<scope>compile</scope>
+		</dependency>
+	</dependencies>
+</project>
\ No newline at end of file

Added: trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant-parent/1.7.1/ant-parent-1.7.1.pom
===================================================================
--- trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant-parent/1.7.1/ant-parent-1.7.1.pom	                        (rev 0)
+++ trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant-parent/1.7.1/ant-parent-1.7.1.pom	2010-07-25 12:23:25 UTC (rev 12809)
@@ -0,0 +1,81 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.apache.ant</groupId>
+	<artifactId>ant-parent</artifactId>
+	<version>1.7.1</version>
+	<packaging>pom</packaging>
+	<properties>
+		<debian.originalVersion>1.7.1</debian.originalVersion>
+		<debian.package>ant</debian.package>
+		<debian.mavenRules><![CDATA[s/ant/org.apache.ant/ * * s/.*/debian/ *]]></debian.mavenRules>
+	</properties>
+	
+	<description>master POM</description>
+	<name>Apache Ant</name>
+	<url>http://ant.apache.org/</url>
+	<inceptionYear>2000</inceptionYear>
+	<organization>
+		<name>Apache Software Foundation</name>
+	</organization>
+	<scm>
+		<connection>scm:svn:http://svn.apache.org/repos/asf/ant/core/trunk</connection>
+		<developerConnection>scm:svn:https://svn.apache.org/repos/asf/jant/core/trunk</developerConnection>
+		<url>http://svn.apache.org/repos/asf/ant/core/trunk</url>
+	</scm>
+	<mailingLists>
+		<mailingList>
+			<name>Ant Developers List</name>
+			<subscribe>dev-subscribe at ant.apache.org</subscribe>
+			<unsubscribe>dev-unsubscribe at ant.apache.org</unsubscribe>
+			<post>dev at ant.apache.org</post>
+			<archive>http://mail-archives.apache.org/mod_mbox/ant-dev</archive>
+		</mailingList>
+		<mailingList>
+			<name>Ant Users List</name>
+			<subscribe>user-subscribe at ant.apache.org</subscribe>
+			<unsubscribe>user-unsubscribe at ant.apache.org</unsubscribe>
+			<post>user at ant.apache.org</post>
+			<archive>http://mail-archives.apache.org/mod_mbox/ant-user</archive>
+		</mailingList>
+	</mailingLists>
+	<issueManagement>
+		<system>bugzilla</system>
+		<url>http://issues.apache.org/bugzilla/</url>
+	</issueManagement>
+	<modules>
+		<module>ant</module>
+		<module>ant-antlr</module>
+		<module>ant-apache-bcel</module>
+		<module>ant-apache-bsf</module>
+		<module>ant-apache-log4j</module>
+		<module>ant-apache-oro</module>
+		<module>ant-apache-regexp</module>
+		<module>ant-apache-resolver</module>
+		<module>ant-commons-logging</module>
+		<module>ant-commons-net</module>
+		<module>ant-jai</module>
+		<module>ant-javamail</module>
+		<module>ant-jdepend</module>
+		<module>ant-jmf</module>
+		<module>ant-jsch</module>
+		<module>ant-junit</module>
+		<module>ant-launcher</module>
+		<module>ant-netrexx</module>
+		<module>ant-nodeps</module>
+		<module>ant-starteam</module>
+		<module>ant-stylebook</module>
+		<module>ant-swing</module>
+		<module>ant-testutil</module>
+		<module>ant-trax</module>
+		<module>ant-weblogic</module>
+	</modules>
+	<dependencies>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>3.x</version>
+			<scope>test</scope>
+		</dependency>
+	</dependencies>
+</project>
\ No newline at end of file

Added: trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant-parent/debian/ant-parent-debian.pom
===================================================================
--- trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant-parent/debian/ant-parent-debian.pom	                        (rev 0)
+++ trunk/maven-repo-helper/src/test/resources/repository/org/apache/ant/ant-parent/debian/ant-parent-debian.pom	2010-07-25 12:23:25 UTC (rev 12809)
@@ -0,0 +1,81 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.apache.ant</groupId>
+	<artifactId>ant-parent</artifactId>
+	<version>debian</version>
+	<packaging>pom</packaging>
+	<properties>
+		<debian.originalVersion>1.7.1</debian.originalVersion>
+		<debian.package>ant</debian.package>
+		<debian.mavenRules><![CDATA[s/ant/org.apache.ant/ * * s/.*/debian/ *]]></debian.mavenRules>
+	</properties>
+	
+	<description>master POM</description>
+	<name>Apache Ant</name>
+	<url>http://ant.apache.org/</url>
+	<inceptionYear>2000</inceptionYear>
+	<organization>
+		<name>Apache Software Foundation</name>
+	</organization>
+	<scm>
+		<connection>scm:svn:http://svn.apache.org/repos/asf/ant/core/trunk</connection>
+		<developerConnection>scm:svn:https://svn.apache.org/repos/asf/jant/core/trunk</developerConnection>
+		<url>http://svn.apache.org/repos/asf/ant/core/trunk</url>
+	</scm>
+	<mailingLists>
+		<mailingList>
+			<name>Ant Developers List</name>
+			<subscribe>dev-subscribe at ant.apache.org</subscribe>
+			<unsubscribe>dev-unsubscribe at ant.apache.org</unsubscribe>
+			<post>dev at ant.apache.org</post>
+			<archive>http://mail-archives.apache.org/mod_mbox/ant-dev</archive>
+		</mailingList>
+		<mailingList>
+			<name>Ant Users List</name>
+			<subscribe>user-subscribe at ant.apache.org</subscribe>
+			<unsubscribe>user-unsubscribe at ant.apache.org</unsubscribe>
+			<post>user at ant.apache.org</post>
+			<archive>http://mail-archives.apache.org/mod_mbox/ant-user</archive>
+		</mailingList>
+	</mailingLists>
+	<issueManagement>
+		<system>bugzilla</system>
+		<url>http://issues.apache.org/bugzilla/</url>
+	</issueManagement>
+	<modules>
+		<module>ant</module>
+		<module>ant-antlr</module>
+		<module>ant-apache-bcel</module>
+		<module>ant-apache-bsf</module>
+		<module>ant-apache-log4j</module>
+		<module>ant-apache-oro</module>
+		<module>ant-apache-regexp</module>
+		<module>ant-apache-resolver</module>
+		<module>ant-commons-logging</module>
+		<module>ant-commons-net</module>
+		<module>ant-jai</module>
+		<module>ant-javamail</module>
+		<module>ant-jdepend</module>
+		<module>ant-jmf</module>
+		<module>ant-jsch</module>
+		<module>ant-junit</module>
+		<module>ant-launcher</module>
+		<module>ant-netrexx</module>
+		<module>ant-nodeps</module>
+		<module>ant-starteam</module>
+		<module>ant-stylebook</module>
+		<module>ant-swing</module>
+		<module>ant-testutil</module>
+		<module>ant-trax</module>
+		<module>ant-weblogic</module>
+	</modules>
+	<dependencies>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>3.x</version>
+			<scope>test</scope>
+		</dependency>
+	</dependencies>
+</project>
\ No newline at end of file

Added: trunk/maven-repo-helper/src/test/resources/repository/org/apache/bcel/bcel/5.2/bcel-5.2.pom
===================================================================
--- trunk/maven-repo-helper/src/test/resources/repository/org/apache/bcel/bcel/5.2/bcel-5.2.pom	                        (rev 0)
+++ trunk/maven-repo-helper/src/test/resources/repository/org/apache/bcel/bcel/5.2/bcel-5.2.pom	2010-07-25 12:23:25 UTC (rev 12809)
@@ -0,0 +1,22 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.apache.bcel</groupId>
+	<artifactId>bcel</artifactId>
+	<version>5.2</version>
+	<packaging>jar</packaging>
+	<properties>
+		<debian.originalVersion>5.2</debian.originalVersion>
+		<debian.package>libbcel-java</debian.package>
+		<debian.mavenRules><![CDATA[s/bcel/org.apache.bcel/ bcel jar s/5\..*/5.x/ *,
+		org.apache.bcel bcel jar s/5\..*/5.x/ *]]></debian.mavenRules>
+	</properties>
+	
+	<dependencies>
+		<dependency>
+			<groupId>jakarta-regexp</groupId>
+			<artifactId>jakarta-regexp</artifactId>
+			<version>debian</version>
+		</dependency>
+	</dependencies>
+</project>
\ No newline at end of file

Added: trunk/maven-repo-helper/src/test/resources/repository/org/apache/bcel/bcel/5.x/bcel-5.x.pom
===================================================================
--- trunk/maven-repo-helper/src/test/resources/repository/org/apache/bcel/bcel/5.x/bcel-5.x.pom	                        (rev 0)
+++ trunk/maven-repo-helper/src/test/resources/repository/org/apache/bcel/bcel/5.x/bcel-5.x.pom	2010-07-25 12:23:25 UTC (rev 12809)
@@ -0,0 +1,22 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.apache.bcel</groupId>
+	<artifactId>bcel</artifactId>
+	<version>5.x</version>
+	<packaging>jar</packaging>
+	<properties>
+		<debian.originalVersion>5.2</debian.originalVersion>
+		<debian.package>libbcel-java</debian.package>
+		<debian.mavenRules><![CDATA[s/bcel/org.apache.bcel/ bcel jar s/5\..*/5.x/ *,
+		org.apache.bcel bcel jar s/5\..*/5.x/ *]]></debian.mavenRules>
+	</properties>
+	
+	<dependencies>
+		<dependency>
+			<groupId>jakarta-regexp</groupId>
+			<artifactId>jakarta-regexp</artifactId>
+			<version>debian</version>
+		</dependency>
+	</dependencies>
+</project>
\ No newline at end of file

Modified: trunk/maven-repo-helper/src/test/resources/servlet-api.cleaned
===================================================================
--- trunk/maven-repo-helper/src/test/resources/servlet-api.cleaned	2010-07-23 23:08:27 UTC (rev 12808)
+++ trunk/maven-repo-helper/src/test/resources/servlet-api.cleaned	2010-07-25 12:23:25 UTC (rev 12809)
@@ -9,7 +9,7 @@
   <properties>
     <debian.originalVersion>2.5</debian.originalVersion>
     <debian.package>libservlet2.5-java</debian.package>
-    <debian.mavenRules><![CDATA[s/org.apache.tomcat/javax.servlet/ servlet-api jar s/.*/2.5/ *]]></debian.mavenRules>
+    <debian.mavenRules><![CDATA[s/org.apache.tomcat/javax.servlet/ servlet-api jar s/.*/2.5/ * *]]></debian.mavenRules>
   </properties>
 
   <description>javax.servlet package</description>

Modified: trunk/maven-repo-helper/src/test/resources/slf4j.cleaned
===================================================================
--- trunk/maven-repo-helper/src/test/resources/slf4j.cleaned	2010-07-23 23:08:27 UTC (rev 12808)
+++ trunk/maven-repo-helper/src/test/resources/slf4j.cleaned	2010-07-25 12:23:25 UTC (rev 12809)
@@ -8,6 +8,7 @@
 	<properties>
 		<debian.originalVersion>1.5.6</debian.originalVersion>
 		<debian.package>libslf4j-java</debian.package>
+		<debian.junit.junit.originalVersion>3.8.1</debian.junit.junit.originalVersion>
 	</properties>
 
 	<name>SLF4J</name>

Modified: trunk/maven-repo-helper/src/test/resources/wagon-http-lightweight.cleaned
===================================================================
--- trunk/maven-repo-helper/src/test/resources/wagon-http-lightweight.cleaned	2010-07-23 23:08:27 UTC (rev 12808)
+++ trunk/maven-repo-helper/src/test/resources/wagon-http-lightweight.cleaned	2010-07-25 12:23:25 UTC (rev 12809)
@@ -13,6 +13,7 @@
 	<properties>
 		<debian.originalVersion>1.0-beta-5</debian.originalVersion>
 		<debian.package>libwagon-java</debian.package>
+		<debian.org.apache.maven.wagon.wagon-http-shared.originalVersion>1.0-beta-5</debian.org.apache.maven.wagon.wagon-http-shared.originalVersion>
 	</properties>
 
 	<name>Maven Wagon Lightweight HTTP Provider</name>




More information about the pkg-java-commits mailing list