1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
diff -ru pmd-3.7.orig/bin/build.xml pmd-3.7/bin/build.xml
--- pmd-3.7.orig/bin/build.xml 2006-09-25 01:17:08.000000000 +0200
+++ pmd-3.7/bin/build.xml 2006-09-25 01:29:36.000000000 +0200
@@ -12,12 +12,7 @@
<path id="dependencies.path">
<pathelement location="${dir.build}" />
- <fileset dir="${dir.lib}">
- <include name="jaxen-1.1-beta-7.jar" />
- <include name="jakarta-oro-2.0.8.jar" />
- <include name="xercesImpl-2.6.2.jar" />
- <include name="xmlParserAPIs-2.6.2.jar" />
- </fileset>
+ <fileset dir="${dir.lib}" includes="*.jar"/>
</path>
<target name="delete" description="Deletes the build directory and the pmd-x.x jar file.">
@@ -62,7 +57,6 @@
<jar jarfile="${dir.lib}\pmd-${version}.jar" includes="net/sourceforge/pmd/**/**,test/net/sourceforge/pmd/testframework/**/**,rulesets/**" basedir="${dir.build}">
<manifest>
<attribute name="Main-Class" value="net.sourceforge.pmd.PMD" />
- <attribute name="Class-Path" value="jaxen-1.1-beta-7.jar jakarta-oro-2.0.8.jar" />
</manifest>
</jar>
</target>
diff -ru pmd-3.7.orig/bin/designer.sh pmd-3.7/bin/designer.sh
--- pmd-3.7.orig/bin/designer.sh 2006-09-25 01:17:08.000000000 +0200
+++ pmd-3.7/bin/designer.sh 2006-09-25 01:27:59.000000000 +0200
@@ -1,34 +1,11 @@
#!/bin/bash
-SCRIPT_DIR=`dirname $0`
-CWD="$PWD"
+cp=$(java-config -p xerces-2,saxpath,jaxen,pmd,xml-commons)
-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
+FILE=${1}
shift
-FORMAT=$1
+FORMAT=${1}
shift
-RULESETFILES="$@"
-
-# echo "CLASSPATH: $classpath"
+RULESETFILES="${@}"
-java -cp $classpath net.sourceforge.pmd.util.designer.Designer
+java -cp ${cp} net.sourceforge.pmd.util.designer.Designer
diff -ru pmd-3.7.orig/bin/pmd.sh pmd-3.7/bin/pmd.sh
--- pmd-3.7.orig/bin/pmd.sh 2006-09-25 01:17:08.000000000 +0200
+++ pmd-3.7/bin/pmd.sh 2006-09-25 01:27:44.000000000 +0200
@@ -1,41 +1,20 @@
#!/bin/bash
-if [ -z "$3" ]; then
- script=`basename $0`
+if [ -z "${3}" ]; then
+ script=$(basename $0)
echo "Usage:"
- echo " $script <java-src-file> html|xml|text|vbhtml rulesetfile1[,rulesetfile2[,..]]"
+ echo " ${script} <java-src-file> html|xml|text|vbhtml rulesetfile1[,rulesetfile2[,..]]"
exit 1
fi
-SCRIPT_DIR=`dirname $0`
-CWD="$PWD"
+cp=$(java-config -p xerces-2,saxpath,jaxen,pmd,xml-commons)
-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
+FILE=${1}
shift
-FORMAT=$1
+FORMAT=${1}
shift
-RULESETFILES="$@"
+RULESETFILES="${@}"
# echo "CLASSPATH: $classpath"
-java -cp $classpath net.sourceforge.pmd.PMD $FILE $FORMAT $RULESETFILES
+exec $(java-config --java) -cp ${cp} net.sourceforge.pmd.PMD ${FILE} ${FORMAT} ${RULESETFILES}
|