This is an automated email from the git hooks/post-receive script. ebourg-guest pushed a commit to branch master in repository java-wrappers.
commit 41762c4b8f450052f963e593349fa2e7316bf482 Author: Vincent Fourmond <fourm...@debian.org> Date: Mon Apr 4 18:35:33 2011 +0000 [java-wrappers] Finalize the form of find_jar_classpath --- debian/changelog | 8 ++++++++ java-wrappers.sh | 33 ++++++++++++++++++++++++--------- 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/debian/changelog b/debian/changelog index 9224885..446caf9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +java-wrappers (0.1.21) experimental; urgency=low + + * Final form of the find_jar_classpath function that now only performs + path expansion for the argument, but not for the elements found in the + manifests that should be full paths anyway. + + -- Vincent Fourmond <fourm...@debian.org> Mon, 04 Apr 2011 20:31:36 +0200 + java-wrappers (0.1.20) experimental; urgency=low * Adding unzip as we need it to get the classpath correctly... diff --git a/java-wrappers.sh b/java-wrappers.sh index 61ea503..033dec4 100644 --- a/java-wrappers.sh +++ b/java-wrappers.sh @@ -171,7 +171,7 @@ fi # If the user provides a JAVA_FLAVOR environment variable, we -# force the runtime to be the given flavor, such as for fund_java_runtime +# force the runtime to be the given flavor, such as for find_java_runtime if [ "$JAVA_FLAVOR" ]; then find_java_runtime "$JAVA_FLAVOR" || \ java_warning "Could not find runtime for user-supplied flavor '${JAVA_FLAVOR}" @@ -215,6 +215,27 @@ find_jars() { done } +# Recursively adds the jar and its classpath to the classpath +_recurse_jar_classpath() { + if [ -r "$1" ]; then + if echo $JAVA_CLASSPATH | fgrep "$1"; then + return 0; + fi + JAVA_CLASSPATH=$JAVA_CLASSPATH:$1 + java_debug "Looking at classpath of jar: '$1'" + for jar in $(/usr/lib/java-wrappers/get-classpath "$1"); do + if [ "${jar##/}" = "$jar" ]; then + java_warning "jar file $1 contains relative classpath element: $jar" + else + _recurse_jar_classpath $jar; + fi + done + else + java_debug "Unable to find file $1 that may be needed" + return 1; + fi +} + # This function tries to mimick the behaviour of the -jar option of # the java executable, by adding the target jar and all its classpath # recursively. @@ -227,15 +248,9 @@ find_jars() { find_jar_classpath() { if locate_jar "$1"; then looked_for_jars=1 - if echo $JAVA_CLASSPATH | grep found_jar; then - return 0; - fi - JAVA_CLASSPATH=$JAVA_CLASSPATH:$found_jar - for jar in $(/usr/lib/java-wrappers/get-classpath $found_jar); do - find_jar_classpath $jar; - done + _recurse_jar_classpath $found_jar else - java_warning "Unable to locate the necessary jar file $jar" + java_warn "Unable to find the jar file $jar" return 1; fi } -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/java-wrappers.git _______________________________________________ pkg-java-commits mailing list pkg-java-comm...@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits