diff --git a/pmd/etc/run.sh b/pmd/etc/run.sh index d33bb8005d..7454c89ff5 100755 --- a/pmd/etc/run.sh +++ b/pmd/etc/run.sh @@ -1,4 +1,41 @@ +#!/bin/bash + +if [ -z "$3" ]; then + script=`basename $0` + echo "Usage:" + echo " $script html|xml rulesetfile1[,rulesetfile2[,..]]" + exit 1 +fi + +SCRIPT_DIR=`dirname $0` +CWD="$PWD" + +cd "$SCRIPT_DIR/../lib" +LIB_DIR=`pwd -P` + +classpath=$CLASSPATH + +build_dir="$SCRIPT_DIR/../build" + +if [ -d "$build_dir" ]; then + cd "$build_dir" + build_dir=`pwd -P` + classpath=$classpath:$build_dir +fi + +cd "$CWD" + +for jarfile in `ls $LIB_DIR/*.jar`; do + classpath=$classpath:$jarfile +done + + FILE=$1 -FORMAT=$2 -RULESETFILES=$3 -java -cp ../lib/pmd-1.2.1.jar:../lib/jaxen-core-1.0-fcs.jar:../lib/saxpath-1.0-fcs.jar net.sourceforge.pmd.PMD $FILE $FORMAT $RULESETFILES +shift +FORMAT=$1 +shift +RULESETFILES="$@" + +# echo "CLASSPATH: $classpath" + +java -cp $classpath net.sourceforge.pmd.PMD $FILE $FORMAT $RULESETFILES diff --git a/pmd/xdocs/credits.xml b/pmd/xdocs/credits.xml index 9006f8e3c6..c04d0bebc9 100644 --- a/pmd/xdocs/credits.xml +++ b/pmd/xdocs/credits.xml @@ -38,6 +38,7 @@