[pkg-java] r13688 - in trunk/maven-debian-helper: bin debian maven-packager-utils/src/main/java/org/debian/maven/packager
Damien Raude-Morvan
drazzib at alioth.debian.org
Sat May 14 21:35:11 UTC 2011
Author: drazzib
Date: 2011-05-14 21:35:10 +0000 (Sat, 14 May 2011)
New Revision: 13688
Modified:
trunk/maven-debian-helper/bin/mh_resolve_dependencies
trunk/maven-debian-helper/debian/changelog
trunk/maven-debian-helper/maven-packager-utils/src/main/java/org/debian/maven/packager/DependenciesMojo.java
trunk/maven-debian-helper/maven-packager-utils/src/main/java/org/debian/maven/packager/DependenciesSolver.java
Log:
* mh_resolve_dependencies: Handle --verbose option has described in
documentation (it was previously just ignored).
* DependenciesSolver: In case we didn't found anything for "jar" type,
just check for a "bundle" type inside repository
Modified: trunk/maven-debian-helper/bin/mh_resolve_dependencies
===================================================================
--- trunk/maven-debian-helper/bin/mh_resolve_dependencies 2011-05-12 14:28:30 UTC (rev 13687)
+++ trunk/maven-debian-helper/bin/mh_resolve_dependencies 2011-05-14 21:35:10 UTC (rev 13688)
@@ -43,6 +43,7 @@
ANT=$(getarg a ant)
NON_INTERACTIVE=$(getarg n non-interactive)
OFFLINE=$(getarg o offline)
+VERBOSE=$(getarg v verbose)
if [ -z "$PACKAGE" ]; then
if [ "$ARGC" -gt "0" ]; then
@@ -65,6 +66,6 @@
fi
fi
-mvn org.debian.maven:maven-packager-utils:$MH_VERSION:dependencies -Dpackage="$PACKAGE" ${ANT:+-DpackageType=ant} -Dmaven.repo.local=/usr/share/maven-repo ${NON_INTERACTIVE:+-Dinteractive=false} ${OFFLINE:+-Doffline=true}
+mvn org.debian.maven:maven-packager-utils:$MH_VERSION:dependencies -Dpackage="$PACKAGE" ${ANT:+-DpackageType=ant} -Dmaven.repo.local=/usr/share/maven-repo ${NON_INTERACTIVE:+-Dinteractive=false} ${OFFLINE:+-Doffline=true} ${VERBOSE:+-Dverbose=true}
perl -p -i -e 's/maven\./maven:/' debian/${PACKAGE}.substvars
Modified: trunk/maven-debian-helper/debian/changelog
===================================================================
--- trunk/maven-debian-helper/debian/changelog 2011-05-12 14:28:30 UTC (rev 13687)
+++ trunk/maven-debian-helper/debian/changelog 2011-05-14 21:35:10 UTC (rev 13688)
@@ -1,3 +1,12 @@
+maven-debian-helper (1.4.2) unstable; urgency=low
+
+ * mh_resolve_dependencies: Handle --verbose option has described in
+ documentation (it was previously just ignored).
+ * DependenciesSolver: In case we didn't found anything for "jar" type,
+ just check for a "bundle" type inside repository
+
+ -- Damien Raude-Morvan <drazzib at debian.org> Sat, 14 May 2011 22:59:17 +0200
+
maven-debian-helper (1.4.1) unstable; urgency=low
* Upload to unstable.
Modified: trunk/maven-debian-helper/maven-packager-utils/src/main/java/org/debian/maven/packager/DependenciesMojo.java
===================================================================
--- trunk/maven-debian-helper/maven-packager-utils/src/main/java/org/debian/maven/packager/DependenciesMojo.java 2011-05-12 14:28:30 UTC (rev 13687)
+++ trunk/maven-debian-helper/maven-packager-utils/src/main/java/org/debian/maven/packager/DependenciesMojo.java 2011-05-14 21:35:10 UTC (rev 13688)
@@ -92,6 +92,11 @@
* @parameter expression="${offline}" default-value="false"
*/
protected boolean offline;
+ /**
+ * Try to be verbose
+ * @parameter expression="${verbose}" default-value="false"
+ */
+ protected boolean verbose;
public void execute()
throws MojoExecutionException {
@@ -120,6 +125,7 @@
solver.setInteractive(interactive);
solver.setOffline(offline);
solver.setListOfPoms(listOfPoms);
+ solver.setVerbose(verbose);
if (solver.getListOfPOMs().getFirstPOM() == null && collectedProjects != null) {
for (Iterator i = collectedProjects.iterator(); i.hasNext();) {
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 2011-05-12 14:28:30 UTC (rev 13687)
+++ trunk/maven-debian-helper/maven-packager-utils/src/main/java/org/debian/maven/packager/DependenciesSolver.java 2011-05-14 21:35:10 UTC (rev 13688)
@@ -16,21 +16,46 @@
* 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.io.BufferedReader;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.LineNumberReader;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+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;
import java.util.concurrent.TimeUnit;
+import java.util.logging.Level;
+import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.debian.maven.repo.*;
+import javax.xml.stream.XMLStreamException;
+import org.debian.maven.repo.Dependency;
+import org.debian.maven.repo.DependencyNotFoundException;
+import org.debian.maven.repo.DependencyRule;
+import org.debian.maven.repo.DependencyRuleSet;
+import org.debian.maven.repo.ListOfPOMs;
+import org.debian.maven.repo.POMHandler;
+import org.debian.maven.repo.POMInfo;
+import org.debian.maven.repo.POMTransformer;
+import org.debian.maven.repo.Repository;
+import org.debian.maven.repo.Rule;
+
/**
* Analyze the Maven dependencies and extract the Maven rules to use
* as well as the list of dependent packages.
@@ -924,6 +949,17 @@
// automatically at build time
}
}
+
+ // In case, we didn't found anything for "jar" packaging type, just check for a "bundle" type inside repository.
+ // drazzib: I'm not sure this is really the right way to fix that (ie. maybe we should install "bundle" artifacts
+ // directly with "jar" type inside Debian ?).
+ if (pom == null && "jar".equals(dependency.getType())) {
+ if (verbose) {
+ System.out.println("[check with bundle dependency type]");
+ }
+ dependency.setType("bundle");
+ pom = getRepository().searchMatchingPOM(dependency);
+ }
if (pom == null) {
if (management) {
More information about the pkg-java-commits
mailing list