[pkg-java] r4482 - in trunk/maven2/debian: . patches

paulcager-guest at alioth.debian.org paulcager-guest at alioth.debian.org
Sun Oct 28 14:57:56 UTC 2007


Author: paulcager-guest
Date: 2007-10-28 14:57:56 +0000 (Sun, 28 Oct 2007)
New Revision: 4482

Modified:
   trunk/maven2/debian/changelog
   trunk/maven2/debian/control
   trunk/maven2/debian/patches/mvn-cmd.patch
Log:
maven2 (2.0.7-2) unstable; urgency=low

  * Changed to use correct JDK/JRE defined in Debian's alternatives system, or
    any one the user has specifically set up.
    (Closes: #445006)
  * Uses new "Homepage" field in debian/control.

 -- Paul Cager <paul-debian at home.paulcager.org>  Sun, 28 Oct 2007 13:58:23 +0000



Modified: trunk/maven2/debian/changelog
===================================================================
--- trunk/maven2/debian/changelog	2007-10-28 08:17:26 UTC (rev 4481)
+++ trunk/maven2/debian/changelog	2007-10-28 14:57:56 UTC (rev 4482)
@@ -1,3 +1,12 @@
+maven2 (2.0.7-2) unstable; urgency=low
+
+  * Changed to use correct JDK/JRE defined in Debian's alternatives system, or
+    any one the user has specifically set up.
+    (Closes: #445006)
+  * Uses new "Homepage" field in debian/control.
+
+ -- Paul Cager <paul-debian at home.paulcager.org>  Sun, 28 Oct 2007 13:58:23 +0000
+
 maven2 (2.0.7-1) unstable; urgency=low
 
   * Initial release. (Closes: #323050)

Modified: trunk/maven2/debian/control
===================================================================
--- trunk/maven2/debian/control	2007-10-28 08:17:26 UTC (rev 4481)
+++ trunk/maven2/debian/control	2007-10-28 14:57:56 UTC (rev 4482)
@@ -11,6 +11,7 @@
   maven-ant-helper
 Build-Depends: ant, debhelper (>= 5), cdbs (>= 0.4.5.3)
 Standards-Version: 3.7.2
+Homepage: http://maven.apache.org/
 
 Package: maven2
 Architecture: all
@@ -20,6 +21,7 @@
   libplexus-interactivity-api-java (>=1.0-alpha-6-2), libwagon-java
 Conflicts: maven2-binary
 Replaces: maven2-binary
+Homepage: http://maven.apache.org/
 Description: Java software project management and comprehension tool
  Maven is a software project management and comprehension tool. Based on the
  concept of a project object model (POM), Maven can manage a project's build,
@@ -35,5 +37,3 @@
     * Providing quality project information
     * Providing guidelines for best practices development
     * Allowing transparent migration to new features
- .
-  Homepage: http://maven.apache.org/

Modified: trunk/maven2/debian/patches/mvn-cmd.patch
===================================================================
--- trunk/maven2/debian/patches/mvn-cmd.patch	2007-10-28 08:17:26 UTC (rev 4481)
+++ trunk/maven2/debian/patches/mvn-cmd.patch	2007-10-28 14:57:56 UTC (rev 4482)
@@ -1,7 +1,7 @@
-diff -Nur maven/maven-core/src/bin/mvn maven.new/maven-core/src/bin/mvn
---- maven/maven-core/src/bin/mvn	2007-08-12 17:51:18.000000000 +0100
-+++ maven.new/maven-core/src/bin/mvn	2007-08-12 21:17:51.000000000 +0100
-@@ -72,9 +72,21 @@
+diff -Nur maven2-2.0.7/maven-core/src/bin/mvn maven2-2.0.7.new/maven-core/src/bin/mvn
+--- maven2-2.0.7/maven-core/src/bin/mvn	2007-03-25 06:06:10.000000000 +0100
++++ maven2-2.0.7.new/maven-core/src/bin/mvn	2007-10-28 14:05:21.000000000 +0000
+@@ -72,9 +72,80 @@
             ;;
  esac
  
@@ -9,21 +9,80 @@
 +  M2_HOME="/usr/share/maven2"
 +fi
 +
++# Debian patch - search for preferred JRE
++
++# Given the "java" executable as an argument, find JAVA_HOME
++find_java() {
++  # First check if it is a JDK in the /usr/lib/jvm directory, or a symlink there.
++  # The test is somewhat complicated due to the different ways the Java implementations
++  # are set up with the alternatives system
++  # e.g.
++  #  /usr/bin/java -> /etc/alternatives/java -> /usr/lib/jvm/java-1.5.0-sun/jre/bin/java
++  # or
++  #  /usr/bin/java -> /etc/alternatives/java -> /usr/lib/jvm/java-gcj/bin/java -> /usr/bin/gij-4.2
++
++  JAVA_HOME=$1
++  while true ; do
++    case $JAVA_HOME in
++      /usr/lib/jvm/*)
++        # Found it! Return the correct paremt directory.
++
++        JAVA_HOME=`echo $JAVA_HOME | sed 's:\(/usr/lib/jvm/[^/]*\).*:\1:'`
++	return
++	;;
++      *) ;;
++    esac
++
++    if [ -h $JAVA_HOME ] ; then
++      JAVA_HOME=`readlink $JAVA_HOME`
++    else
++      break
++    fi
++  done
++        
++  # Not found in the Debian alternatives system, so presumably
++  # it is a user-installed JDK/JRE. Might as well be helpful
++  # and try to find JAVA_HOME.
++
++  # First try for a JDK:
++  JAVA_HOME=`readlink -e $1`
++  while [ `dirname $JAVA_HOME` != /  ]; do
++    if [ -e $JAVA_HOME/lib/tools.jar ]; then
++      return
++    fi
++
++    JAVA_HOME=`dirname $JAVA_HOME`
++  done
++
++  # If we get here we did not find a JDK. Search again for a JRE:
++  JAVA_HOME=`readlink -e $1`
++  while [ `dirname $JAVA_HOME` != /  ]; do
++    if [ -e $JAVA_HOME/bin/java ]; then
++      return
++    fi
++
++    JAVA_HOME=`dirname $JAVA_HOME`
++  done
++
++  # Nothing found; leave blank
++  JAVA_HOME=
++}
++
++    
  if [ -z "$JAVA_HOME" ] ; then
    if [ -r /etc/gentoo-release ] ; then
      JAVA_HOME=`java-config --jre-home`
 +  else
-+    # Debian patch - search for suitable iinstalled JRE, favouring a SUN implementation.
-+    for jre in /usr/lib/jvm/*-sun-* /usr/lib/jvm/* /usr/share/kaffe-common ; do
-+      if [ -x $jre/bin/java ] ; then
-+        JAVA_HOME=$jre
-+	break
-+      fi
-+    done
++    # Debian patch - search for preferred JRE
++    if [ -n "$JAVACMD" ] ; then
++      find_java "$JAVACMD"
++    else
++      find_java `which java`
++    fi
    fi
  fi
  
-@@ -160,7 +172,7 @@
+@@ -160,7 +231,7 @@
  
  exec "$JAVACMD" \
    $MAVEN_OPTS \




More information about the pkg-java-commits mailing list