[pkg-java] r11957 - in trunk/maven-debian-helper: bin debian maven-packager-utils/src/main/java/org/debian/maven/packager share/cdbs/1/class

Ludovic Claude ludovicc-guest at alioth.debian.org
Sun Mar 28 21:28:58 UTC 2010


Author: ludovicc-guest
Date: 2010-03-28 21:28:57 +0000 (Sun, 28 Mar 2010)
New Revision: 11957

Modified:
   trunk/maven-debian-helper/bin/mh_lspoms
   trunk/maven-debian-helper/debian/changelog
   trunk/maven-debian-helper/maven-packager-utils/src/main/java/org/debian/maven/packager/DependenciesSolver.java
   trunk/maven-debian-helper/share/cdbs/1/class/maven.mk
Log:
Add --non-interactive option to mh_lspoms and use it
in maven.mk to avoid asking questions during a build
(Closes: #574399)

Modified: trunk/maven-debian-helper/bin/mh_lspoms
===================================================================
--- trunk/maven-debian-helper/bin/mh_lspoms	2010-03-28 21:20:52 UTC (rev 11956)
+++ trunk/maven-debian-helper/bin/mh_lspoms	2010-03-28 21:28:57 UTC (rev 11957)
@@ -14,10 +14,11 @@
    echo -e "Options:"
    echo -e "\t-h --help: show this text"
    echo -e "\t-V --version: show the version"
-   echo -e "\t-p<package> --package=<package>: package to act on "
+   echo -e "\t-p<package> --package=<package>: package to act on"
    echo -e "\t-f --force: force run even if the .poms files exist."
    echo -e "\t  Only maven.rules will be created, assuming that it"
    echo -e "\t  did not exist before."
+   echo -e "\t-n --non-interactive: non interactive session, don't ask questions."
    echo -e ""
    echo -e "You need to execute it on the unpacked origial source tree, merged with the"
    echo -e "debian/ folder. It will create the file debian/<binary package>.poms which"
@@ -32,10 +33,11 @@
    exit 1
 }
 
-ARGS="p package f force" parseargs "$@"
+ARGS="p package f force n non-interactive" parseargs "$@"
 
 PACKAGE=$(getarg p package)
 FORCE=$(getarg f force)
+NON_INTERACTIVE=$(getarg n non-interactive)
 
 if [ -z "$PACKAGE" ]; then
 	if [ "$ARGC" -gt "0" ]; then
@@ -49,7 +51,7 @@
   echo "debian/$PACKAGE.poms already exist. Please delete it if you want to regenerate it."
 else
   mkdir -p debian
-  java -cp /usr/share/java/maven-project.jar:/usr/share/java/maven-repo-helper.jar:/usr/share/java/maven-packager-utils.jar org.debian.maven.packager.DependenciesSolver --package=$PACKAGE --maven-repo=/usr/share/maven-repo
+  java -cp /usr/share/java/maven-project.jar:/usr/share/java/maven-repo-helper.jar:/usr/share/java/maven-packager-utils.jar org.debian.maven.packager.DependenciesSolver ${NON_INTERACTIVE:+--non-interactive} --package=$PACKAGE --maven-repo=/usr/share/maven-repo
   rm debian/$PACKAGE.substvars
   echo "The list of POM files is now in debian/$PACKAGE.poms"
 fi

Modified: trunk/maven-debian-helper/debian/changelog
===================================================================
--- trunk/maven-debian-helper/debian/changelog	2010-03-28 21:20:52 UTC (rev 11956)
+++ trunk/maven-debian-helper/debian/changelog	2010-03-28 21:28:57 UTC (rev 11957)
@@ -1,3 +1,11 @@
+maven-debian-helper (0.10) unstable; urgency=low
+
+  * Add --non-interactive option to mh_lspoms and use it
+    in maven.mk to avoid asking questions during a build
+    (Closes: #574399)
+
+ -- Ludovic Claude <ludovic.claude at laposte.net>  Wed, 24 Mar 2010 23:48:29 +0100
+
 maven-debian-helper (0.9) unstable; urgency=low
 
   * maven-vars.mk: Fix detection of DEB_DOC_PACKAGE

Modified: trunk/maven-debian-helper/maven-packager-utils/src/main/java/org/debian/maven/packager/DependenciesSolver.java
===================================================================
--- trunk/maven-debian-helper/maven-packager-utils/src/main/java/org/debian/maven/packager/DependenciesSolver.java	2010-03-28 21:20:52 UTC (rev 11956)
+++ trunk/maven-debian-helper/maven-packager-utils/src/main/java/org/debian/maven/packager/DependenciesSolver.java	2010-03-28 21:28:57 UTC (rev 11957)
@@ -879,6 +879,7 @@
             System.out.println("  --ant: use ant for the packaging");
             System.out.println("  --run-tests: run the unit tests");
             System.out.println("  --generate-javadoc: generate Javadoc");
+            System.out.println("  --non-interactive: non interactive session");
             return;
         }
         DependenciesSolver solver = new DependenciesSolver();
@@ -905,6 +906,8 @@
                 solver.setRunTests(true);
             } else if (arg.equals("--generate-javadoc")) {
                 solver.setGenerateJavadoc(true);
+            } else if (arg.equals("--non-interactive")) {
+                solver.setNonInteractive(true);
             }
             i = inc(i, args);
         }

Modified: trunk/maven-debian-helper/share/cdbs/1/class/maven.mk
===================================================================
--- trunk/maven-debian-helper/share/cdbs/1/class/maven.mk	2010-03-28 21:20:52 UTC (rev 11956)
+++ trunk/maven-debian-helper/share/cdbs/1/class/maven.mk	2010-03-28 21:28:57 UTC (rev 11957)
@@ -52,10 +52,10 @@
 	fi
 
 debian/$(DEB_JAR_PACKAGE).poms:
-	mh_lspoms -p$(DEB_JAR_PACKAGE)
+	mh_lspoms --non-interactive -p$(DEB_JAR_PACKAGE)
 
 debian/maven.rules:
-	mh_lspoms -p$(DEB_JAR_PACKAGE) --force
+	mh_lspoms --non-interactive -p$(DEB_JAR_PACKAGE) --force
 
 ifeq (, $(DEB_DOC_PACKAGE))
 DEB_PATCHPOMS_ARGS += --build-no-docs




More information about the pkg-java-commits mailing list