buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject [5/7] git commit: Whitespace cleanup. * Ensure text files end with a new line * Ensure text files committed with Linux EOL style * Ensure text files have no trailing whitespace on lines
Date Sat, 24 May 2014 03:57:21 GMT
Whitespace cleanup.
* Ensure text files end with a new line
* Ensure text files committed with Linux EOL style
* Ensure text files have no trailing whitespace on lines


Project: http://git-wip-us.apache.org/repos/asf/buildr/repo
Commit: http://git-wip-us.apache.org/repos/asf/buildr/commit/37fec874
Tree: http://git-wip-us.apache.org/repos/asf/buildr/tree/37fec874
Diff: http://git-wip-us.apache.org/repos/asf/buildr/diff/37fec874

Branch: refs/heads/master
Commit: 37fec874a72cb478677b5a3053f9777cd556dae1
Parents: 8435984
Author: Peter Donald <peter@realityforge.org>
Authored: Sun May 11 11:33:20 2014 +1000
Committer: Peter Donald <peter@realityforge.org>
Committed: Sat May 24 13:55:33 2014 +1000

----------------------------------------------------------------------
 addon/buildr/bnd.rb                             |  316 +-
 addon/buildr/checkstyle.rb                      |  410 +-
 addon/buildr/drb.rb                             |    1 -
 addon/buildr/git_auto_version.rb                |   68 +-
 addon/buildr/gwt.rb                             |  342 +-
 addon/buildr/hibernate.rb                       |   16 +-
 addon/buildr/javancss.rb                        |  310 +-
 addon/buildr/jaxb_xjc.rb                        |  148 +-
 addon/buildr/jibx.rb                            |    1 -
 addon/buildr/org/apache/buildr/BuildrNail.java  |    4 +-
 .../buildr/org/apache/buildr/JettyWrapper.java  |    6 +-
 addon/buildr/package_as_nsis.rb                 |    4 +-
 addon/buildr/pmd.rb                             |  332 +-
 doc/building.textile                            |    6 +-
 doc/css/default.css                             |    6 +-
 doc/css/print.css                               |    2 +-
 doc/download.textile                            |    1 -
 doc/index.textile                               |    1 -
 doc/installing.textile                          |    6 +-
 doc/languages.textile                           |    1 -
 doc/mailing_lists.textile                       |    4 -
 doc/more_stuff.textile                          |    1 -
 doc/preface.textile                             |    2 +-
 doc/projects.textile                            |   12 +-
 doc/releasing.textile                           |    1 -
 lib/buildr/clojure/shell.rb                     |    1 -
 lib/buildr/core/build.rb                        |   32 +-
 lib/buildr/core/filter.rb                       |    6 +-
 lib/buildr/core/jrebel.rb                       |    1 -
 lib/buildr/core/linux.rb                        |    1 -
 lib/buildr/core/run.rb                          |    1 -
 lib/buildr/core/shell.rb                        |    1 -
 lib/buildr/groovy/doc.rb                        |    1 -
 lib/buildr/ide/eclipse.rb                       |    2 -
 lib/buildr/java/bdd.rb                          |    1 -
 lib/buildr/java/commands.rb                     |    5 +-
 lib/buildr/java/jruby.rb                        |    4 +-
 .../java/org/apache/buildr/JavaTestFilter.java  |   10 +-
 lib/buildr/java/tests.rb                        |    1 -
 lib/buildr/packaging/artifact_namespace.rb      |    2 -
 lib/buildr/resources/icons-license.txt          |   31 +-
 lib/buildr/scala/bdd.rb                         |    1 -
 lib/buildr/scala/compiler.rb                    |    1 -
 .../scala/org/apache/buildr/Specs2Runner.java   |    2 -
 rakelib/metrics.rake                            |    6 +-
 spec/addon/bnd_spec.rb                          |  766 ++--
 spec/addon/drb_spec.rb                          |    1 -
 spec/addon/jaxb_xjc_spec.rb                     |  260 +-
 spec/core/application_spec.rb                   |    1 -
 spec/core/build_spec.rb                         |    2 +-
 spec/core/console_spec.rb                       |    1 -
 spec/core/doc_spec.rb                           |    1 -
 spec/core/extension_spec.rb                     |    1 -
 spec/core/generate_from_eclipse_spec.rb         |   18 +-
 spec/core/run_spec.rb                           |    5 +-
 spec/core/shell_spec.rb                         |    1 -
 spec/ide/idea_spec.rb                           | 3882 +++++++++---------
 spec/java/cobertura_spec.rb                     |   12 +-
 spec/java/commands_spec.rb                      |   22 +-
 spec/java/compiler_spec.rb                      |    1 -
 spec/java/doc_spec.rb                           |    1 -
 spec/java/ecj_spec.rb                           |    4 +-
 spec/java/external_spec.rb                      |    2 -
 spec/java/java_spec.rb                          |    6 +-
 spec/java/run_spec.rb                           |    1 -
 spec/xpath_matchers.rb                          |  240 +-
 .../src/test/java/FooTest.java                  |    2 +-
 .../child/src/main/java/Foo.java                |    2 +-
 tests/helloWorld/src/main/java/HelloWorld.java  |    2 +-
 tests/include_as/doc/index.html                 |    2 +-
 tests/include_path/doc/index.html               |    2 +-
 tests/integration_testing.rb                    |   20 +-
 tests/junit3/src/main/java/Foo.java             |    2 +-
 tests/junit3/src/test/java/FooTest.java         |    4 +-
 74 files changed, 3665 insertions(+), 3710 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/buildr/blob/37fec874/addon/buildr/bnd.rb
----------------------------------------------------------------------
diff --git a/addon/buildr/bnd.rb b/addon/buildr/bnd.rb
index b3056a9..57a23ac 100644
--- a/addon/buildr/bnd.rb
+++ b/addon/buildr/bnd.rb
@@ -1,159 +1,159 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with this
-# work for additional information regarding copyright ownership. The ASF
-# licenses this file to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations under
-# the License.
-
-module Buildr
-  module Bnd
-    class << self
-      @@version = '1.50.0'
-      def version
-        @@version
-      end
-
-      def version=(newVersion)
-        @@version = newVersion
-      end
-
-      # The specs for requirements
-      def dependencies
-        ["biz.aQute:bnd:jar:#{version}"]
-      end
-
-      # Repositories containing the requirements
-      def remote_repository
-        Buildr.application.deprecated "'Buildr:Bnd.remote_repository deprecated as the dependencies appear in maven central."
-        "http://www.aqute.biz/repo"
-      end
-
-      def bnd_main(*args)
-        cp = Buildr.artifacts(self.dependencies).each(&:invoke).map(&:to_s)
-        Java::Commands.java 'aQute.bnd.main.bnd', *(args + [{ :classpath => cp }])
-      end
-    end
-    
-    class BundleTask < Rake::FileTask
-      attr_reader :project
-      attr_accessor :classpath
-
-      def [](key)
-        @params[key]
-      end
-
-      def []=(key, value)
-        @params[key] = value
-      end
-
-      def classpath_element(dependencies)
-        artifacts = Buildr.artifacts([dependencies])
-        artifacts.each do |artifact|
-          self.prerequisites << artifact
-        end
-        artifacts.each do |dependency|
-          self.classpath << dependency.to_s
-        end
-      end
-
-      def to_params
-        params = self.project.manifest.merge(@params).reject { |k, v| v.nil? }
-        params["-classpath"] ||= self.classpath.collect(&:to_s).join(", ")
-        params['Bundle-SymbolicName'] ||= [self.project.group, self.project.name.gsub(':', '.')].join('.')
-        params['Bundle-Name'] ||= self.project.comment || self.project.name
-        params['Bundle-Description'] ||= self.project.comment
-        params['Bundle-Version'] ||= self.project.version
-        if params["Include-Resource"].nil? && !project.resources.target.nil?
-          params["Include-Resource"] = "#{project.resources.target}/"
-        end
-        params['-removeheaders'] ||= "Include-Resource,Bnd-LastModified,Created-By,Implementation-Title,Tool"
-
-        params
-      end
-
-      def project=(project)
-        @project = project
-      end
-
-      def classpath=(classpath)
-        @classpath = []
-        Buildr.artifacts([classpath.flatten.compact]).each do |dependency|
-          self.prerequisites << dependency
-          @classpath << dependency.to_s
-        end
-        @classpath
-      end
-
-      def classpath
-        @classpath ||= ([project.compile.target] + project.compile.dependencies).flatten.compact
-      end
-
-      protected
-
-      def initialize(*args) #:nodoc:
-        super
-        @params = {}
-        enhance do
-          filename = self.name
-          # Generate BND file with same name as target jar but different extension
-          bnd_filename = filename.sub /(\.jar)?$/, '.bnd'
-
-          params = self.to_params
-          params["-output"] = filename
-          File.open(bnd_filename, 'w') do |f|
-            f.print params.collect { |k, v| "#{k}=#{v}" }.join("\n")
-          end
-
-          Buildr::Bnd.bnd_main( bnd_filename )
-          begin
-            Buildr::Bnd.bnd_main( "print", "-verify", filename )
-          rescue => e
-            rm filename
-            raise e
-          end
-        end
-      end
-    end
-
-    module ProjectExtension
-      include Extension
-
-      first_time do
-        desc "Does `bnd print` on the packaged bundle and stdouts the output for inspection"
-        Project.local_task("bnd:print")
-      end
-
-      def package_as_bundle(filename)
-        project.task('bnd:print' => [filename]) do |task|
-          Buildr::Bnd.bnd_main("print", filename)
-        end
-
-        dirname = File.dirname(filename)
-        directory(dirname)
-
-        # Add Buildr.application.buildfile so it will rebuild if we change settings
-        task = BundleTask.define_task(filename => [Buildr.application.buildfile, dirname])
-        task.project = self
-        # the last task is the task considered the packaging task
-        task
-      end
-
-      # Change the bundle package to .jar extension
-      def package_as_bundle_spec(spec)
-        spec.merge(:type => :jar)
-      end
-    end
-  end
-end
-
-class Buildr::Project
-  include Buildr::Bnd::ProjectExtension
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with this
+# work for additional information regarding copyright ownership. The ASF
+# licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under
+# the License.
+
+module Buildr
+  module Bnd
+    class << self
+      @@version = '1.50.0'
+      def version
+        @@version
+      end
+
+      def version=(newVersion)
+        @@version = newVersion
+      end
+
+      # The specs for requirements
+      def dependencies
+        ["biz.aQute:bnd:jar:#{version}"]
+      end
+
+      # Repositories containing the requirements
+      def remote_repository
+        Buildr.application.deprecated "'Buildr:Bnd.remote_repository deprecated as the dependencies appear in maven central."
+        "http://www.aqute.biz/repo"
+      end
+
+      def bnd_main(*args)
+        cp = Buildr.artifacts(self.dependencies).each(&:invoke).map(&:to_s)
+        Java::Commands.java 'aQute.bnd.main.bnd', *(args + [{ :classpath => cp }])
+      end
+    end
+
+    class BundleTask < Rake::FileTask
+      attr_reader :project
+      attr_accessor :classpath
+
+      def [](key)
+        @params[key]
+      end
+
+      def []=(key, value)
+        @params[key] = value
+      end
+
+      def classpath_element(dependencies)
+        artifacts = Buildr.artifacts([dependencies])
+        artifacts.each do |artifact|
+          self.prerequisites << artifact
+        end
+        artifacts.each do |dependency|
+          self.classpath << dependency.to_s
+        end
+      end
+
+      def to_params
+        params = self.project.manifest.merge(@params).reject { |k, v| v.nil? }
+        params["-classpath"] ||= self.classpath.collect(&:to_s).join(", ")
+        params['Bundle-SymbolicName'] ||= [self.project.group, self.project.name.gsub(':', '.')].join('.')
+        params['Bundle-Name'] ||= self.project.comment || self.project.name
+        params['Bundle-Description'] ||= self.project.comment
+        params['Bundle-Version'] ||= self.project.version
+        if params["Include-Resource"].nil? && !project.resources.target.nil?
+          params["Include-Resource"] = "#{project.resources.target}/"
+        end
+        params['-removeheaders'] ||= "Include-Resource,Bnd-LastModified,Created-By,Implementation-Title,Tool"
+
+        params
+      end
+
+      def project=(project)
+        @project = project
+      end
+
+      def classpath=(classpath)
+        @classpath = []
+        Buildr.artifacts([classpath.flatten.compact]).each do |dependency|
+          self.prerequisites << dependency
+          @classpath << dependency.to_s
+        end
+        @classpath
+      end
+
+      def classpath
+        @classpath ||= ([project.compile.target] + project.compile.dependencies).flatten.compact
+      end
+
+      protected
+
+      def initialize(*args) #:nodoc:
+        super
+        @params = {}
+        enhance do
+          filename = self.name
+          # Generate BND file with same name as target jar but different extension
+          bnd_filename = filename.sub /(\.jar)?$/, '.bnd'
+
+          params = self.to_params
+          params["-output"] = filename
+          File.open(bnd_filename, 'w') do |f|
+            f.print params.collect { |k, v| "#{k}=#{v}" }.join("\n")
+          end
+
+          Buildr::Bnd.bnd_main( bnd_filename )
+          begin
+            Buildr::Bnd.bnd_main( "print", "-verify", filename )
+          rescue => e
+            rm filename
+            raise e
+          end
+        end
+      end
+    end
+
+    module ProjectExtension
+      include Extension
+
+      first_time do
+        desc "Does `bnd print` on the packaged bundle and stdouts the output for inspection"
+        Project.local_task("bnd:print")
+      end
+
+      def package_as_bundle(filename)
+        project.task('bnd:print' => [filename]) do |task|
+          Buildr::Bnd.bnd_main("print", filename)
+        end
+
+        dirname = File.dirname(filename)
+        directory(dirname)
+
+        # Add Buildr.application.buildfile so it will rebuild if we change settings
+        task = BundleTask.define_task(filename => [Buildr.application.buildfile, dirname])
+        task.project = self
+        # the last task is the task considered the packaging task
+        task
+      end
+
+      # Change the bundle package to .jar extension
+      def package_as_bundle_spec(spec)
+        spec.merge(:type => :jar)
+      end
+    end
+  end
+end
+
+class Buildr::Project
+  include Buildr::Bnd::ProjectExtension
 end

http://git-wip-us.apache.org/repos/asf/buildr/blob/37fec874/addon/buildr/checkstyle.rb
----------------------------------------------------------------------
diff --git a/addon/buildr/checkstyle.rb b/addon/buildr/checkstyle.rb
index 58b9aa8..c909934 100644
--- a/addon/buildr/checkstyle.rb
+++ b/addon/buildr/checkstyle.rb
@@ -1,205 +1,205 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with this
-# work for additional information regarding copyright ownership.  The ASF
-# licenses this file to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
-# License for the specific language governing permissions and limitations under
-# the License.
-
-module Buildr
-  # Provides the <code>checkstyle:html</code> and <code>checkstyle:xml</code> tasks.
-  # Require explicitly using <code>require "buildr/checkstyle"</code>.
-  module Checkstyle
-
-    class << self
-
-      # The specs for requirements
-      def dependencies
-        [
-          'com.puppycrawl.tools:checkstyle:jar:5.7',
-          'commons-cli:commons-cli:jar:1.2',
-          'antlr:antlr:jar:2.7.7',
-          'com.google.guava:guava-jdk5:jar:16.0',
-          'com.google.guava:guava-bootstrap-jdk5:jar:16.0',
-          'com.google.collections:google-collections:jar:1.0',
-          'commons-beanutils:commons-beanutils-core:jar:1.8.3',
-          'commons-logging:commons-logging:jar:1.1.1'
-        ]
-      end
-
-      def checkstyle(configuration_file, format, output_file, source_paths, options = {})
-        dependencies = (options[:dependencies] || []) + self.dependencies
-        cp = Buildr.artifacts(dependencies).each { |a| a.invoke() if a.respond_to?(:invoke) }.map(&:to_s)
-
-        args = []
-        if options[:properties_file]
-          args << "-p"
-          args << options[:properties_file]
-        end
-        args << "-c"
-        args << configuration_file
-        args << "-f"
-        args << format
-        args << "-o"
-        args << output_file
-        source_paths.each do |source_path|
-          args << "-r"
-          args << source_path
-        end
-
-        begin
-          Java::Commands.java 'com.puppycrawl.tools.checkstyle.Main', *(args + [{:classpath => cp, :properties => options[:properties], :java_args => options[:java_args]}])
-        rescue => e
-          raise e if options[:fail_on_error]
-        end
-      end
-    end
-
-    class Config
-      def enabled?
-        File.exist?(self.configuration_file)
-      end
-
-      def html_enabled?
-        File.exist?(self.style_file)
-      end
-
-      attr_writer :config_directory
-
-      def config_directory
-        @config_directory || project._(:source, :main, :etc, :checkstyle)
-      end
-
-      attr_writer :report_dir
-
-      def report_dir
-        @report_dir || project._(:reports, :checkstyle)
-      end
-
-      attr_writer :configuration_file
-
-      def configuration_file
-        @configuration_file || "#{self.config_directory}/checks.xml"
-      end
-
-      attr_writer :fail_on_error
-
-      def fail_on_error?
-        @fail_on_error.nil? ? false : @fail_on_error
-      end
-
-      attr_writer :format
-
-      def format
-        @format || 'xml'
-      end
-
-      attr_writer :xml_output_file
-
-      def xml_output_file
-        @xml_output_file || "#{self.report_dir}/checkstyle.xml"
-      end
-
-      attr_writer :html_output_file
-
-      def html_output_file
-        @html_output_file || "#{self.report_dir}/checkstyle.html"
-      end
-
-      attr_writer :style_file
-
-      def style_file
-        @style_file || "#{self.config_directory}/checkstyle-report.xsl"
-      end
-
-      attr_writer :suppressions_file
-
-      def suppressions_file
-        @suppressions_file || "#{self.config_directory}/suppressions.xml"
-      end
-
-      attr_writer :import_control_file
-
-      def import_control_file
-        @import_control_file || "#{self.config_directory}/import-control.xml"
-      end
-
-      def properties
-        unless @properties
-          @properties = {:basedir => self.project.base_dir}
-          @properties['checkstyle.suppressions.file'] = self.suppressions_file if File.exist?(self.suppressions_file)
-          @properties['checkstyle.import-control.file'] = self.import_control_file if File.exist?(self.import_control_file)
-        end
-        @properties
-      end
-
-      def source_paths
-        @source_paths ||= [self.project.compile.sources, self.project.test.compile.sources]
-      end
-
-      def extra_dependencies
-        @extra_dependencies ||= []
-      end
-
-      protected
-
-      def initialize(project)
-        @project = project
-      end
-
-      attr_reader :project
-
-    end
-
-    module ProjectExtension
-      include Extension
-
-      def checkstyle
-        @checkstyle ||= Buildr::Checkstyle::Config.new(project)
-      end
-
-      after_define do |project|
-        if project.checkstyle.enabled?
-          desc "Generate checkstyle xml report."
-          project.task("checkstyle:xml") do
-            puts "Checkstyle: Analyzing source code..."
-            mkdir_p File.dirname(project.checkstyle.xml_output_file)
-            Buildr::Checkstyle.checkstyle(project.checkstyle.configuration_file,
-                                          project.checkstyle.format,
-                                          project.checkstyle.xml_output_file,
-                                          project.checkstyle.source_paths.flatten.compact,
-                                          :properties => project.checkstyle.properties,
-                                          :fail_on_error => project.checkstyle.fail_on_error?,
-                                          :dependencies => project.checkstyle.extra_dependencies)
-          end
-
-          if project.checkstyle.html_enabled?
-            xml_task = project.task("checkstyle:xml")
-            desc "Generate checkstyle html report."
-            project.task("checkstyle:html" => xml_task) do
-              puts "Checkstyle: Generating report"
-              mkdir_p File.dirname(project.checkstyle.html_output_file)
-              Buildr.ant "checkstyle" do |ant|
-                ant.xslt :in => project.checkstyle.xml_output_file,
-                         :out => project.checkstyle.html_output_file,
-                         :style => project.checkstyle.style_file
-              end
-            end
-
-          end
-        end
-      end
-    end
-  end
-end
-
-class Buildr::Project
-  include Buildr::Checkstyle::ProjectExtension
-end
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with this
+# work for additional information regarding copyright ownership.  The ASF
+# licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations under
+# the License.
+
+module Buildr
+  # Provides the <code>checkstyle:html</code> and <code>checkstyle:xml</code> tasks.
+  # Require explicitly using <code>require "buildr/checkstyle"</code>.
+  module Checkstyle
+
+    class << self
+
+      # The specs for requirements
+      def dependencies
+        [
+          'com.puppycrawl.tools:checkstyle:jar:5.7',
+          'commons-cli:commons-cli:jar:1.2',
+          'antlr:antlr:jar:2.7.7',
+          'com.google.guava:guava-jdk5:jar:16.0',
+          'com.google.guava:guava-bootstrap-jdk5:jar:16.0',
+          'com.google.collections:google-collections:jar:1.0',
+          'commons-beanutils:commons-beanutils-core:jar:1.8.3',
+          'commons-logging:commons-logging:jar:1.1.1'
+        ]
+      end
+
+      def checkstyle(configuration_file, format, output_file, source_paths, options = {})
+        dependencies = (options[:dependencies] || []) + self.dependencies
+        cp = Buildr.artifacts(dependencies).each { |a| a.invoke() if a.respond_to?(:invoke) }.map(&:to_s)
+
+        args = []
+        if options[:properties_file]
+          args << "-p"
+          args << options[:properties_file]
+        end
+        args << "-c"
+        args << configuration_file
+        args << "-f"
+        args << format
+        args << "-o"
+        args << output_file
+        source_paths.each do |source_path|
+          args << "-r"
+          args << source_path
+        end
+
+        begin
+          Java::Commands.java 'com.puppycrawl.tools.checkstyle.Main', *(args + [{:classpath => cp, :properties => options[:properties], :java_args => options[:java_args]}])
+        rescue => e
+          raise e if options[:fail_on_error]
+        end
+      end
+    end
+
+    class Config
+      def enabled?
+        File.exist?(self.configuration_file)
+      end
+
+      def html_enabled?
+        File.exist?(self.style_file)
+      end
+
+      attr_writer :config_directory
+
+      def config_directory
+        @config_directory || project._(:source, :main, :etc, :checkstyle)
+      end
+
+      attr_writer :report_dir
+
+      def report_dir
+        @report_dir || project._(:reports, :checkstyle)
+      end
+
+      attr_writer :configuration_file
+
+      def configuration_file
+        @configuration_file || "#{self.config_directory}/checks.xml"
+      end
+
+      attr_writer :fail_on_error
+
+      def fail_on_error?
+        @fail_on_error.nil? ? false : @fail_on_error
+      end
+
+      attr_writer :format
+
+      def format
+        @format || 'xml'
+      end
+
+      attr_writer :xml_output_file
+
+      def xml_output_file
+        @xml_output_file || "#{self.report_dir}/checkstyle.xml"
+      end
+
+      attr_writer :html_output_file
+
+      def html_output_file
+        @html_output_file || "#{self.report_dir}/checkstyle.html"
+      end
+
+      attr_writer :style_file
+
+      def style_file
+        @style_file || "#{self.config_directory}/checkstyle-report.xsl"
+      end
+
+      attr_writer :suppressions_file
+
+      def suppressions_file
+        @suppressions_file || "#{self.config_directory}/suppressions.xml"
+      end
+
+      attr_writer :import_control_file
+
+      def import_control_file
+        @import_control_file || "#{self.config_directory}/import-control.xml"
+      end
+
+      def properties
+        unless @properties
+          @properties = {:basedir => self.project.base_dir}
+          @properties['checkstyle.suppressions.file'] = self.suppressions_file if File.exist?(self.suppressions_file)
+          @properties['checkstyle.import-control.file'] = self.import_control_file if File.exist?(self.import_control_file)
+        end
+        @properties
+      end
+
+      def source_paths
+        @source_paths ||= [self.project.compile.sources, self.project.test.compile.sources]
+      end
+
+      def extra_dependencies
+        @extra_dependencies ||= []
+      end
+
+      protected
+
+      def initialize(project)
+        @project = project
+      end
+
+      attr_reader :project
+
+    end
+
+    module ProjectExtension
+      include Extension
+
+      def checkstyle
+        @checkstyle ||= Buildr::Checkstyle::Config.new(project)
+      end
+
+      after_define do |project|
+        if project.checkstyle.enabled?
+          desc "Generate checkstyle xml report."
+          project.task("checkstyle:xml") do
+            puts "Checkstyle: Analyzing source code..."
+            mkdir_p File.dirname(project.checkstyle.xml_output_file)
+            Buildr::Checkstyle.checkstyle(project.checkstyle.configuration_file,
+                                          project.checkstyle.format,
+                                          project.checkstyle.xml_output_file,
+                                          project.checkstyle.source_paths.flatten.compact,
+                                          :properties => project.checkstyle.properties,
+                                          :fail_on_error => project.checkstyle.fail_on_error?,
+                                          :dependencies => project.checkstyle.extra_dependencies)
+          end
+
+          if project.checkstyle.html_enabled?
+            xml_task = project.task("checkstyle:xml")
+            desc "Generate checkstyle html report."
+            project.task("checkstyle:html" => xml_task) do
+              puts "Checkstyle: Generating report"
+              mkdir_p File.dirname(project.checkstyle.html_output_file)
+              Buildr.ant "checkstyle" do |ant|
+                ant.xslt :in => project.checkstyle.xml_output_file,
+                         :out => project.checkstyle.html_output_file,
+                         :style => project.checkstyle.style_file
+              end
+            end
+
+          end
+        end
+      end
+    end
+  end
+end
+
+class Buildr::Project
+  include Buildr::Checkstyle::ProjectExtension
+end

http://git-wip-us.apache.org/repos/asf/buildr/blob/37fec874/addon/buildr/drb.rb
----------------------------------------------------------------------
diff --git a/addon/buildr/drb.rb b/addon/buildr/drb.rb
index 3192d49..4dd4abc 100644
--- a/addon/buildr/drb.rb
+++ b/addon/buildr/drb.rb
@@ -276,4 +276,3 @@ module Buildr
   end # DRbApplication
 
 end
-

http://git-wip-us.apache.org/repos/asf/buildr/blob/37fec874/addon/buildr/git_auto_version.rb
----------------------------------------------------------------------
diff --git a/addon/buildr/git_auto_version.rb b/addon/buildr/git_auto_version.rb
index 526c4fe..6ffe32d 100644
--- a/addon/buildr/git_auto_version.rb
+++ b/addon/buildr/git_auto_version.rb
@@ -1,34 +1,34 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with this
-# work for additional information regarding copyright ownership. The ASF
-# licenses this file to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations under
-# the License.
-
-module Buildr
-  module GitAutoVersion
-    module ProjectExtension
-      include Extension
-
-      before_define do |project|
-        unless project.version
-          version_suffix = ENV['BUILD_NUMBER'] ? "-#{ENV['BUILD_NUMBER']}" : ''
-          version_prefix = ENV['VERSION_PREFIX'] ? "#{ENV['VERSION_PREFIX']}-" : ''
-          project.version = version_prefix + `git describe --tags --always`.strip + version_suffix
-        end
-      end
-    end
-  end
-end
-
-class Buildr::Project
-  include Buildr::GitAutoVersion::ProjectExtension
-end
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with this
+# work for additional information regarding copyright ownership. The ASF
+# licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under
+# the License.
+
+module Buildr
+  module GitAutoVersion
+    module ProjectExtension
+      include Extension
+
+      before_define do |project|
+        unless project.version
+          version_suffix = ENV['BUILD_NUMBER'] ? "-#{ENV['BUILD_NUMBER']}" : ''
+          version_prefix = ENV['VERSION_PREFIX'] ? "#{ENV['VERSION_PREFIX']}-" : ''
+          project.version = version_prefix + `git describe --tags --always`.strip + version_suffix
+        end
+      end
+    end
+  end
+end
+
+class Buildr::Project
+  include Buildr::GitAutoVersion::ProjectExtension
+end

http://git-wip-us.apache.org/repos/asf/buildr/blob/37fec874/addon/buildr/gwt.rb
----------------------------------------------------------------------
diff --git a/addon/buildr/gwt.rb b/addon/buildr/gwt.rb
index a1b60c0..4fff352 100644
--- a/addon/buildr/gwt.rb
+++ b/addon/buildr/gwt.rb
@@ -1,171 +1,171 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with this
-# work for additional information regarding copyright ownership.  The ASF
-# licenses this file to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
-# License for the specific language governing permissions and limitations under
-# the License.
-
-module Buildr
-  module GWT
-
-    class << self
-
-      def version=(version)
-        @version = version
-      end
-
-      def version
-        @version || Buildr.settings.build['gwt'] || '2.5.1'
-      end
-
-      # The specs for requirements
-      def dependencies(version = nil)
-        ["com.google.gwt:gwt-dev:jar:#{version || self.version}"]
-      end
-
-      def gwtc_main(modules, source_artifacts, output_dir, unit_cache_dir, options = {})
-        cp = Buildr.artifacts(self.dependencies(options[:version])).each(&:invoke).map(&:to_s) + Buildr.artifacts(source_artifacts).each(&:invoke).map(&:to_s)
-        style = options[:style] || "OBFUSCATED," # "PRETTY", "DETAILED"
-        log_level = options[:log_level] #  ERROR, WARN, INFO, TRACE, DEBUG, SPAM, or ALL
-        workers = options[:workers] || 2
-
-        args = []
-        if log_level
-          args << "-logLevel"
-          args << log_level
-        end
-        args << "-strict"
-        args << "-style"
-        args << style
-        args << "-localWorkers"
-        args << workers
-        args << "-war"
-        args << output_dir
-        if options[:compile_report_dir]
-          args << "-compileReport"
-          args << "-extra"
-          args << options[:compile_report_dir]
-        end
-
-        if options[:draft_compile]
-          args << "-draftCompile"
-        end
-
-        if options[:enable_closure_compiler].nil? || options[:enable_closure_compiler]
-          args << "-XenableClosureCompiler"
-        end
-
-        args += modules
-
-        properties = options[:properties] ? options[:properties].dup : {}
-        properties["gwt.persistentunitcache"] = "true"
-        properties["gwt.persistentunitcachedir"] = unit_cache_dir
-
-        Java::Commands.java 'com.google.gwt.dev.Compiler', *(args + [{:classpath => cp, :properties => properties, :java_args => options[:java_args], :pathing_jar => false}])
-      end
-
-      def superdev_dependencies(version = nil)
-        self.dependencies + ["com.google.gwt:gwt-codeserver:jar:#{version || self.version}"]
-      end
-
-      def gwt_superdev(module_name, source_artifacts, work_dir, options = {})
-
-        cp = Buildr.artifacts(self.superdev_dependencies(options[:version])).each(&:invoke).map(&:to_s) + Buildr.artifacts(source_artifacts).each(&:invoke).map(&:to_s)
-
-        args = []
-        args << "-port" << (options[:port] || 5050)
-        args << "-workDir" << work_dir
-        (options[:src] || []).each do |src|
-          args << "-src" << src
-        end
-        args << module_name
-
-        properties = options[:properties] ? options[:properties].dup : {}
-
-        java_args = options[:java_args] ? options[:java_args].dup : {}
-
-        Java::Commands.java 'com.google.gwt.dev.codeserver.CodeServer', *(args + [{:classpath => cp, :properties => properties, :java_args => java_args, :pathing_jar => false}])
-      end
-    end
-
-    module ProjectExtension
-      include Extension
-
-      def gwt(module_names, options = {})
-        output_key = options[:output_key] || project.id
-        output_dir = project._(:target, :generated, :gwt, output_key)
-        artifacts = ([project.compile.target] + project.compile.sources + project.resources.sources).collect do |a|
-          a.is_a?(String) ? file(a) : a
-        end
-        dependencies = options[:dependencies] ? artifacts(options[:dependencies]) : (project.compile.dependencies + [project.compile.target]).collect do |dep|
-          dep.is_a?(String) ? file(dep) : dep
-        end
-
-        unit_cache_dir = project._(:target, :gwt, :unit_cache_dir, output_key)
-
-        task = project.file(output_dir) do
-          Buildr::GWT.gwtc_main(module_names,
-                                (dependencies + artifacts).flatten.compact,
-                                output_dir,
-                                unit_cache_dir,
-                                {:version => gwt_detect_version(dependencies)}.merge(options))
-        end
-        task.enhance(dependencies)
-        task.enhance([project.compile])
-        project.assets.paths << task
-        task
-      end
-
-      def gwt_superdev_runner(module_name, options = {})
-
-        dependencies = []
-        if options[:dependencies]
-          dependencies = artifacts(options[:dependencies])
-        else
-          sources = [] + project.compile.sources + project.resources.sources
-          classes = [] + project.compile.dependencies + [project.compile.target]
-          dependencies = (classes + sources).collect do |dep|
-            dep.is_a?(String) ? file(dep) : dep
-          end
-        end
-
-        desc "Run Superdev mode"
-        project.task("superdev") do
-          work_dir = project._(:target, :gwt, :superdev)
-          mkdir_p work_dir
-          Buildr::GWT.gwt_superdev(module_name,
-                                   dependencies,
-                                   work_dir,
-                                   {:version => gwt_detect_version(dependencies)}.merge(options))
-        end
-      end
-
-      protected
-
-      def gwt_detect_version(dependencies)
-        version = nil
-        dependencies.each do |dep|
-          if dep.respond_to?(:to_spec_hash)
-            hash = dep.to_spec_hash
-            if 'com.google.gwt' == hash[:group] && 'gwt-user' == hash[:id] && :jar == hash[:type]
-              version = hash[:version]
-            end
-          end
-        end
-        version
-      end
-    end
-  end
-end
-
-class Buildr::Project
-  include Buildr::GWT::ProjectExtension
-end
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with this
+# work for additional information regarding copyright ownership.  The ASF
+# licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations under
+# the License.
+
+module Buildr
+  module GWT
+
+    class << self
+
+      def version=(version)
+        @version = version
+      end
+
+      def version
+        @version || Buildr.settings.build['gwt'] || '2.5.1'
+      end
+
+      # The specs for requirements
+      def dependencies(version = nil)
+        ["com.google.gwt:gwt-dev:jar:#{version || self.version}"]
+      end
+
+      def gwtc_main(modules, source_artifacts, output_dir, unit_cache_dir, options = {})
+        cp = Buildr.artifacts(self.dependencies(options[:version])).each(&:invoke).map(&:to_s) + Buildr.artifacts(source_artifacts).each(&:invoke).map(&:to_s)
+        style = options[:style] || "OBFUSCATED," # "PRETTY", "DETAILED"
+        log_level = options[:log_level] #  ERROR, WARN, INFO, TRACE, DEBUG, SPAM, or ALL
+        workers = options[:workers] || 2
+
+        args = []
+        if log_level
+          args << "-logLevel"
+          args << log_level
+        end
+        args << "-strict"
+        args << "-style"
+        args << style
+        args << "-localWorkers"
+        args << workers
+        args << "-war"
+        args << output_dir
+        if options[:compile_report_dir]
+          args << "-compileReport"
+          args << "-extra"
+          args << options[:compile_report_dir]
+        end
+
+        if options[:draft_compile]
+          args << "-draftCompile"
+        end
+
+        if options[:enable_closure_compiler].nil? || options[:enable_closure_compiler]
+          args << "-XenableClosureCompiler"
+        end
+
+        args += modules
+
+        properties = options[:properties] ? options[:properties].dup : {}
+        properties["gwt.persistentunitcache"] = "true"
+        properties["gwt.persistentunitcachedir"] = unit_cache_dir
+
+        Java::Commands.java 'com.google.gwt.dev.Compiler', *(args + [{:classpath => cp, :properties => properties, :java_args => options[:java_args], :pathing_jar => false}])
+      end
+
+      def superdev_dependencies(version = nil)
+        self.dependencies + ["com.google.gwt:gwt-codeserver:jar:#{version || self.version}"]
+      end
+
+      def gwt_superdev(module_name, source_artifacts, work_dir, options = {})
+
+        cp = Buildr.artifacts(self.superdev_dependencies(options[:version])).each(&:invoke).map(&:to_s) + Buildr.artifacts(source_artifacts).each(&:invoke).map(&:to_s)
+
+        args = []
+        args << "-port" << (options[:port] || 5050)
+        args << "-workDir" << work_dir
+        (options[:src] || []).each do |src|
+          args << "-src" << src
+        end
+        args << module_name
+
+        properties = options[:properties] ? options[:properties].dup : {}
+
+        java_args = options[:java_args] ? options[:java_args].dup : {}
+
+        Java::Commands.java 'com.google.gwt.dev.codeserver.CodeServer', *(args + [{:classpath => cp, :properties => properties, :java_args => java_args, :pathing_jar => false}])
+      end
+    end
+
+    module ProjectExtension
+      include Extension
+
+      def gwt(module_names, options = {})
+        output_key = options[:output_key] || project.id
+        output_dir = project._(:target, :generated, :gwt, output_key)
+        artifacts = ([project.compile.target] + project.compile.sources + project.resources.sources).collect do |a|
+          a.is_a?(String) ? file(a) : a
+        end
+        dependencies = options[:dependencies] ? artifacts(options[:dependencies]) : (project.compile.dependencies + [project.compile.target]).collect do |dep|
+          dep.is_a?(String) ? file(dep) : dep
+        end
+
+        unit_cache_dir = project._(:target, :gwt, :unit_cache_dir, output_key)
+
+        task = project.file(output_dir) do
+          Buildr::GWT.gwtc_main(module_names,
+                                (dependencies + artifacts).flatten.compact,
+                                output_dir,
+                                unit_cache_dir,
+                                {:version => gwt_detect_version(dependencies)}.merge(options))
+        end
+        task.enhance(dependencies)
+        task.enhance([project.compile])
+        project.assets.paths << task
+        task
+      end
+
+      def gwt_superdev_runner(module_name, options = {})
+
+        dependencies = []
+        if options[:dependencies]
+          dependencies = artifacts(options[:dependencies])
+        else
+          sources = [] + project.compile.sources + project.resources.sources
+          classes = [] + project.compile.dependencies + [project.compile.target]
+          dependencies = (classes + sources).collect do |dep|
+            dep.is_a?(String) ? file(dep) : dep
+          end
+        end
+
+        desc "Run Superdev mode"
+        project.task("superdev") do
+          work_dir = project._(:target, :gwt, :superdev)
+          mkdir_p work_dir
+          Buildr::GWT.gwt_superdev(module_name,
+                                   dependencies,
+                                   work_dir,
+                                   {:version => gwt_detect_version(dependencies)}.merge(options))
+        end
+      end
+
+      protected
+
+      def gwt_detect_version(dependencies)
+        version = nil
+        dependencies.each do |dep|
+          if dep.respond_to?(:to_spec_hash)
+            hash = dep.to_spec_hash
+            if 'com.google.gwt' == hash[:group] && 'gwt-user' == hash[:id] && :jar == hash[:type]
+              version = hash[:version]
+            end
+          end
+        end
+        version
+      end
+    end
+  end
+end
+
+class Buildr::Project
+  include Buildr::GWT::ProjectExtension
+end

http://git-wip-us.apache.org/repos/asf/buildr/blob/37fec874/addon/buildr/hibernate.rb
----------------------------------------------------------------------
diff --git a/addon/buildr/hibernate.rb b/addon/buildr/hibernate.rb
index 380d4a4..fd5e83e 100644
--- a/addon/buildr/hibernate.rb
+++ b/addon/buildr/hibernate.rb
@@ -17,7 +17,7 @@ module Buildr
 
   # Provides Hibernate Doclet and schema export tasks. Require explicitly using <code>require "buildr/hibernate"</code>.
   module Hibernate
-    
+
     REQUIRES = Buildr.struct(
       :collections  => "commons-collections:commons-collections:jar:3.1",
       :logging      => "commons-logging:commons-logging:jar:1.0.3",
@@ -75,7 +75,7 @@ module Buildr
     def hibernate_requires()
       @requires ||= REQUIRES.dup
     end
-    
+
     # :call-seq:
     #   hibernate_doclet(options?) => task
     #
@@ -115,22 +115,22 @@ module Buildr
     #   end
     def hibernate_schemaexport(args, &block)
       path, arg_names, deps = Rake.application.resolve_args([args])
-      file(path).enhance { |task| 
+      file(path).enhance { |task|
         unless task.respond_to? :ant #this is a hack. A better way to do the job is to create a real task for all this.
           class << task ; attr_accessor :ant ; end
-          task.ant = Hibernate.schemaexport(hib_resolve_classpath) 
+          task.ant = Hibernate.schemaexport(hib_resolve_classpath)
         end
-      }  
-      
+      }
+
       if block
         file(path).enhance(deps) { |task| block.call task, task.ant }
       else
         file(path).enhance deps
       end
     end
-    
+
     protected
-    
+
     # This will download all the required artifacts before returning a classpath, and we want to do this only once.
     def hib_resolve_classpath
       Buildr.artifacts(hibernate_requires.to_a).each(&:invoke).map(&:to_s).join(File::PATH_SEPARATOR)

http://git-wip-us.apache.org/repos/asf/buildr/blob/37fec874/addon/buildr/javancss.rb
----------------------------------------------------------------------
diff --git a/addon/buildr/javancss.rb b/addon/buildr/javancss.rb
index 9f94b80..8272255 100644
--- a/addon/buildr/javancss.rb
+++ b/addon/buildr/javancss.rb
@@ -1,155 +1,155 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with this
-# work for additional information regarding copyright ownership.  The ASF
-# licenses this file to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
-# License for the specific language governing permissions and limitations under
-# the License.
-
-module Buildr
-  # Provides the <code>javancss:html</code> and <code>javancss:xml</code> tasks.
-  # Require explicitly using <code>require "buildr/javancss"</code>.
-  module JavaNCSS
-
-    class << self
-
-      # The specs for requirements
-      def dependencies
-        [
-          'org.codehaus.javancss:javancss:jar:32.53',
-          'javancss:ccl:jar:29.50',
-          'javancss:jhbasic:jar:29.50'
-        ]
-      end
-
-      def javancss(output_file, source_paths, options = {})
-        dependencies = (options[:dependencies] || []) + self.dependencies
-        cp = Buildr.artifacts(dependencies).each(&:invoke).map(&:to_s)
-
-        args = []
-        args << "-all"
-        args << "-xml"
-        args << "-out"
-        args << output_file
-        args << "-recursive"
-        source_paths.each do |source_path|
-          args << source_path
-        end
-
-        begin
-          Java::Commands.java 'javancss.Main', *(args + [{:classpath => cp, :properties => options[:properties], :java_args => options[:java_args]}])
-        rescue => e
-          raise e if options[:fail_on_error]
-        end
-      end
-    end
-
-    class Config
-      def enabled?
-        !!@enabled
-      end
-
-      attr_writer :enabled
-
-      def html_enabled?
-        File.exist?(self.style_file)
-      end
-
-      attr_writer :config_directory
-
-      def config_directory
-        @config_directory || project._(:source, :main, :etc, :javancss)
-      end
-
-      attr_writer :report_dir
-
-      def report_dir
-        @report_dir || project._(:reports, :javancss)
-      end
-
-      attr_writer :fail_on_error
-
-      def fail_on_error?
-        @fail_on_error.nil? ? false : @fail_on_error
-      end
-
-      attr_writer :xml_output_file
-
-      def xml_output_file
-        @xml_output_file || "#{self.report_dir}/javancss.xml"
-      end
-
-      attr_writer :html_output_file
-
-      def html_output_file
-        @html_output_file || "#{self.report_dir}/javancss.html"
-      end
-
-      attr_writer :style_file
-
-      def style_file
-        @style_file || "#{self.config_directory}/javancss2html.xsl"
-      end
-
-      def source_paths
-        @source_paths ||= [self.project.compile.sources, self.project.test.compile.sources]
-      end
-
-      protected
-
-      def initialize(project)
-        @project = project
-      end
-
-      attr_reader :project
-
-    end
-
-    module ProjectExtension
-      include Extension
-
-      def javancss
-        @javancss ||= Buildr::JavaNCSS::Config.new(project)
-      end
-
-      after_define do |project|
-        if project.javancss.enabled?
-          desc "Generate JavaNCSS xml report."
-          project.task("javancss:xml") do
-            puts "JavaNCSS: Analyzing source code..."
-            mkdir_p File.dirname(project.javancss.xml_output_file)
-            Buildr::JavaNCSS.javancss(project.javancss.xml_output_file,
-                                      project.javancss.source_paths.flatten.compact,
-                                      :fail_on_error => project.javancss.fail_on_error?)
-          end
-
-          if project.javancss.html_enabled?
-            xml_task = project.task("javancss:xml")
-            desc "Generate JavaNCSS html report."
-            project.task("javancss:html" => xml_task) do
-              puts "JavaNCSS: Generating report"
-              mkdir_p File.dirname(project.javancss.html_output_file)
-              Buildr.ant "javancss" do |ant|
-                ant.xslt :in => project.javancss.xml_output_file,
-                         :out => project.javancss.html_output_file,
-                         :style => project.javancss.style_file
-              end
-            end
-
-          end
-        end
-      end
-    end
-  end
-end
-
-class Buildr::Project
-  include Buildr::JavaNCSS::ProjectExtension
-end
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with this
+# work for additional information regarding copyright ownership.  The ASF
+# licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations under
+# the License.
+
+module Buildr
+  # Provides the <code>javancss:html</code> and <code>javancss:xml</code> tasks.
+  # Require explicitly using <code>require "buildr/javancss"</code>.
+  module JavaNCSS
+
+    class << self
+
+      # The specs for requirements
+      def dependencies
+        [
+          'org.codehaus.javancss:javancss:jar:32.53',
+          'javancss:ccl:jar:29.50',
+          'javancss:jhbasic:jar:29.50'
+        ]
+      end
+
+      def javancss(output_file, source_paths, options = {})
+        dependencies = (options[:dependencies] || []) + self.dependencies
+        cp = Buildr.artifacts(dependencies).each(&:invoke).map(&:to_s)
+
+        args = []
+        args << "-all"
+        args << "-xml"
+        args << "-out"
+        args << output_file
+        args << "-recursive"
+        source_paths.each do |source_path|
+          args << source_path
+        end
+
+        begin
+          Java::Commands.java 'javancss.Main', *(args + [{:classpath => cp, :properties => options[:properties], :java_args => options[:java_args]}])
+        rescue => e
+          raise e if options[:fail_on_error]
+        end
+      end
+    end
+
+    class Config
+      def enabled?
+        !!@enabled
+      end
+
+      attr_writer :enabled
+
+      def html_enabled?
+        File.exist?(self.style_file)
+      end
+
+      attr_writer :config_directory
+
+      def config_directory
+        @config_directory || project._(:source, :main, :etc, :javancss)
+      end
+
+      attr_writer :report_dir
+
+      def report_dir
+        @report_dir || project._(:reports, :javancss)
+      end
+
+      attr_writer :fail_on_error
+
+      def fail_on_error?
+        @fail_on_error.nil? ? false : @fail_on_error
+      end
+
+      attr_writer :xml_output_file
+
+      def xml_output_file
+        @xml_output_file || "#{self.report_dir}/javancss.xml"
+      end
+
+      attr_writer :html_output_file
+
+      def html_output_file
+        @html_output_file || "#{self.report_dir}/javancss.html"
+      end
+
+      attr_writer :style_file
+
+      def style_file
+        @style_file || "#{self.config_directory}/javancss2html.xsl"
+      end
+
+      def source_paths
+        @source_paths ||= [self.project.compile.sources, self.project.test.compile.sources]
+      end
+
+      protected
+
+      def initialize(project)
+        @project = project
+      end
+
+      attr_reader :project
+
+    end
+
+    module ProjectExtension
+      include Extension
+
+      def javancss
+        @javancss ||= Buildr::JavaNCSS::Config.new(project)
+      end
+
+      after_define do |project|
+        if project.javancss.enabled?
+          desc "Generate JavaNCSS xml report."
+          project.task("javancss:xml") do
+            puts "JavaNCSS: Analyzing source code..."
+            mkdir_p File.dirname(project.javancss.xml_output_file)
+            Buildr::JavaNCSS.javancss(project.javancss.xml_output_file,
+                                      project.javancss.source_paths.flatten.compact,
+                                      :fail_on_error => project.javancss.fail_on_error?)
+          end
+
+          if project.javancss.html_enabled?
+            xml_task = project.task("javancss:xml")
+            desc "Generate JavaNCSS html report."
+            project.task("javancss:html" => xml_task) do
+              puts "JavaNCSS: Generating report"
+              mkdir_p File.dirname(project.javancss.html_output_file)
+              Buildr.ant "javancss" do |ant|
+                ant.xslt :in => project.javancss.xml_output_file,
+                         :out => project.javancss.html_output_file,
+                         :style => project.javancss.style_file
+              end
+            end
+
+          end
+        end
+      end
+    end
+  end
+end
+
+class Buildr::Project
+  include Buildr::JavaNCSS::ProjectExtension
+end

http://git-wip-us.apache.org/repos/asf/buildr/blob/37fec874/addon/buildr/jaxb_xjc.rb
----------------------------------------------------------------------
diff --git a/addon/buildr/jaxb_xjc.rb b/addon/buildr/jaxb_xjc.rb
index 23870c4..1852f8b 100644
--- a/addon/buildr/jaxb_xjc.rb
+++ b/addon/buildr/jaxb_xjc.rb
@@ -1,74 +1,74 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with this
-# work for additional information regarding copyright ownership. The ASF
-# licenses this file to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations under
-# the License.
-
-module Buildr
-  module JaxbXjc
-    class << self
-
-      def jaxb_version
-        "2.2.1"
-      end
-
-      # The specs for requirements
-      def dependencies
-        [
-          "javax.xml.bind:jaxb-api:jar:#{jaxb_version}",
-          "com.sun.xml.bind:jaxb-impl:jar:#{jaxb_version}",
-          "com.sun.xml.bind:jaxb-xjc:jar:#{jaxb_version}"
-        ]
-      end
-
-      # Repositories containing the requirements
-      def remote_repository
-        "http://download.java.net/maven/2"
-      end
-
-      def xjc(*args)
-        cp = Buildr.artifacts(self.dependencies).each(&:invoke).map(&:to_s)
-        Java::Commands.java 'com.sun.tools.xjc.XJCFacade', *(args + [{ :classpath => cp }])
-      end
-    end
-
-    def compile_jaxb(files, *args)
-      options = Hash === args.last ? args.pop.dup : {}
-      rake_check_options options, :directory, :keep_content, :package, :id
-      args = args.dup
-      files = Array === files ? files.flatten : [files]
-
-      target_dir = File.expand_path(options[:directory] || _(:target, :generated, :jaxb, 'main/java'))
-      timestamp_file = File.expand_path("#{target_dir}/jaxb-#{options[:id] || 1}.cache")
-
-      project.iml.main_source_directories << target_dir if project.iml?
-
-      file(target_dir => timestamp_file)
-
-      file(timestamp_file => files.flatten) do |task|
-        rm_rf target_dir unless options[:keep_content]
-        mkdir_p target_dir
-        args << "-d" << target_dir
-        args << "-p" << options[:package] if options[:package]
-        args += files.collect{|f| f.to_s}
-        JaxbXjc.xjc args
-        touch timestamp_file
-      end
-
-      target_dir
-    end
-  end
-end
-
-class Buildr::Project
-  include Buildr::JaxbXjc
-end
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with this
+# work for additional information regarding copyright ownership. The ASF
+# licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under
+# the License.
+
+module Buildr
+  module JaxbXjc
+    class << self
+
+      def jaxb_version
+        "2.2.1"
+      end
+
+      # The specs for requirements
+      def dependencies
+        [
+          "javax.xml.bind:jaxb-api:jar:#{jaxb_version}",
+          "com.sun.xml.bind:jaxb-impl:jar:#{jaxb_version}",
+          "com.sun.xml.bind:jaxb-xjc:jar:#{jaxb_version}"
+        ]
+      end
+
+      # Repositories containing the requirements
+      def remote_repository
+        "http://download.java.net/maven/2"
+      end
+
+      def xjc(*args)
+        cp = Buildr.artifacts(self.dependencies).each(&:invoke).map(&:to_s)
+        Java::Commands.java 'com.sun.tools.xjc.XJCFacade', *(args + [{ :classpath => cp }])
+      end
+    end
+
+    def compile_jaxb(files, *args)
+      options = Hash === args.last ? args.pop.dup : {}
+      rake_check_options options, :directory, :keep_content, :package, :id
+      args = args.dup
+      files = Array === files ? files.flatten : [files]
+
+      target_dir = File.expand_path(options[:directory] || _(:target, :generated, :jaxb, 'main/java'))
+      timestamp_file = File.expand_path("#{target_dir}/jaxb-#{options[:id] || 1}.cache")
+
+      project.iml.main_source_directories << target_dir if project.iml?
+
+      file(target_dir => timestamp_file)
+
+      file(timestamp_file => files.flatten) do |task|
+        rm_rf target_dir unless options[:keep_content]
+        mkdir_p target_dir
+        args << "-d" << target_dir
+        args << "-p" << options[:package] if options[:package]
+        args += files.collect{|f| f.to_s}
+        JaxbXjc.xjc args
+        touch timestamp_file
+      end
+
+      target_dir
+    end
+  end
+end
+
+class Buildr::Project
+  include Buildr::JaxbXjc
+end

http://git-wip-us.apache.org/repos/asf/buildr/blob/37fec874/addon/buildr/jibx.rb
----------------------------------------------------------------------
diff --git a/addon/buildr/jibx.rb b/addon/buildr/jibx.rb
index 6b017c9..e0973c2 100644
--- a/addon/buildr/jibx.rb
+++ b/addon/buildr/jibx.rb
@@ -82,4 +82,3 @@ module Buildr
     include JiBX
   end
 end
-

http://git-wip-us.apache.org/repos/asf/buildr/blob/37fec874/addon/buildr/org/apache/buildr/BuildrNail.java
----------------------------------------------------------------------
diff --git a/addon/buildr/org/apache/buildr/BuildrNail.java b/addon/buildr/org/apache/buildr/BuildrNail.java
index 706db62..c9aa59b 100644
--- a/addon/buildr/org/apache/buildr/BuildrNail.java
+++ b/addon/buildr/org/apache/buildr/BuildrNail.java
@@ -20,7 +20,7 @@ package org.apache.buildr;
 import com.martiansoftware.nailgun.NGContext;
 
 public interface BuildrNail {
-  
+
   public void main(NGContext ctx);
 
   public static class Main {
@@ -33,7 +33,7 @@ public interface BuildrNail {
 
 }
 
-/* 
+/*
  * Local Variables:
  * indent-tabs-mode: nil
  * c-basic-offset: 2

http://git-wip-us.apache.org/repos/asf/buildr/blob/37fec874/addon/buildr/org/apache/buildr/JettyWrapper.java
----------------------------------------------------------------------
diff --git a/addon/buildr/org/apache/buildr/JettyWrapper.java b/addon/buildr/org/apache/buildr/JettyWrapper.java
index 5b0bf21..769b339 100644
--- a/addon/buildr/org/apache/buildr/JettyWrapper.java
+++ b/addon/buildr/org/apache/buildr/JettyWrapper.java
@@ -16,7 +16,7 @@
 
 
 package org.apache.buildr;
- 
+
 import org.mortbay.jetty.Server;
 import org.mortbay.jetty.Request;
 import org.mortbay.jetty.Handler;
@@ -82,7 +82,7 @@ public class JettyWrapper {
                     String path = request.getParameter("path");
                     System.out.println("Deploying " + webapp + " in " + path);
                     WebAppContext context;
-            
+
                     context = (WebAppContext) _apps.get(path);
                     if (context != null) {
                         context.stop();
@@ -95,7 +95,7 @@ public class JettyWrapper {
                         "org.mortbay.jetty.webapp.WebInfConfiguration",
                         "org.mortbay.jetty.webapp.WebXmlConfiguration"});
                     context.setClassLoader(new WebAppClassLoader(context));
-                    
+
                     _handlerColl.addHandler(context);
                     context.start();
                     _apps.put(path, context);

http://git-wip-us.apache.org/repos/asf/buildr/blob/37fec874/addon/buildr/package_as_nsis.rb
----------------------------------------------------------------------
diff --git a/addon/buildr/package_as_nsis.rb b/addon/buildr/package_as_nsis.rb
index 042da3d..b5592dc 100644
--- a/addon/buildr/package_as_nsis.rb
+++ b/addon/buildr/package_as_nsis.rb
@@ -27,9 +27,9 @@ module Buildr
         self.nsis_executable = "makensis"
         self.nsis_major_version = 3
         self.values = {}
-        
+
         super(*args)
-        
+
         enhance do
           info "Calling makensis"
           # We make available one variable to the nsi script:

http://git-wip-us.apache.org/repos/asf/buildr/blob/37fec874/addon/buildr/pmd.rb
----------------------------------------------------------------------
diff --git a/addon/buildr/pmd.rb b/addon/buildr/pmd.rb
index 93dd95f..87f42d4 100644
--- a/addon/buildr/pmd.rb
+++ b/addon/buildr/pmd.rb
@@ -1,166 +1,166 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with this
-# work for additional information regarding copyright ownership.  The ASF
-# licenses this file to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#    http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
-# License for the specific language governing permissions and limitations under
-# the License.
-
-module Buildr
-  # Provides the <code>pmd:rule:xml</code>, <code>pmd:rule:html</code>, <code>pmd:cpd:xml</code>
-  # and <code>pmd:cpd:html</code> tasks.
-  #
-  # Require explicitly using <code>require "buildr/pmd"</code>.
-  module Pmd
-
-    class << self
-
-      # The specs for requirements
-      def dependencies
-        [
-          'net.sourceforge.pmd:pmd:jar:5.0.5',
-          'jaxen:jaxen:jar:1.1.1',
-          'asm:asm:jar:3.2'
-        ]
-      end
-
-      def pmd(rule_set_files, format, output_file_prefix, source_paths, options = {})
-        dependencies = (options[:dependencies] || []) + self.dependencies
-        cp = Buildr.artifacts(dependencies).each(&:invoke).map(&:to_s)
-        (options[:rule_set_paths] || []).each {|p| cp << p}
-
-        puts "PMD: Analyzing source code..."
-        mkdir_p File.dirname(output_file_prefix)
-
-        Buildr.ant("pmd-report") do |ant|
-          ant.taskdef :name=> 'pmd', :classpath => cp.join(';'), :classname => 'net.sourceforge.pmd.ant.PMDTask'
-          ant.pmd :shortFilenames => true, :rulesetfiles => rule_set_files.join(',') do
-            ant.formatter :type => format, :toFile => "#{output_file_prefix}.#{format}"
-            source_paths.each do |src|
-              ant.fileset :dir=> src, :includes=>'**/*.java'
-            end
-          end
-
-        end
-      end
-
-      def cpd(format, output_file_prefix, source_paths, options = {})
-        dependencies = (options[:dependencies] || []) + self.dependencies
-        cp = Buildr.artifacts(dependencies).each(&:invoke).map(&:to_s)
-        minimum_token_count = options[:minimum_token_count] || 100
-        encoding = options[:encoding] || 'UTF-8'
-
-        puts "PMD-CPD: Analyzing source code..."
-        mkdir_p File.dirname(output_file_prefix)
-
-        Buildr.ant("cpd-report") do |ant|
-          ant.taskdef :name=> 'cpd', :classpath => cp.join(';'), :classname => 'net.sourceforge.pmd.cpd.CPDTask'
-          ant.cpd :format => format, :minimumTokenCount => minimum_token_count, :encoding => encoding, :outputFile => "#{output_file_prefix}.#{format}" do
-            source_paths.each do |src|
-              ant.fileset :dir=> src, :includes=>'**/*.java'
-            end
-          end
-
-        end
-      end
-    end
-
-    class Config
-
-      attr_writer :enabled
-
-      def enabled?
-        !!@enabled
-      end
-
-      attr_writer :rule_set_files
-
-      def rule_set_files
-        @rule_set_files ||= ['rulesets/java/basic.xml','rulesets/java/imports.xml','rulesets/java/unusedcode.xml']
-      end
-
-      attr_writer :rule_set_paths
-
-      def rule_set_paths
-        @rule_set_paths ||= []
-      end
-
-      attr_writer :report_dir
-
-      def report_dir
-        @report_dir || project._(:reports, :pmd)
-      end
-
-      attr_writer :output_file_prefix
-
-      def output_file_prefix
-        @output_file_prefix || "#{self.report_dir}/pmd"
-      end
-
-      attr_writer :cpd_output_file_prefix
-
-      def cpd_output_file_prefix
-        @cpd_output_file_prefix || "#{self.report_dir}/cpd"
-      end
-
-      def source_paths
-        @source_paths ||= [self.project.compile.sources, self.project.test.compile.sources]
-      end
-
-      def flat_source_paths
-        source_paths.flatten.compact
-      end
-
-      protected
-
-      def initialize(project)
-        @project = project
-      end
-
-      attr_reader :project
-    end
-
-    module ProjectExtension
-      include Extension
-
-      def pmd
-        @pmd ||= Buildr::Pmd::Config.new(project)
-      end
-
-      after_define do |project|
-        if project.pmd.enabled?
-          desc "Generate pmd xml report."
-          project.task("pmd:rule:xml") do
-            Buildr::Pmd.pmd(project.pmd.rule_set_files, 'xml', project.pmd.output_file_prefix, project.pmd.flat_source_paths, :rule_set_paths => project.pmd.rule_set_paths)
-          end
-
-          desc "Generate pmd html report."
-          project.task("pmd:rule:html") do
-            Buildr::Pmd.pmd(project.pmd.rule_set_files, 'html', project.pmd.output_file_prefix, project.pmd.flat_source_paths, :rule_set_paths => project.pmd.rule_set_paths)
-          end
-
-          desc "Generate pmd cpd xml report."
-          project.task("pmd:cpd:xml") do
-            Buildr::Pmd.cpd('xml', project.pmd.cpd_output_file_prefix, project.pmd.flat_source_paths)
-          end
-
-          desc "Generate pmd cpd text report."
-          project.task("pmd:cpd:text") do
-            Buildr::Pmd.cpd('text', project.pmd.cpd_output_file_prefix, project.pmd.flat_source_paths)
-          end
-        end
-      end
-    end
-  end
-end
-
-class Buildr::Project
-  include Buildr::Pmd::ProjectExtension
-end
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with this
+# work for additional information regarding copyright ownership.  The ASF
+# licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations under
+# the License.
+
+module Buildr
+  # Provides the <code>pmd:rule:xml</code>, <code>pmd:rule:html</code>, <code>pmd:cpd:xml</code>
+  # and <code>pmd:cpd:html</code> tasks.
+  #
+  # Require explicitly using <code>require "buildr/pmd"</code>.
+  module Pmd
+
+    class << self
+
+      # The specs for requirements
+      def dependencies
+        [
+          'net.sourceforge.pmd:pmd:jar:5.0.5',
+          'jaxen:jaxen:jar:1.1.1',
+          'asm:asm:jar:3.2'
+        ]
+      end
+
+      def pmd(rule_set_files, format, output_file_prefix, source_paths, options = {})
+        dependencies = (options[:dependencies] || []) + self.dependencies
+        cp = Buildr.artifacts(dependencies).each(&:invoke).map(&:to_s)
+        (options[:rule_set_paths] || []).each {|p| cp << p}
+
+        puts "PMD: Analyzing source code..."
+        mkdir_p File.dirname(output_file_prefix)
+
+        Buildr.ant("pmd-report") do |ant|
+          ant.taskdef :name=> 'pmd', :classpath => cp.join(';'), :classname => 'net.sourceforge.pmd.ant.PMDTask'
+          ant.pmd :shortFilenames => true, :rulesetfiles => rule_set_files.join(',') do
+            ant.formatter :type => format, :toFile => "#{output_file_prefix}.#{format}"
+            source_paths.each do |src|
+              ant.fileset :dir=> src, :includes=>'**/*.java'
+            end
+          end
+
+        end
+      end
+
+      def cpd(format, output_file_prefix, source_paths, options = {})
+        dependencies = (options[:dependencies] || []) + self.dependencies
+        cp = Buildr.artifacts(dependencies).each(&:invoke).map(&:to_s)
+        minimum_token_count = options[:minimum_token_count] || 100
+        encoding = options[:encoding] || 'UTF-8'
+
+        puts "PMD-CPD: Analyzing source code..."
+        mkdir_p File.dirname(output_file_prefix)
+
+        Buildr.ant("cpd-report") do |ant|
+          ant.taskdef :name=> 'cpd', :classpath => cp.join(';'), :classname => 'net.sourceforge.pmd.cpd.CPDTask'
+          ant.cpd :format => format, :minimumTokenCount => minimum_token_count, :encoding => encoding, :outputFile => "#{output_file_prefix}.#{format}" do
+            source_paths.each do |src|
+              ant.fileset :dir=> src, :includes=>'**/*.java'
+            end
+          end
+
+        end
+      end
+    end
+
+    class Config
+
+      attr_writer :enabled
+
+      def enabled?
+        !!@enabled
+      end
+
+      attr_writer :rule_set_files
+
+      def rule_set_files
+        @rule_set_files ||= ['rulesets/java/basic.xml','rulesets/java/imports.xml','rulesets/java/unusedcode.xml']
+      end
+
+      attr_writer :rule_set_paths
+
+      def rule_set_paths
+        @rule_set_paths ||= []
+      end
+
+      attr_writer :report_dir
+
+      def report_dir
+        @report_dir || project._(:reports, :pmd)
+      end
+
+      attr_writer :output_file_prefix
+
+      def output_file_prefix
+        @output_file_prefix || "#{self.report_dir}/pmd"
+      end
+
+      attr_writer :cpd_output_file_prefix
+
+      def cpd_output_file_prefix
+        @cpd_output_file_prefix || "#{self.report_dir}/cpd"
+      end
+
+      def source_paths
+        @source_paths ||= [self.project.compile.sources, self.project.test.compile.sources]
+      end
+
+      def flat_source_paths
+        source_paths.flatten.compact
+      end
+
+      protected
+
+      def initialize(project)
+        @project = project
+      end
+
+      attr_reader :project
+    end
+
+    module ProjectExtension
+      include Extension
+
+      def pmd
+        @pmd ||= Buildr::Pmd::Config.new(project)
+      end
+
+      after_define do |project|
+        if project.pmd.enabled?
+          desc "Generate pmd xml report."
+          project.task("pmd:rule:xml") do
+            Buildr::Pmd.pmd(project.pmd.rule_set_files, 'xml', project.pmd.output_file_prefix, project.pmd.flat_source_paths, :rule_set_paths => project.pmd.rule_set_paths)
+          end
+
+          desc "Generate pmd html report."
+          project.task("pmd:rule:html") do
+            Buildr::Pmd.pmd(project.pmd.rule_set_files, 'html', project.pmd.output_file_prefix, project.pmd.flat_source_paths, :rule_set_paths => project.pmd.rule_set_paths)
+          end
+
+          desc "Generate pmd cpd xml report."
+          project.task("pmd:cpd:xml") do
+            Buildr::Pmd.cpd('xml', project.pmd.cpd_output_file_prefix, project.pmd.flat_source_paths)
+          end
+
+          desc "Generate pmd cpd text report."
+          project.task("pmd:cpd:text") do
+            Buildr::Pmd.cpd('text', project.pmd.cpd_output_file_prefix, project.pmd.flat_source_paths)
+          end
+        end
+      end
+    end
+  end
+end
+
+class Buildr::Project
+  include Buildr::Pmd::ProjectExtension
+end

http://git-wip-us.apache.org/repos/asf/buildr/blob/37fec874/doc/building.textile
----------------------------------------------------------------------
diff --git a/doc/building.textile b/doc/building.textile
index 36af8ac..f6cb72e 100644
--- a/doc/building.textile
+++ b/doc/building.textile
@@ -130,7 +130,7 @@ You can also use "profiles":settings_profiles.html#profiles to supply a name/val
 filter: &alpha1
   version: experimental
   copyright: Acme Inc (C) 2007
-  
+
 development:
   filter: *alpha1
 test:
@@ -143,7 +143,7 @@ You can specify a different format by passing it as the first argument. Supporte
 | @:ant@    | Map from <code>@key@</code> to value. |
 | @:maven@  | Map from @${key}@ to value (default). |
 | @:ruby@   | Map from @#{key}@ to value. |
-| @:erb@    | Map from @<%=key%>@ to value. | 
+| @:erb@    | Map from @<%=key%>@ to value. |
 | @Regexp@  | Map using the matched value of the regular expression (e.g. @/=(.*?)=/@). |
 
 For example, using the @:ruby@ format instead of the default @:maven@ format:
@@ -234,7 +234,7 @@ The @build@ task has an evil twin, the @clean@ task.  It's the task you use to r
 
 It basically erases the target directories, the one called @target@, and if you get creative and change the target directory for tasks like @compile@, it will also erase those.  If you decide to generate files outside the target directory and want to cleanup after yourself, just extend the @clean@ task.
 
-For example: 
+For example:
 
 {% highlight ruby %}
 clean { rm_rf _('staged') }

http://git-wip-us.apache.org/repos/asf/buildr/blob/37fec874/doc/css/default.css
----------------------------------------------------------------------
diff --git a/doc/css/default.css b/doc/css/default.css
index 783b7f1..72f7c95 100644
--- a/doc/css/default.css
+++ b/doc/css/default.css
@@ -82,7 +82,7 @@ blockquote {
   font-style: italic;
 }
 
-ul { 
+ul {
   list-style-type: disc;
 }
 
@@ -153,7 +153,7 @@ th, thead td {
 #pages ol li {
   padding: 0.3em 0 0.6em 0em;
   color: #669966;
-  font-weight: bold; 
+  font-weight: bold;
 }
 #pages ol li ol {
   margin-top: 0.3em;
@@ -206,7 +206,7 @@ ol.toc li ol.toc {
 }
 #content p.tip { background: url("../images/tip.png") 0 0 no-repeat; }
 #content p.note { background: url("../images/note.png") 0 0 no-repeat; }
- 
+
 #content .footnote {
   margin-top: 2.5em;
 }

http://git-wip-us.apache.org/repos/asf/buildr/blob/37fec874/doc/css/print.css
----------------------------------------------------------------------
diff --git a/doc/css/print.css b/doc/css/print.css
index cefbfc2..ae64d6f 100644
--- a/doc/css/print.css
+++ b/doc/css/print.css
@@ -64,7 +64,7 @@
     background: transparent;
     text-decoration: none;
   }
-  
+
 
   #header, #pages, #footer { display: none }
   #wrap, #content {

http://git-wip-us.apache.org/repos/asf/buildr/blob/37fec874/doc/download.textile
----------------------------------------------------------------------
diff --git a/doc/download.textile b/doc/download.textile
index dadcb18..5390550 100644
--- a/doc/download.textile
+++ b/doc/download.textile
@@ -280,4 +280,3 @@ p>. ("Release signing keys":http://archive.apache.org/dist/buildr/1.3.0-incubati
 
 
 p(note). When downloading from files please check the "md5sum":http://www.apache.org/dev/release-signing#md5 and verify the "OpenPGP":http://www.apache.org/dev/release-signing#openpgp compatible signature from the main Apache site. This KEYS file contains the public keys used for signing releases. It is recommended that (when possible) a web of trust is used to confirm the identity of these keys. For more information, please see the "Apache Release FAQ":http://www.apache.org/dev/release.html.
-

http://git-wip-us.apache.org/repos/asf/buildr/blob/37fec874/doc/index.textile
----------------------------------------------------------------------
diff --git a/doc/index.textile b/doc/index.textile
index d8fc162..652c994 100644
--- a/doc/index.textile
+++ b/doc/index.textile
@@ -75,4 +75,3 @@ The Apache Software Foundation is a non-profit organization, consider "sponsorin
 Community member quotes from a thread on "Stack Overflow":http://stackoverflow.com/questions/1015525/why-use-buildr-instead-of-ant-or-maven/1055864.
 
 Developed with !http://www.jetbrains.com/ruby/features/ruby_banners/ruby1/ruby120x30_white.gif(Developed with RubyMine)!:http://www.jetbrains.com/ruby/features?utm_source=RubyMineUser&utm_medium=Banner&utm_campaign=RubyMine
-

http://git-wip-us.apache.org/repos/asf/buildr/blob/37fec874/doc/installing.textile
----------------------------------------------------------------------
diff --git a/doc/installing.textile b/doc/installing.textile
index 5eb9121..3472653 100644
--- a/doc/installing.textile
+++ b/doc/installing.textile
@@ -11,11 +11,11 @@ The RubyForge distribution is *not* an official Apache distribution. The all-in-
 
 *In details:* Navigate to "Rubyforge's buildr's Files page":http://rubyforge.org/frs/?group_id=3180 and download the all-in-one bundle for the latest version available.
 
-Unzip the bundle in a convenient location. 
+Unzip the bundle in a convenient location.
 
-You can execute the buildr executable under the bin directory directly. 
+You can execute the buildr executable under the bin directory directly.
 
-You should consider adding the bin directory of the result to the @PATH@ global environment variable. See "Installing Buildr for JRuby":#jruby for instructions to update it.  
+You should consider adding the bin directory of the result to the @PATH@ global environment variable. See "Installing Buildr for JRuby":#jruby for instructions to update it.
 
 h1(#the-gem). Installing the gem
 

http://git-wip-us.apache.org/repos/asf/buildr/blob/37fec874/doc/languages.textile
----------------------------------------------------------------------
diff --git a/doc/languages.textile b/doc/languages.textile
index bfb46eb..a08bc58 100644
--- a/doc/languages.textile
+++ b/doc/languages.textile
@@ -617,4 +617,3 @@ Supports the following options:
 | @:fork@         | Run the tests on a new java vm. (enabled unless running on JRuby) |
 | @:properties@   | Hash of system properties available to the test case. |
 | @:java_args@    | Arguments passed as is to the JVM. (only when fork is enabled) |
-

http://git-wip-us.apache.org/repos/asf/buildr/blob/37fec874/doc/mailing_lists.textile
----------------------------------------------------------------------
diff --git a/doc/mailing_lists.textile b/doc/mailing_lists.textile
index bd1c6e9..f31577e 100644
--- a/doc/mailing_lists.textile
+++ b/doc/mailing_lists.textile
@@ -23,7 +23,3 @@ title: Mailing Lists
 | Search        | "http://buildr.markmail.org/search/list:ci":http://buildr.markmail.org/search/list:ci |
 | Subscribe     | "ci-subscribe@buildr.apache.org":mailto:ci-subscribe@buildr.apache.org |
 | Unsubscribe   | "ci-unsubscribe@buildr.apache.org":mailto:ci-unsubscribe@buildr.apache.org |
-
-
-
-

http://git-wip-us.apache.org/repos/asf/buildr/blob/37fec874/doc/more_stuff.textile
----------------------------------------------------------------------
diff --git a/doc/more_stuff.textile b/doc/more_stuff.textile
index 057ddcd..6f44f4b 100644
--- a/doc/more_stuff.textile
+++ b/doc/more_stuff.textile
@@ -1113,4 +1113,3 @@ puts "There are #{source.size} source files"
 lines = sources.inject(0) { |lines, src| lines += File.readlines(src).size }
 puts "That contain #{lines} lines"
 {% endhighlight %}
-

http://git-wip-us.apache.org/repos/asf/buildr/blob/37fec874/doc/preface.textile
----------------------------------------------------------------------
diff --git a/doc/preface.textile b/doc/preface.textile
index f4bc86f..25c641f 100644
--- a/doc/preface.textile
+++ b/doc/preface.textile
@@ -51,4 +51,4 @@ bq. The positive side effect for me as a java user is that I learn a little ruby
 </div>
 
 
-p(preface).  
+p(preface).

http://git-wip-us.apache.org/repos/asf/buildr/blob/37fec874/doc/projects.textile
----------------------------------------------------------------------
diff --git a/doc/projects.textile b/doc/projects.textile
index 99f2094..6f8ad30 100644
--- a/doc/projects.textile
+++ b/doc/projects.textile
@@ -16,21 +16,21 @@ The remainder of this guide deals with what it takes to build a project.  But fi
 require "buildr/openjpa"
 
 include Buildr::OpenJPA
- 
+
 VERSION_NUMBER = '1.0'
- 
+
 AXIS2 = 'org.apache.axis2:axis2:jar:1.2'
 AXIOM = group('axiom-api', 'axiom-impl', 'axiom-dom',
   :under=>'org.apache.ws.commons.axiom', :version=>'1.2.4')
 AXIS_OF_WS = [AXIOM, AXIS2]
 OPENJPA = ['org.apache.openjpa:openjpa:jar:1.2.0',
   'net.sourceforge.serp:serp:jar:1.12.0']
- 
+
 repositories.remote << 'http://www.ibiblio.org/maven2/'
- 
+
 desc 'Code. Build. ??? Profit!'
 define 'killer-app' do
- 
+
   project.version = VERSION_NUMBER
   project.group = 'acme'
   manifest['Copyright'] = 'Acme Inc (C) 2007'
@@ -124,7 +124,7 @@ To see a list of all projects defined in your Buildfile run @buildr help:project
 
 h2(#tasks). Running Project Tasks
 
-Most times, you run tasks like @build@ or @package@ that operate on the current project and recursively on its sub-projects.  The "current project" is the one that uses the current working directory.  So if you're in the @la-web/src@ directory looking at source files, _la-web_ is the current project.  For example: 
+Most times, you run tasks like @build@ or @package@ that operate on the current project and recursively on its sub-projects.  The "current project" is the one that uses the current working directory.  So if you're in the @la-web/src@ directory looking at source files, _la-web_ is the current project.  For example:
 
 {% highlight sh %}
 # build killer-app and all its sub-projects

http://git-wip-us.apache.org/repos/asf/buildr/blob/37fec874/doc/releasing.textile
----------------------------------------------------------------------
diff --git a/doc/releasing.textile b/doc/releasing.textile
index 6af342e..6c6f551 100644
--- a/doc/releasing.textile
+++ b/doc/releasing.textile
@@ -116,4 +116,3 @@ The environment variable @NEXT_VERSION@ has precedence over Release.next_version
 h2(#custom_tag_and_msg). How to specify my own tag name and commit message?
 
 As explained earlier, Buildr will create two new commits and a new tag in the version control system. Similarly to @Release.next_version@, the commit message and the tag name can be customized with @Release.message@ and @Release.tag_name@. Both could be strings or procs that would receive the released version @THIS_VERSION@ without @-SNAPSHOT@.
-

http://git-wip-us.apache.org/repos/asf/buildr/blob/37fec874/lib/buildr/clojure/shell.rb
----------------------------------------------------------------------
diff --git a/lib/buildr/clojure/shell.rb b/lib/buildr/clojure/shell.rb
index 95c32ba..38b7390 100644
--- a/lib/buildr/clojure/shell.rb
+++ b/lib/buildr/clojure/shell.rb
@@ -49,4 +49,3 @@ module Buildr::Shell #:nodoc:
 end
 
 Buildr::Shell.providers << Buildr::Shell::Clojure
-


Mime
View raw message