[pkg-java] r8621 - in trunk/maven-repo-helper: debian src/main/java/org/debian/maven/repo

Ludovic Claude ludovicc-guest at alioth.debian.org
Sun Jun 28 00:52:09 UTC 2009


Author: ludovicc-guest
Date: 2009-06-28 00:52:09 +0000 (Sun, 28 Jun 2009)
New Revision: 8621

Modified:
   trunk/maven-repo-helper/debian/rules
   trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/Repository.java
Log:
* Fix pom and mh_checkrepo command

Modified: trunk/maven-repo-helper/debian/rules
===================================================================
--- trunk/maven-repo-helper/debian/rules	2009-06-27 22:27:35 UTC (rev 8620)
+++ trunk/maven-repo-helper/debian/rules	2009-06-28 00:52:09 UTC (rev 8621)
@@ -45,7 +45,7 @@
 	dh_link -p$(PACKAGE) /usr/share/maven-repo/org/debian/maven/$(PACKAGE)/debian/$(PACKAGE)-debian.jar /usr/share/java/$(PACKAGE).jar
 	dh_installman $(MAN_PAGES)
 	mkdir -p debian/tmp
-	java -cp build/$(PACKAGE)-debian.jar org.debian.maven.repo.POMCleaner --debian-parent pom.xml debian/tmp/$(PACKAGE)-debian.pom debian/tmp/pom.properties 
+	java -cp build/$(PACKAGE)-debian.jar org.debian.maven.repo.POMCleaner --no-parent --rules=debian/maven.rules pom.xml debian/tmp/$(PACKAGE)-debian.pom debian/tmp/pom.properties 
 	dh_install -p$(PACKAGE) --sourcedir=debian/tmp $(PACKAGE)-debian.pom \
 		usr/share/maven-repo/org/debian/maven/$(PACKAGE)/debian
 

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	2009-06-27 22:27:35 UTC (rev 8620)
+++ trunk/maven-repo-helper/src/main/java/org/debian/maven/repo/Repository.java	2009-06-28 00:52:09 UTC (rev 8621)
@@ -6,6 +6,7 @@
 
 import java.io.File;
 import java.io.FileNotFoundException;
+import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.util.ArrayList;
 import java.util.Collections;
@@ -40,7 +41,11 @@
     public Repository(File baseDir) {
         this.baseDir = baseDir;
         try {
-            superPom = pomReader.readPom(new InputStreamReader(getClass().getResourceAsStream("/org/apache/maven/project/pom-4.0.0.xml")));
+            InputStream superPomSource = getClass().getResourceAsStream("/org/apache/maven/project/pom-4.0.0.xml");
+            // The maven2 jars may not always be present in the classpath
+            if (superPomSource != null) {
+                superPom = pomReader.readPom(new InputStreamReader(superPomSource));
+            }
         } catch (XMLStreamException ex) {
             log.log(Level.SEVERE, null, ex);
         }




More information about the pkg-java-commits mailing list