[pkg-java] r12900 - in trunk/maven-debian-helper: bin debian etc maven-packager-utils/src/main/java/org/debian/maven/packager
Ludovic Claude
ludovicc-guest at alioth.debian.org
Tue Aug 10 21:44:56 UTC 2010
Author: ludovicc-guest
Date: 2010-08-10 21:44:56 +0000 (Tue, 10 Aug 2010)
New Revision: 12900
Modified:
trunk/maven-debian-helper/bin/mh_make
trunk/maven-debian-helper/debian/changelog
trunk/maven-debian-helper/etc/fake-poms.conf
trunk/maven-debian-helper/maven-packager-utils/src/main/java/org/debian/maven/packager/DependenciesSolver.java
Log:
mh_make: fix issue when no-parent option is needed. Thanks Torsten
for the report
Modified: trunk/maven-debian-helper/bin/mh_make
===================================================================
--- trunk/maven-debian-helper/bin/mh_make 2010-08-10 21:42:57 UTC (rev 12899)
+++ trunk/maven-debian-helper/bin/mh_make 2010-08-10 21:44:56 UTC (rev 12900)
@@ -137,7 +137,7 @@
return
fi
-mh_patchpoms -p$BIN_PACKAGE --debian-build -rdebian/maven.rules -idebian/maven.ignoreRules --keep-pom-version --maven-repo=debian/maven-repo
+mh_patchpoms -p$BIN_PACKAGE -rdebian/maven.rules -idebian/maven.ignoreRules --keep-pom-version
mvn org.debian.maven:maven-packager-utils:$MH_VERSION:generate -Demail="$DEBEMAIL" -Dpackager="$DEBFULLNAME" -DpackagerLicense="$DEBLICENSE" -Dpackage="$PACKAGE" -Dbin.package="$BIN_PACKAGE" -DrunTests="$RUN_TESTS" -DgenerateJavadoc="$GEN_JAVADOC" -Dmaven.repo.local=/usr/share/maven-repo ${ANT:+-DpackageType=ant} ${FROM_SVN:+-DdownloadUrl=scm:svn:$FROM_SVN} --offline
Modified: trunk/maven-debian-helper/debian/changelog
===================================================================
--- trunk/maven-debian-helper/debian/changelog 2010-08-10 21:42:57 UTC (rev 12899)
+++ trunk/maven-debian-helper/debian/changelog 2010-08-10 21:44:56 UTC (rev 12900)
@@ -1,3 +1,10 @@
+maven-debian-helper (1.1.1) UNRELEASED; urgency=low
+
+ * mh_make: fix issue when no-parent option is needed. Thanks Torsten
+ for the report
+
+ -- Ludovic Claude <ludovic.claude at laposte.net> Tue, 10 Aug 2010 23:38:02 +0200
+
maven-debian-helper (1.1) unstable; urgency=low
* debian/control: Update Standards-Version to 3.9.0, no changes
Modified: trunk/maven-debian-helper/etc/fake-poms.conf
===================================================================
--- trunk/maven-debian-helper/etc/fake-poms.conf 2010-08-10 21:42:57 UTC (rev 12899)
+++ trunk/maven-debian-helper/etc/fake-poms.conf 2010-08-10 21:44:56 UTC (rev 12900)
@@ -7,10 +7,8 @@
javax.mail mail /usr/share/java/glassfish-mail.jar
javax.servlet servlet-api /usr/share/java/servlet-api-2.4.jar 2.4
javax.servlet.jsp jsp-api /usr/share/java/jsp-api-2.0.jar 2.0
-jaxen jaxen
jboss.common jboss-common
jmock jmock
-junit junit4 /usr/share/java/junit4.jar 4.x
org.apache.geronimo.specs specs
org.apache.ws.jaxme jaxmeapi
org.codehaus.woodstox wstx-asl /usr/share/java/wstx.jar
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-08-10 21:42:57 UTC (rev 12899)
+++ trunk/maven-debian-helper/maven-packager-utils/src/main/java/org/debian/maven/packager/DependenciesSolver.java 2010-08-10 21:44:56 UTC (rev 12900)
@@ -16,20 +16,11 @@
* limitations under the License.
*/
import java.io.*;
+import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.xml.stream.XMLStreamException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-import java.util.StringTokenizer;
-import java.util.TreeSet;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
@@ -151,6 +142,7 @@
private boolean nonInteractive;
private boolean askedToFilterModules = false;
private boolean filterModules = false;
+ private Map pomInfoCache = new HashMap();
public DependenciesSolver() {
pomTransformer.setVerbose(true);
@@ -480,6 +472,13 @@
} catch (DependencyNotFoundException e1) {
// ignore
}
+ ListOfPOMs.POMOptions options = pomTransformer.getListOfPOMs().getOrCreatePOMOptions(pomRelPath);
+ options.setNoParent(true);
+ resetPOM(projectPom);
+ pom = getPOM(projectPom);
+ try {
+ getRepository().registerPom(projectPom, pom);
+ } catch (DependencyNotFoundException ignore) {}
}
}
}
@@ -547,11 +546,27 @@
}
private POMInfo getPOM(File projectPom) throws XMLStreamException, IOException {
+ POMInfo info = (POMInfo) pomInfoCache.get(projectPom.getAbsolutePath());
+ if (info != null) {
+ return info;
+ }
File tmpDest = File.createTempFile("pom", ".tmp");
tmpDest.deleteOnExit();
- return pomTransformer.transformPom(projectPom, tmpDest);
+ String pomRelPath = projectPom.getAbsolutePath().substring(baseDir.getAbsolutePath().length() + 1);
+ ListOfPOMs.POMOptions options = pomTransformer.getListOfPOMs().getPOMOptions(pomRelPath);
+ boolean noParent = false;
+ if (options != null) {
+ noParent = options.isNoParent();
+ }
+ info = pomTransformer.transformPom(projectPom, tmpDest, noParent, false, null, null);
+ pomInfoCache.put(projectPom.getAbsolutePath(), info);
+ return info;
}
+ private void resetPOM(File projectPom) {
+ pomInfoCache.remove(projectPom.getAbsolutePath());
+ }
+
private String readLine() {
LineNumberReader consoleReader = new LineNumberReader(new InputStreamReader(System.in));
try {
More information about the pkg-java-commits
mailing list