You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by do...@apache.org on 2018/07/25 23:48:11 UTC

buildr git commit: Default the sourcepath passed to the javadoc tool

Repository: buildr
Updated Branches:
  refs/heads/master ac803a05f -> 360e7643d


Default the sourcepath passed to the javadoc tool


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

Branch: refs/heads/master
Commit: 360e7643d29c0a872f3d5c4736f6037b070a5f84
Parents: ac803a0
Author: Peter Donald <pe...@realityforge.org>
Authored: Thu Jul 26 09:47:53 2018 +1000
Committer: Peter Donald <pe...@realityforge.org>
Committed: Thu Jul 26 09:47:53 2018 +1000

----------------------------------------------------------------------
 CHANGELOG              | 6 ++++++
 addon/buildr/gwt.rb    | 5 -----
 lib/buildr/java/doc.rb | 1 +
 3 files changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/buildr/blob/360e7643/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index ffaccb5..2aaa819 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -6,6 +6,12 @@
           avoid adding GWT dependencies to the project directly and thus the associated POM. This will be
           required to support GWT3.x and GWT2.x simultaneously as well as making it easier to manage
           dependencies in the POMs.
+* Change: Javadoc: If the user does not supply an explicit `:sourcepath` to the doc/javadoc tool then
+          default the value to `project.compile.sources`. This will stop javadoc from scanning the classpath
+          for `*.java` files which can cause issues with projects that include `sources` classifier artifacts
+          on the classpath. This is particularly relevant for GWT based projects that include artifacts with
+          source embedded in the artifacts. This change also made it possible to remove an ugly hack in the
+          GWT addon that removed the gwt artifacts from the javadoc path.
 
 1.5.6 (2018-05-10)
 * Fixed:  Ensure that the username and passwords declared for repositories are correctly url encoded for

http://git-wip-us.apache.org/repos/asf/buildr/blob/360e7643/addon/buildr/gwt.rb
----------------------------------------------------------------------
diff --git a/addon/buildr/gwt.rb b/addon/buildr/gwt.rb
index 7c29667..22cd964 100644
--- a/addon/buildr/gwt.rb
+++ b/addon/buildr/gwt.rb
@@ -236,11 +236,6 @@ module Buildr
     module ProjectExtension
       include Extension
 
-      after_define(:doc) do |project|
-        # Remove gwt artifacts when performing javadocs as the gwt jars have invalid source files
-        project.doc.classpath.delete_if { |f| f.to_s =~ /.*\/com\/google\/gwt\/gwt-.*/ }
-      end
-
       first_time do
         desc 'Run C22 to GSS converter. Set css files via environment variable CSS_FILES'
         task('css2gss') do

http://git-wip-us.apache.org/repos/asf/buildr/blob/360e7643/lib/buildr/java/doc.rb
----------------------------------------------------------------------
diff --git a/lib/buildr/java/doc.rb b/lib/buildr/java/doc.rb
index 0f478ed..123e46a 100644
--- a/lib/buildr/java/doc.rb
+++ b/lib/buildr/java/doc.rb
@@ -61,6 +61,7 @@ module Buildr #:nodoc:
           end
         [:sourcepath, :classpath].each do |option|
           Array(options[option]).flatten.tap do |paths|
+            paths = project.compile.sources if :sourcepath == option && options[option].nil?
             cmd_args << "-#{option}" << paths.flatten.map(&:to_s).join(File::PATH_SEPARATOR) unless paths.empty?
           end
         end