Use common logging configuration.
[java-idp.git] / bin / resolvertest
index 1f3e558..a7ab70d 100755 (executable)
@@ -31,6 +31,9 @@ fi
 
 ENDORSED=$SHIB_HOME/endorsed/
 
+## Where log4j config file is
+LOG_CONFIG=$SHIB_HOME/conf/log4j.properties
+
 ##Grab all the dependencies
 if [ -n "$CLASSPATH" ] ; then
   SHIB_UTIL_CLASSPATH=$CLASSPATH
@@ -50,8 +53,19 @@ do
     fi
 done
 
-SHIB_UTIL_CLASSPATH="${SHIB_HOME}/webApplication/WEB-INF/classes:$SHIB_UTIL_CLASSPATH"
-
+DIRLIBS=${SHIB_HOME}/webApplication/WEB-INF/lib/*.jar
+for i in ${DIRLIBS}
+do
+    # if the directory is empty, then it will return the input string
+    # this is stupid, so case for it
+    if [ "$i" != "${DIRLIBS}" ] ; then
+      if [ -z "$SHIB_UTIL_CLASSPATH" ] ; then
+        SHIB_UTIL_CLASSPATH=$i
+      else
+        SHIB_UTIL_CLASSPATH="$i":$SHIB_UTIL_CLASSPATH
+      fi
+    fi
+done
 
 ##Here we go
-$JAVACMD -Djava.endorsed.dirs="$ENDORSED" -classpath $SHIB_UTIL_CLASSPATH  edu.internet2.middleware.shibboleth.utils.ResolverTest "$@"
+$JAVACMD -Djava.endorsed.dirs="$ENDORSED" -Dlog4j.configuration="$LOG_CONFIG" -cp $SHIB_UTIL_CLASSPATH  edu.internet2.middleware.shibboleth.utils.ResolverTest "$@"