diff --git a/pmd-web/src/PMD/Project.pm b/pmd-web/src/PMD/Project.pm
index cbf8707032..09739e299a 100644
--- a/pmd-web/src/PMD/Project.pm
+++ b/pmd-web/src/PMD/Project.pm
@@ -39,7 +39,7 @@ sub getLines() {
foreach (@x) {
$lines = $lines + 1 if $_ =~ "
\"#{reportFile()}\""
+ cmd="java -jar pmd-1.03.jar \"#{@sourceDirectory}\" html rulesets/unusedcode.xml > \"#{reportFile()}\""
`#{cmd}`
arr = IO.readlines(reportFile())
newFile=File.open(reportFile(), "w")
diff --git a/pmd-web/src/processor.rb b/pmd-web/src/processor.rb
index c29081dcc0..55760f7b29 100644
--- a/pmd-web/src/processor.rb
+++ b/pmd-web/src/processor.rb
@@ -15,12 +15,10 @@ jobsDir.each { |candidate|
end
job = PMD::Job.new(location,title,unixname,moduleDir,srcDir)
#puts "Processing #{job}"
- File.open("/home/groups/p/pm/pmd/cgi-bin/currentjob.txt", "w") { |file| file.syswrite(job.unixName) }
job.clear
job.checkout_code
job.run_pmd
job.clear
- File.delete("/home/groups/p/pm/pmd/cgi-bin/currentjob.txt");
end
rescue
puts "Exiting with error: #{$!}"
@@ -28,5 +26,5 @@ jobsDir.each { |candidate|
}
stop=Time.now
-`echo #{stop-start} > /home/groups/p/pm/pmd/cgi-bin/lastruntime.txt`
+`echo #{stop} > /home/groups/p/pm/pmd/cgi-bin/lastruntime.txt`
diff --git a/pmd-web/src/webpmd.pl b/pmd-web/src/webpmd.pl
index 4cdb22ba72..f7059916ba 100644
--- a/pmd-web/src/webpmd.pl
+++ b/pmd-web/src/webpmd.pl
@@ -21,11 +21,17 @@ sub default() {
print h3("PMD-WEB");
print "PMD is a Java source code analysis tool - it checks your code for unused fields, empty try/catch/finally/if/while blocks, unused method parameters, and stuff like that. There's much more info here. This table contains the results of running PMD's unused code ruleset against a bunch of Sourceforge projects.";
print " Comments? Questions? Please post them here";
- print " 1/29/03: Note that all the Apache projects are no longer here. It just took too long to check them out; the CVS client was blocking for hours at a time. If anyone's interested in this, I'll try to get this up and running on my cvs.apache.org account.";
+ print " 1/31/03: The jakarta.apache.org and xml.apache.org projects have been moved here";
+ print br();
+ open(FILE,"lastruntime.txt");
+ my $lastruntime=;
+ close(FILE);
+ print br();
+ print "The last run finished at ", $lastruntime;
print hr();
- if (param("location")) {
- my $project = PMD::Project->new(param("location"),param("title"),param("unixname"), param("moduledirectory"), param("srcdir"));
+ if (param("unixname")) {
+ my $project = PMD::Project->new("Sourceforge",param("title"),param("unixname"), param("moduledirectory"), param("srcdir"));
addProject($project);
print p(), b("Added "), b($project->getTitle()), b(" to the schedule"), p();
}
@@ -38,7 +44,6 @@ sub default() {
print "Want to run PMD on your Java Sourceforge project? Fill in the blanks and hit go:";
print start_form();
print "Project title (i.e., PMD): ", textfield(-name=>'title',-default=>'',-override=>1);
- print br(), "Project location: ", radio_group(-name=>'location',-values=>['Sourceforge'],-default=>'Sourceforge',-override=>1);
print br(), "Project's Unix name (i.e., pmd): ", textfield(-name=>'unixname',-default=>'',-override=>1);
print br(), "Module directory (i.e., pmd-dcpd): ", textfield(-name=>'moduledirectory',-default=>'',-override=>1);
print br(), "Source directory (including module directory, i.e., pmd-dcpd/src): ", textfield(-name=>'srcdir',-default=>'',-override=>1);
@@ -60,11 +65,6 @@ sub printStats() {
print br(), "Currently processing $currentjob";
}
#print br(), "There are ", getTimeUntil(), " minutes until the next scheduled run";
- open(FILE,"lastruntime.txt");
- my $lastruntime=;
- close(FILE);
- print br();
- print "The last run took ", sprintf("%.0f", $lastruntime/60), " minutes";
print br();
print "This report is regenerated every three hours at 10 minutes past the hour";
print br();
|