Sfoglia il codice sorgente

Fixed report generation on webserver


git-svn-id: http://svn.dmdirc.com/trunk@1614 00569f92-eb28-0410-84fd-f71c24880f
tags/0.5
Shane Mc Cormack 17 anni fa
parent
commit
ea4c9cbc16
2 ha cambiato i file con 183 aggiunte e 159 eliminazioni
  1. 7
    1
      DoReports.sh
  2. 176
    158
      checkstyle/build.xml

+ 7
- 1
DoReports.sh Vedi File

@@ -13,5 +13,11 @@ SVN="/usr/bin/svn"
13 13
 /bin/sh $MYDIR/oblong.sh "Reports" "Style Report Generation Started";
14 14
 cd $MYDIR
15 15
 $SVN update
16
-$ANT -k -buildfile $MYDIR/doreports.xml reports
16
+if [ "$1" = "--all" ]; then
17
+	$ANT -k -buildfile $MYDIR/doreports.xml allreports
18
+elif [ "$1" = "--findbugs" ]; then
19
+	$ANT -k -buildfile $MYDIR/doreports.xml findbugs
20
+else
21
+	$ANT -k -buildfile $MYDIR/doreports.xml mostreports
22
+fi
17 23
 /bin/sh $MYDIR/oblong.sh "Reports" "Report Generation Complete"

+ 176
- 158
checkstyle/build.xml Vedi File

@@ -1,161 +1,179 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <project name="DMDirc" default="default" basedir=".">
3
-    <description>Builds, tests, and runs the project DMDirc.</description>
4
-    <import file="nbproject/build-impl.xml"/>    
5
-    <target name="checkstyle" depends=" 
6
-            findbugs, 
7
-	    cpd, 
8
-            pmd,
9
-	    checkstyle-all, 
10
-            checkstyle-actions,
11
-	    checkstyle-core,
12
-	    checkstyle-commandparser,
13
-	    checkstyle-identities,
14
-	    checkstyle-logger,
15
-	    checkstyle-parser,
16
-            checkstyle-plugins,
17
-	    checkstyle-ui,
18
-	    remove-xml-files, move-index" /> 
19
-
20
-    <target name="checkstyle-plugins">
21
-            <taskdef resource="checkstyletask.properties"
22
-                     classpath="checkstyle.jar"/>
23
-            <checkstyle config="checkstyle/dmdirc_checks.xml" failureProperty="checkstyle.failure"
24
-                        failOnViolation="false">
25
-                    <fileset dir="src/com/dmdirc/plugins/" includes="**/*.java"/>
26
-                    <formatter type="xml" tofile="reports/report-plugins.xml"/>
27
-            </checkstyle>
28
-            <xslt in="reports/report-plugins.xml" out="reports/report-plugins.html" style="checkstyle/checkstyle.xsl"/>
29
-    </target>
30
-
31
-    <target name="checkstyle-actions">
32
-            <taskdef resource="checkstyletask.properties"
33
-		     classpath="checkstyle.jar"/>
34
-            <checkstyle config="checkstyle/dmdirc_checks.xml" failureProperty="checkstyle.failure"
35
-                        failOnViolation="false">
36
-                    <fileset dir="src/com/dmdirc/actions/" includes="**/*.java"/>
37
-                    <formatter type="xml" tofile="reports/report-actions.xml"/>
38
-            </checkstyle>
39
-            <xslt in="reports/report-actions.xml" out="reports/report-actions.html" style="checkstyle/checkstyle.xsl"/>
40
-    </target>            
41
-    
42
-    <target name="checkstyle-ui">
43
-	    <taskdef resource="checkstyletask.properties"
44
-		     classpath="checkstyle.jar"/>
45
-	    <checkstyle config="checkstyle/dmdirc_checks.xml" failureProperty="checkstyle.failure"
46
-			failOnViolation="false">
47
-		    <fileset dir="src/com/dmdirc/ui/" includes="**/*.java"/>
48
-		    <formatter type="xml" tofile="reports/report-ui.xml"/>
49
-	    </checkstyle>
50
-	    <xslt in="reports/report-ui.xml" out="reports/report-ui.html" style="checkstyle/checkstyle.xsl"/>
51
-    </target>
52
-    
53
-    <target name="checkstyle-parser">
54
-	    <taskdef resource="checkstyletask.properties"
55
-		     classpath="checkstyle.jar"/>
56
-	    <checkstyle config="checkstyle/dmdirc_checks.xml" failureProperty="checkstyle.failure"
57
-			failOnViolation="false">
58
-		    <fileset dir="src/com/dmdirc/parser/" includes="**/*.java"/>
59
-		    <formatter type="xml" tofile="reports/report-parser.xml"/>
60
-	    </checkstyle>
61
-	    <xslt in="reports/report-parser.xml" out="reports/report-parser.html" style="checkstyle/checkstyle.xsl"/>
62
-    </target>
63
-    
64
-    <target name="checkstyle-logger">
65
-	    <taskdef resource="checkstyletask.properties"
66
-		     classpath="checkstyle.jar"/>
67
-	    <checkstyle config="checkstyle/dmdirc_checks.xml" failureProperty="checkstyle.failure"
68
-			failOnViolation="false">
69
-		    <fileset dir="src/com/dmdirc/logger/" includes="**/*.java"/>
70
-		    <formatter type="xml" tofile="reports/report-logger.xml"/>
71
-	    </checkstyle>
72
-	    <xslt in="reports/report-logger.xml" out="reports/report-logger.html" style="checkstyle/checkstyle.xsl"/>
73
-    </target>
74
-    
75
-    <target name="checkstyle-identities">
76
-	    <taskdef resource="checkstyletask.properties"
77
-		     classpath="checkstyle.jar"/>
78
-	    <checkstyle config="checkstyle/dmdirc_checks.xml" failureProperty="checkstyle.failure"
79
-			failOnViolation="false">
80
-		    <fileset dir="src/com/dmdirc/identities/" includes="**/*.java"/>
81
-		    <formatter type="xml" tofile="reports/report-identities.xml"/>
82
-	    </checkstyle>
83
-	    <xslt in="reports/report-identities.xml" out="reports/report-identities.html" style="checkstyle/checkstyle.xsl"/>
84
-    </target>
85
-    
86
-    <target name="checkstyle-commandparser">
87
-	    <taskdef resource="checkstyletask.properties"
88
-		     classpath="checkstyle.jar"/>
89
-	    <checkstyle config="checkstyle/dmdirc_checks.xml" failureProperty="checkstyle.failure"
90
-			failOnViolation="false">
91
-		    <fileset dir="src/com/dmdirc/commandparser/" includes="**/*.java"/>
92
-		    <formatter type="xml" tofile="reports/report-commandparser.xml"/>
93
-	    </checkstyle>
94
-	    <xslt in="reports/report-commandparser.xml" out="reports/report-commandparser.html" style="checkstyle/checkstyle.xsl"/>
95
-    </target>
96
-    
97
-    <target name="checkstyle-core">
98
-	    <taskdef resource="checkstyletask.properties"
99
-		     classpath="checkstyle.jar"/>
100
-	    <checkstyle config="checkstyle/dmdirc_checks.xml" failureProperty="checkstyle.failure"
101
-			failOnViolation="false">
102
-		    <fileset dir="src/com/dmdirc/" includes="*.java"/>
103
-		    <formatter type="xml" tofile="reports/report-core.xml"/>
104
-	    </checkstyle>
105
-	    <xslt in="reports/report-core.xml" out="reports/report-core.html" style="checkstyle/checkstyle.xsl"/>
106
-    </target>
107
-    
108
-    <target name="checkstyle-all">
109
-	    <taskdef resource="checkstyletask.properties"
110
-		     classpath="checkstyle.jar"/>
111
-	    <checkstyle config="checkstyle/dmdirc_checks.xml" failureProperty="checkstyle.failure"
112
-			failOnViolation="false">
113
-		    <fileset dir="src/" includes="**/*.java"/>
114
-		    <formatter type="xml" tofile="reports/report-all.xml"/>
115
-	    </checkstyle>
116
-	    <xslt in="reports/report-all.xml" out="reports/report-all.html" style="checkstyle/checkstyle.xsl"/>
117
-    </target>
118
-    
119
-    <target name="remove-xml-files">
120
-	<delete>
121
-		<fileset dir="reports/" includes="*.xml"/>
122
-  	</delete>
123
-    </target>
124
-    <target name="move-index">
125
-	    <copy file="checkstyle/index.html" tofile="reports/index.html"/>
126
-	    <copy file="checkstyle/sorttable.js" tofile="reports/sorttable.js"/>
127
-    </target>
128
-
129
-    <target name="pmd">
130
-	    <taskdef name="pmd" classpath="pmd-3.9.jar" 
131
-                 classname="net.sourceforge.pmd.ant.PMDTask" />
132
-        <pmd shortFilenames="true">
133
-	<ruleset>checkstyle/pmd_checks.xml</ruleset>
134
-            <formatter type="xml" toFile="reports/report-pmd.xml" linkPrefix="http://pmd.sourceforge.net/xref/"/>
135
-            <fileset dir="src/" includes="**/*.java" />
136
-        </pmd>
137
-        <xslt in="reports/report-pmd.xml" style="checkstyle/pmd.xslt" out="reports/report-pmd.html" />
138
-    </target>
139
-
140
-    <target name="cpd">
141
-        <taskdef name="cpd" classpath="pmd-3.9.jar" classname="net.sourceforge.pmd.cpd.CPDTask" />
142
-	<cpd format="xml" minimumTokenCount="50" outputFile="reports/report-cpd.xml">
143
-		<fileset dir="src/">
144
-			<include name="**/*.java"/>
145
-		</fileset>
146
-        </cpd>
147
-	<xslt in="reports/report-cpd.xml" style="checkstyle/cpd.xslt" out="reports/report-cpd.html" />
148
-    </target>
149
-
150
-    <target name="findbugs">
151
-        <taskdef name="findbugs" classpath="findbugs-ant.jar"
152
-                classname="edu.umd.cs.findbugs.anttask.FindBugsTask" />
153
-        <findbugs home="checkstyle/findbugs/" effort="max"
154
-                output="xml:withMessages"
155
-                outputFile="reports/report-fb.xml" >
156
-            <sourcePath path="src/" />
157
-            <class location="dist/DMDirc.jar" />
158
-        </findbugs>
159
-        <xslt in="reports/report-fb.xml" style="checkstyle/findbugs.xslt" out="reports/report-fb.html" />
160
-    </target>
3
+	<description>Builds, tests, and runs the project DMDirc.</description>
4
+	<import file="nbproject/build-impl.xml"/>    
5
+	<target name="checkstyle" depends=" 
6
+					checkstyle-all, 
7
+					checkstyle-actions,
8
+					checkstyle-core,
9
+					checkstyle-commandparser,
10
+					checkstyle-identities,
11
+					checkstyle-logger,
12
+					checkstyle-parser,
13
+					checkstyle-plugins,
14
+					checkstyle-ui,
15
+					remove-xml-files, move-index" /> 
16
+	<target name="allreports" depends=" 
17
+					findbugs, 
18
+					cpd, 
19
+					pmd,
20
+					checkstyle" /> 
21
+	<target name="mostreports" depends=" 
22
+					cpd,
23
+					pmd,
24
+					checkstyle" /> 
25
+	
26
+	<target name="checkstyle-plugins">
27
+		<taskdef resource="checkstyletask.properties"
28
+						 classpath="checkstyle-all-4.3.jar"/>
29
+		<checkstyle config="checkstyle/dmdirc_checks.xml" failureProperty="checkstyle.failure"
30
+								failOnViolation="false">
31
+			<fileset dir="src/com/dmdirc/plugins/" includes="**/*.java"/>
32
+			<formatter type="xml" tofile="reports/report-plugins.xml"/>
33
+			
34
+		</checkstyle>
35
+		<xslt in="reports/report-plugins.xml" out="reports/report-plugins.html" style="checkstyle/checkstyle.xsl"/>
36
+	</target>
37
+	
38
+	<target name="checkstyle-actions">
39
+		<taskdef resource="checkstyletask.properties"
40
+						 classpath="checkstyle.jar"/>
41
+		<checkstyle config="checkstyle/dmdirc_checks.xml" failureProperty="checkstyle.failure"
42
+								failOnViolation="false">
43
+			<fileset dir="src/com/dmdirc/actions/" includes="**/*.java"/>
44
+			<formatter type="xml" tofile="reports/report-actions.xml"/>
45
+			
46
+		</checkstyle>
47
+		<xslt in="reports/report-actions.xml" out="reports/report-actions.html" style="checkstyle/checkstyle.xsl"/>
48
+	</target>            
49
+	
50
+	<target name="checkstyle-ui">
51
+		<taskdef resource="checkstyletask.properties"
52
+						 classpath="checkstyle.jar"/>
53
+		<checkstyle config="checkstyle/dmdirc_checks.xml" failureProperty="checkstyle.failure"
54
+								failOnViolation="false">
55
+			<fileset dir="src/com/dmdirc/ui/" includes="**/*.java"/>
56
+			<formatter type="xml" tofile="reports/report-ui.xml"/>
57
+		</checkstyle>
58
+		
59
+		<xslt in="reports/report-ui.xml" out="reports/report-ui.html" style="checkstyle/checkstyle.xsl"/>
60
+	</target>
61
+	
62
+	<target name="checkstyle-parser">
63
+		<taskdef resource="checkstyletask.properties"
64
+						 classpath="checkstyle.jar"/>
65
+		<checkstyle config="checkstyle/dmdirc_checks.xml" failureProperty="checkstyle.failure"
66
+								failOnViolation="false">
67
+			<fileset dir="src/com/dmdirc/parser/" includes="**/*.java"/>
68
+			<formatter type="xml" tofile="reports/report-parser.xml"/>
69
+		</checkstyle>
70
+		<xslt in="reports/report-parser.xml" out="reports/report-parser.html" style="checkstyle/checkstyle.xsl"/>
71
+		
72
+	</target>
73
+	
74
+	<target name="checkstyle-logger">
75
+		<taskdef resource="checkstyletask.properties"
76
+						 classpath="checkstyle.jar"/>
77
+		<checkstyle config="checkstyle/dmdirc_checks.xml" failureProperty="checkstyle.failure"
78
+								failOnViolation="false">
79
+			<fileset dir="src/com/dmdirc/logger/" includes="**/*.java"/>
80
+			<formatter type="xml" tofile="reports/report-logger.xml"/>
81
+		</checkstyle>
82
+		<xslt in="reports/report-logger.xml" out="reports/report-logger.html" style="checkstyle/checkstyle.xsl"/>
83
+	</target>
84
+	
85
+	
86
+	<target name="checkstyle-identities">
87
+		<taskdef resource="checkstyletask.properties"
88
+						 classpath="checkstyle.jar"/>
89
+		<checkstyle config="checkstyle/dmdirc_checks.xml" failureProperty="checkstyle.failure"
90
+								failOnViolation="false">
91
+			<fileset dir="src/com/dmdirc/identities/" includes="**/*.java"/>
92
+			<formatter type="xml" tofile="reports/report-identities.xml"/>
93
+		</checkstyle>
94
+		<xslt in="reports/report-identities.xml" out="reports/report-identities.html" style="checkstyle/checkstyle.xsl"/>
95
+	</target>
96
+	
97
+	<target name="checkstyle-commandparser">
98
+		
99
+		<taskdef resource="checkstyletask.properties"
100
+						 classpath="checkstyle.jar"/>
101
+		<checkstyle config="checkstyle/dmdirc_checks.xml" failureProperty="checkstyle.failure"
102
+								failOnViolation="false">
103
+			<fileset dir="src/com/dmdirc/commandparser/" includes="**/*.java"/>
104
+			<formatter type="xml" tofile="reports/report-commandparser.xml"/>
105
+		</checkstyle>
106
+		<xslt in="reports/report-commandparser.xml" out="reports/report-commandparser.html" style="checkstyle/checkstyle.xsl"/>
107
+	</target>
108
+	
109
+	<target name="checkstyle-core">
110
+		<taskdef resource="checkstyletask.properties"
111
+						 classpath="checkstyle.jar"/>
112
+		
113
+		<checkstyle config="checkstyle/dmdirc_checks.xml" failureProperty="checkstyle.failure"
114
+								failOnViolation="false">
115
+			<fileset dir="src/com/dmdirc/" includes="*.java"/>
116
+			<formatter type="xml" tofile="reports/report-core.xml"/>
117
+		</checkstyle>
118
+		<xslt in="reports/report-core.xml" out="reports/report-core.html" style="checkstyle/checkstyle.xsl"/>
119
+	</target>
120
+	
121
+	<target name="checkstyle-all">
122
+		<taskdef resource="checkstyletask.properties"
123
+						 classpath="checkstyle.jar"/>
124
+		<checkstyle config="checkstyle/dmdirc_checks.xml" failureProperty="checkstyle.failure"
125
+								failOnViolation="false">
126
+			
127
+			<fileset dir="src/" includes="**/*.java"/>
128
+			<formatter type="xml" tofile="reports/report-all.xml"/>
129
+		</checkstyle>
130
+		<xslt in="reports/report-all.xml" out="reports/report-all.html" style="checkstyle/checkstyle.xsl"/>
131
+	</target>
132
+	
133
+	<target name="remove-xml-files">
134
+		<delete>
135
+			<fileset dir="reports/" includes="*.xml"/>
136
+		</delete>
137
+		
138
+	</target>
139
+	<target name="move-index">
140
+		<copy file="checkstyle/index.html" tofile="reports/index.html"/>
141
+		<copy file="checkstyle/sorttable.js" tofile="reports/sorttable.js"/>
142
+	</target>
143
+	
144
+	<target name="pmd">
145
+		<taskdef name="pmd" classpath="pmd-3.9.jar" 
146
+						 classname="net.sourceforge.pmd.ant.PMDTask" />
147
+		<pmd shortFilenames="true">
148
+			
149
+			<ruleset>checkstyle/pmd_checks.xml</ruleset>
150
+			<formatter type="xml" toFile="reports/report-pmd.xml" linkPrefix="http://pmd.sourceforge.net/xref/"/>
151
+			<fileset dir="src/" includes="**/*.java" />
152
+		</pmd>
153
+		<xslt in="reports/report-pmd.xml" style="checkstyle/pmd.xslt" out="reports/report-pmd.html" />
154
+	</target>
155
+	
156
+	<target name="cpd">
157
+		<taskdef name="cpd" classpath="pmd-3.9.jar" classname="net.sourceforge.pmd.cpd.CPDTask" />
158
+		
159
+		<cpd format="xml" minimumTokenCount="50" outputFile="reports/report-cpd.xml">
160
+			<fileset dir="src/">
161
+				<include name="**/*.java"/>
162
+			</fileset>
163
+		</cpd>
164
+		<xslt in="reports/report-cpd.xml" style="checkstyle/cpd.xslt" out="reports/report-cpd.html" />
165
+	</target>
166
+	
167
+	<target name="findbugs">
168
+		
169
+		<taskdef name="findbugs" classpath="findbugs-ant.jar"
170
+						 classname="edu.umd.cs.findbugs.anttask.FindBugsTask" />
171
+		<findbugs home="/usr/share/java/findbugs/" effort="max"
172
+							output="xml:withMessages"
173
+							outputFile="reports/report-fb.xml" >
174
+			<sourcePath path="src/" />
175
+			<class location="dist/DMDirc.jar" />
176
+		</findbugs>
177
+		<xslt in="reports/report-fb.xml" style="checkstyle/findbugs.xslt" out="reports/report-fb.html" />
178
+	</target>
161 179
 </project>

Loading…
Annulla
Salva