[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.5.0-32-gd67a6b1



The following commit has been merged in the master branch:
commit d67a6b16185c73f8b8c90972aa55296e577cdf63
Author: Niels Thykier <niels@thykier.net>
Date:   Sat Jun 4 18:47:15 2011 +0200

    Allow maven-plugins to ship jar files without classpaths

diff --git a/checks/java b/checks/java
index e19ce32..6574b00 100644
--- a/checks/java
+++ b/checks/java
@@ -35,8 +35,7 @@ my $info = shift;
 
 my $java_info = $info->java_info;
 my $missing_jarwrapper = 0;
-my $has_classpath = 0;
-my $has_osgi = 0;
+my $need_cp = 0;
 my $has_public_jars = 0;
 my $has_jars = 0;
 
@@ -47,6 +46,8 @@ $depends =~ s/lib[^\s,]+-java-doc//go;
 
 my @java_lib_depends = ($depends =~ m/\b(lib[^\s,]+-java)\b/og);
 
+$need_cp = 1 if @java_lib_depends;
+
 # We first loop over jar files to find problems
 
 for my $jar_file (sort keys %{$java_info}) {
@@ -106,12 +107,15 @@ for my $jar_file (sort keys %{$java_info}) {
 
     if(!$cp) {
         # Do we have OSGi instead?
-        $has_osgi = 1 if $bsname;
+        $need_cp = 0 if $bsname;
+        # Maybe it is a maven plugin?
+        $need_cp = 0 if $need_cp
+            && grep { m,^META-INF/maven/plugin.xml$,io } @{$file_list};
     } else {
         # Only run the tests when a classpath is present
 	my @relative = ();
 	my @paths = split(m/\s++/o, $cp);
-	$has_classpath = 1;
+        $need_cp = 0;
 	for my $p (@paths) {
 	    if($p) {
                 # Strip leading ./
@@ -147,7 +151,7 @@ for my $jar_file (sort keys %{$java_info}) {
 tag 'missing-dep-on-jarwrapper' if $missing_jarwrapper;
 
 
-if($has_jars && ! $has_classpath && ! $has_osgi && @java_lib_depends) {
+if($has_jars && $need_cp) {
     # Only tag if there is at least one jar file and one strong java dependency
     # and no classpath/osgi.  Technically there should be no reason to have a
     # strong relation with a java library without having a jar file, but
diff --git a/debian/changelog b/debian/changelog
index e114400..297e82c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -28,6 +28,8 @@ lintian (2.5.1) UNRELEASED; urgency=low
       /usr/share/java (but not subdirs thereof) and there is a strong
       libX-java dependency.  Alternatively if the classpath points to
       a file or a symlink in the package itself, then it is also okay.
+    + [NT] Allow maven plugins to be without classpaths.
+      (Closes: #629056)
   * checks/rules:
     + [NT] Removed code for handling packages with dh_python.
     + [NT] Fixed the code for determining Build-Depends for python

-- 
Debian package checker


Reply to: