Skip to content

Commit

Permalink
pmd 5.3.2
Browse files Browse the repository at this point in the history
Closes Homebrew/legacy-homebrew#40383.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
  • Loading branch information
champo authored and DomT4 committed Jun 22, 2015
1 parent f341e2c commit a5748dd
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions Formula/pmd.rb
Expand Up @@ -3,19 +3,21 @@
class Pmd < Formula
desc "Source code analyzer for Java, JavaScript, and more"
homepage "http://pmd.sourceforge.net/"
url "https://downloads.sourceforge.net/project/pmd/pmd/5.1.3/pmd-src-5.1.3.zip"
sha1 "da6023d73e078444a7b76e8a7a0cfbeb421221e4"
url "https://downloads.sourceforge.net/project/pmd/pmd/5.3.2/pmd-src-5.3.2.zip"
sha1 "036cdb7583de3ea0d24e7486bf7b9f9f14bfb1ec"

depends_on "maven" => :build

def install
rm Dir["bin/*.{bat,cmd,dll,exe}"]
system "mvn", "clean", "package"

doc.install "LICENSE", "NOTICE", "ReadMe.txt", "licences", Dir["docs/*"]
libexec.install "bin", "etc", "lib"
doc.install "LICENSE", "NOTICE", "README.md"

bin.install_symlink "#{libexec}/bin/run.sh" => "pmd"
# The mvn package target produces a .zip with all the jars needed for PMD
safe_system 'tar', '-xf', buildpath/"pmd-dist/target/pmd-bin-#{version}.zip"
libexec.install "pmd-bin-#{version}/bin", "pmd-bin-#{version}/lib"

# the run script references paths which don't account for the
# file structure of this brew.
bin.install_symlink "#{libexec}/bin/run.sh" => "pmd"
inreplace "#{libexec}/bin/run.sh", "${script_dir}/../lib", "#{libexec}/lib"
end

Expand Down

0 comments on commit a5748dd

Please sign in to comment.