[maven-debian-helper] 01/01: Send all pom cleaning options to POMCleaner

James Downing Page jamespage at alioth.debian.org
Mon Aug 12 14:29:10 UTC 2013


This is an automated email from the git hooks/post-receive script.

jamespage pushed a commit to branch master
in repository maven-debian-helper.

commit 52178dfbc77b6f9cc6bbf42158641ca4ee1be78f
Author: James Page <james.page at ubuntu.com>
Date:   Mon Aug 12 14:44:56 2013 +0100

    Send all pom cleaning options to POMCleaner
    
    POMCleaner was only called with maven.rules during SysInstallMojo,
    ignoring maven.ignoreRules and maven.publishedRules.
    
    This commit ensures that --ignore-rules and --published-rules
    are also passed mirroring what happens during the package
    build.
---
 .../org/debian/maven/plugin/SysInstallMojo.java    |   34 ++++++++++++++++++++
 debian/changelog                                   |    6 +++-
 2 files changed, 39 insertions(+), 1 deletion(-)

diff --git a/debian-maven-plugin/src/main/java/org/debian/maven/plugin/SysInstallMojo.java b/debian-maven-plugin/src/main/java/org/debian/maven/plugin/SysInstallMojo.java
index 93b04b2..f533585 100644
--- a/debian-maven-plugin/src/main/java/org/debian/maven/plugin/SysInstallMojo.java
+++ b/debian-maven-plugin/src/main/java/org/debian/maven/plugin/SysInstallMojo.java
@@ -153,6 +153,18 @@ public class SysInstallMojo extends AbstractMojo {
     private String mavenRules;
 
     /**
+     * @parameter expression="${maven.ignoreRules}" default-value="maven.ignoreRules"
+     * @required
+     */
+    private String mavenIgnoreRules;
+
+    /**
+     * @parameter expression="${maven.publishedRules}" default-value="maven.publishedRules"
+     * @required
+     */
+    private String mavenPublishedRules;
+
+    /**
      * root directory of the Maven repository
      *
      * @parameter expression="${basedir}"
@@ -306,6 +318,22 @@ public class SysInstallMojo extends AbstractMojo {
         this.mavenRules = mavenRules;
     }
 
+    public String getMavenIgnoreRules() {
+        return mavenIgnoreRules;
+    }
+
+    public void setMavenIgnoreRules(String mavenIgnoreRules) {
+        this.mavenIgnoreRules = mavenIgnoreRules;
+    }
+
+    public String getMavenPublishedRules() {
+        return mavenPublishedRules;
+    }
+
+    public void setMavenPublishedRules(String mavenPublishedRules) {
+        this.mavenPublishedRules = mavenPublishedRules;
+    }
+
     public File getRepoDir() {
         return repoDir;
     }
@@ -685,10 +713,16 @@ public class SysInstallMojo extends AbstractMojo {
         params.add("--package=" + destPackage);
         String mavenRulesPath = new File(debianDir, mavenRules).getAbsolutePath();
         params.add("--rules=" + mavenRulesPath);
+        String mavenIgnoreRulesPath = new File(debianDir, mavenIgnoreRules).getAbsolutePath();
+        params.add("--ignore-rules=" + mavenIgnoreRulesPath);
+        String mavenPublishedRulesPath = new File(debianDir, mavenPublishedRules).getAbsolutePath();
+        params.add("--published-rules=" + mavenPublishedRulesPath);
 
         System.out.println("Cleaning pom file: " + pomFile + " with options:");
         System.out.println("\t--keep-pom-version --package=" + destPackage);
         System.out.println("\t--rules=" + mavenRulesPath);
+        System.out.println("\t--ignore-rules=" + mavenIgnoreRulesPath);
+        System.out.println("\t--published-rules=" + mavenPublishedRulesPath);
 
         // add optional --no-parent option
         if (pomOption != null && pomOption.isNoParent()) {
diff --git a/debian/changelog b/debian/changelog
index 364b79c..b88643f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-maven-debian-helper (1.6.4) unstable; urgency=low
+maven-debian-helper (1.6.4) UNRELEASED; urgency=low
 
   [ Emmanuel Bourg ]
   * Don't install the documentation jar by default (Closes: #711852)
@@ -17,6 +17,10 @@ maven-debian-helper (1.6.4) unstable; urgency=low
   * dh build: Touch debian/stamp-poms-patched after mh_patchpoms is run
     (Closes: #714189)
 
+  [ James Page ]
+  * Send options for --published-rules and --ignore-rules to POMCleaner
+    during SysInstallMojo.
+
  -- Emmanuel Bourg <ebourg at apache.org>  Wed, 07 Aug 2013 13:00:25 +0200
 
 maven-debian-helper (1.6.3) unstable; urgency=low

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/maven-debian-helper.git



More information about the pkg-java-commits mailing list