Author: donaldp
Date: Sat Jun 8 22:19:57 2013
New Revision: 1491084
URL: http://svn.apache.org/r1491084
Log:
Ensure generation of buildfiles from eclipse projects will finds .project files
in Ruby >= 2.0.0.
Modified:
buildr/trunk/CHANGELOG
buildr/trunk/lib/buildr/core/generate.rb
Modified: buildr/trunk/CHANGELOG
URL:
http://svn.apache.org/viewvc/buildr/trunk/CHANGELOG?rev=1491084&r1=1491083&r2=1491084&view=diff
==============================================================================
--- buildr/trunk/CHANGELOG (original)
+++ buildr/trunk/CHANGELOG Sat Jun 8 22:19:57 2013
@@ -1,4 +1,6 @@
1.4.13 (Pending)
+* Fixed: Ensure generation of buildfiles from eclipse projects will
+ finds .project files in Ruby >= 2.0.0.
* Fixed: Patch Rake::FileList in Ruby >= 2.0.0 to match dot files if
a .* pattern is supplied as in earlier versions of ruby.
* Fixed: Make Archive-related operations (e.g. zip.merge) deterministic using
Modified: buildr/trunk/lib/buildr/core/generate.rb
URL:
http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/core/generate.rb?rev=1491084&r1=1491083&r2=1491084&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/core/generate.rb (original)
+++ buildr/trunk/lib/buildr/core/generate.rb Sat Jun 8 22:19:57 2013
@@ -58,7 +58,7 @@ module Buildr #:nodoc:
end
def has_eclipse_project?
- candidates = Dir.glob("**/.project")
+ candidates = Dir.glob("**/.project", File::FNM_DOTMATCH)
return false if candidates.size == 0
candidates.find { |x| get_project_natures(x) }
return candidates.size > 0
@@ -134,7 +134,7 @@ EOF
script << " # dependencies << 'junit should be commented out and
replace by correct ARTIFACT definition. Eg"
script << " # dependencies << 'junit:junit:jar:3.8.2'"
script << setLayout('src', 'bin') # default values for eclipse
- dot_projects = Dir.glob('**/.project').find_all { |dot_project|
get_project_natures(dot_project) }
+ dot_projects = Dir.glob('**/.project',
File::FNM_DOTMATCH).find_all { |dot_project| get_project_natures(dot_project) }
dot_projects.sort.each { |dot_project|
from_eclipse(File.dirname(dot_project), false) } if dot_projects
else
# Skip fragments. Buildr cannot handle it without the help of
buildr4osgi