You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by bo...@apache.org on 2011/06/17 21:04:41 UTC
svn commit: r1136980 - in /buildr/trunk: CHANGELOG lib/buildr/ide/eclipse.rb
Author: boisvert
Date: Fri Jun 17 19:04:40 2011
New Revision: 1136980
URL: http://svn.apache.org/viewvc?rev=1136980&view=rev
Log:
BUILDR-584 eclipse plugin should use absolute path
Modified:
buildr/trunk/CHANGELOG
buildr/trunk/lib/buildr/ide/eclipse.rb
Modified: buildr/trunk/CHANGELOG
URL: http://svn.apache.org/viewvc/buildr/trunk/CHANGELOG?rev=1136980&r1=1136979&r2=1136980&view=diff
==============================================================================
--- buildr/trunk/CHANGELOG (original)
+++ buildr/trunk/CHANGELOG Fri Jun 17 19:04:40 2011
@@ -19,6 +19,7 @@
* Fixed: BUILDR-251 Classifier not handled when downloading snapshot artifacts (Ryan Fowler)
* Fixed: BUILDR-585 "TypeError : can't dup NilClass" when merging jars
* Fixed: BUILDR-586 ScalaTest uses deprecated ant task (Martin Partel)
+* Fixed: BUILDR-584 eclipse plugin should use absolute path
1.4.5 (2011-02-20)
* Added: BUILDR-555 Add support for the jaxb binding compiler (Mark Petrovic)
Modified: buildr/trunk/lib/buildr/ide/eclipse.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/ide/eclipse.rb?rev=1136980&r1=1136979&r2=1136980&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/ide/eclipse.rb (original)
+++ buildr/trunk/lib/buildr/ide/eclipse.rb Fri Jun 17 19:04:40 2011
@@ -389,9 +389,15 @@ module Buildr
msg = [:to_path, :to_str, :to_s].find { |msg| path.respond_to? msg }
path = path.__send__(msg)
begin
- Util.relative_path(File.expand_path(path), @project.path_to)
+ relative = Util.relative_path(File.expand_path(path), @project.path_to)
+ if relative['..']
+ # paths don't share same root
+ Util.normalize_path(path)
+ else
+ relative
+ end
rescue ArgumentError
- File.expand_path(path)
+ Util.normalize_path(path)
end
end