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 2011/03/08 10:35:17 UTC
svn commit: r1079306 - in /buildr/trunk: CHANGELOG lib/buildr/ide/idea.rb
spec/ide/idea_spec.rb
Author: donaldp
Date: Tue Mar 8 09:35:17 2011
New Revision: 1079306
URL: http://svn.apache.org/viewvc?rev=1079306&view=rev
Log:
BUILDR-571 - Stop including the resources multiple times when depending on a project.
The idea:generate task includes references to another module's resources in additional to a dependency on the module.
Since resource paths are source paths in IDEA, this additional inclusion leads to those items being on the classpath multiple times.
Submitted By: Peter Royal
Modified:
buildr/trunk/CHANGELOG
buildr/trunk/lib/buildr/ide/idea.rb
buildr/trunk/spec/ide/idea_spec.rb
Modified: buildr/trunk/CHANGELOG
URL: http://svn.apache.org/viewvc/buildr/trunk/CHANGELOG?rev=1079306&r1=1079305&r2=1079306&view=diff
==============================================================================
--- buildr/trunk/CHANGELOG (original)
+++ buildr/trunk/CHANGELOG Tue Mar 8 09:35:17 2011
@@ -1,4 +1,5 @@
1.4.6 (Pending)
+* Fixed: BUILDR-571 Generated IDEA projects include resources multiple times
1.4.5 (2011-02-20)
* Added: BUILDR-555 Add support for the jaxb binding compiler (Mark Petrovic)
Modified: buildr/trunk/lib/buildr/ide/idea.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/ide/idea.rb?rev=1079306&r1=1079305&r2=1079306&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/ide/idea.rb (original)
+++ buildr/trunk/lib/buildr/ide/idea.rb Tue Mar 8 09:35:17 2011
@@ -249,7 +249,7 @@ module Buildr
# Note: Use the test classpath since IDEA compiles both "main" and "test" classes using the same classpath
self.test_dependency_details.each do |dependency_path, export, source_path|
project_for_dependency = Buildr.projects.detect do |project|
- [project.packages, project.compile.target, project.test.compile.target].flatten.
+ [project.packages, project.compile.target, project.resources.target, project.test.compile.target, project.test.resources.target].flatten.
detect { |proj_art| proj_art.to_s == dependency_path }
end
if project_for_dependency
Modified: buildr/trunk/spec/ide/idea_spec.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/spec/ide/idea_spec.rb?rev=1079306&r1=1079305&r2=1079306&view=diff
==============================================================================
--- buildr/trunk/spec/ide/idea_spec.rb (original)
+++ buildr/trunk/spec/ide/idea_spec.rb Tue Mar 8 09:35:17 2011
@@ -559,9 +559,9 @@ describe Buildr::IntellijIdea do
@bar_lib_urls.grep(%r{foo/target/classes}).should == []
end
- it "depends on the the other project's target/resources directory" do
- @bar_lib_urls.grep(%r{file://\$MODULE_DIR\$/../foo/target/resources}).size.should == 1
- end
+ it "does not depend on the the other project's target/resources directory" do
+ @bar_lib_urls.grep(%r{file://\$MODULE_DIR\$/../foo/target/resources}).size.should == 0
+ end
end
describe "with a single project definition" do