Bug 99907

Summary: [NEW PORT] devel/pmd: Static analysis tool for Java source code
Product: Ports & Packages Reporter: Alex Varju <freebsd-ports>
Component: Individual Port(s)Assignee: Herve Quiroz <hq>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
pmd-3.7.shar
none
pmd.shar none

Description Alex Varju 2006-07-08 09:00:47 UTC
PMD scans Java source code and looks for potential problems like:

    * Possible bugs - empty try/catch/finally/switch statements
    * Dead code - unused local variables, parameters and private methods
    * Suboptimal code - wasteful String/StringBuffer usage
    * Overcomplicated expressions - unnecessary if statements, for loops 
      that could be while loops
    * Duplicate code - copied/pasted code means copied/pasted bugs

WWW: http://pmd.sourceforge.net/

Generated with FreeBSD Port Tools 0.77
Comment 1 Herve Quiroz freebsd_committer freebsd_triage 2006-07-11 06:50:48 UTC
Responsible Changed
From-To: freebsd-ports-bugs->hq

I'll handle this.
Comment 2 Hervé Quiroz 2006-07-11 07:17:32 UTC
Hi,

Here is a new version of the port with a few improvements:

- Renamed patch files to please portlint(1)
- Add $FreeBSD$ tags in patch files and some explanation regarding their
  respective purpose
- Install JAR files in DATADIR=${JAVASHAREDIR}/${PORTNAME} (because
  ${JAVAJARDIR} is for Java libraries)
- Set JAVA_VERSION=1.3+ as the website reports a minimum requirement on
  JDK 1.3
- Define JAVA_VERSION in the shell scripts accordingly
- Patch shell scripts so that they use /bin/sh rather then /bin/bash
- Use absolute path for javavmwrapper so that user defined aliases do
  not mess up with the scripts
- Use %%DATADIR%% in pkg-plist

Could you please test this new version?

Herve
Comment 3 Herve Quiroz freebsd_committer freebsd_triage 2006-07-11 07:31:58 UTC
State Changed
From-To: open->feedback

Submitter asked for a review.
Comment 4 Alex Varju 2006-07-12 05:28:58 UTC
It looks like patch-pmd.sh has a reference to "JAVA_VERSION/pmd" rather 
than "%%DATADIR%%".  Other than this one bit, the proposed changes all 
look good to me.
Comment 5 Herve Quiroz freebsd_committer freebsd_triage 2006-07-12 12:48:16 UTC
State Changed
From-To: feedback->closed

New port added. 

Thanks for your contribution!