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 2015/09/20 08:30:15 UTC
[3/6] buildr git commit: Correct the derivation of the main
dependencies in iml
Correct the derivation of the main dependencies in iml
Project: http://git-wip-us.apache.org/repos/asf/buildr/repo
Commit: http://git-wip-us.apache.org/repos/asf/buildr/commit/6ed1b362
Tree: http://git-wip-us.apache.org/repos/asf/buildr/tree/6ed1b362
Diff: http://git-wip-us.apache.org/repos/asf/buildr/diff/6ed1b362
Branch: refs/heads/master
Commit: 6ed1b362677e6034b6e06d1100d6a514a560be2f
Parents: 31566fd
Author: Peter Donald <pe...@realityforge.org>
Authored: Sun Sep 20 16:22:01 2015 +1000
Committer: Peter Donald <pe...@realityforge.org>
Committed: Sun Sep 20 16:22:01 2015 +1000
----------------------------------------------------------------------
lib/buildr/ide/idea.rb | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/buildr/blob/6ed1b362/lib/buildr/ide/idea.rb
----------------------------------------------------------------------
diff --git a/lib/buildr/ide/idea.rb b/lib/buildr/ide/idea.rb
index 8ddd5d5..7b5489e 100644
--- a/lib/buildr/ide/idea.rb
+++ b/lib/buildr/ide/idea.rb
@@ -469,6 +469,21 @@ module Buildr #:nodoc:
p
end
+ def main_dependency_details
+ target_dir = buildr_project.compile.target.to_s
+ main_dependencies.select { |d| d.to_s != target_dir }.collect do |d|
+ dependency_path = d.to_s
+ export = true
+ source_path = nil
+ if d.respond_to?(:to_spec_hash)
+ source_spec = d.to_spec_hash.merge(:classifier => 'sources')
+ source_path = Buildr.artifact(source_spec).to_s
+ source_path = nil unless File.exist?(source_path)
+ end
+ [dependency_path, export, source_path]
+ end
+ end
+
def test_dependency_details
main_dependencies_paths = main_dependencies.map(&:to_s)
target_dir = buildr_project.compile.target.to_s
@@ -514,7 +529,7 @@ module Buildr #:nodoc:
project_dependencies = []
- self.test_dependency_details.each do |dependency_path, export, source_path|
+ self.main_dependency_details.each do |dependency_path, export, source_path|
next unless export
generate_lib(xml, dependency_path, export, source_path, project_dependencies)
end