buildr-iidea 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG +4 -0
- data/Rakefile +9 -1
- data/lib/buildr/intellij_idea/idea_module.rb +14 -3
- data/lib/buildr/intellij_idea/version.rb +1 -1
- data/spec/buildr/intellij_idea/idea_file_generation_spec.rb +49 -0
- data/spec/buildr_dir +1 -0
- metadata +60 -56
data/CHANGELOG
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
0.0.8 (Pending)
|
2
|
+
|
1
3
|
0.0.7 (July 7, 2010)
|
2
4
|
* Fixed: Regression involving source and exclude paths for nested projects.
|
3
5
|
|
@@ -16,6 +18,8 @@
|
|
16
18
|
* Fixed: A project which is tagged with no_iml may have a child with an IML.
|
17
19
|
* Changed: Directories that are outside content dir are no longer excluded in the content
|
18
20
|
section.
|
21
|
+
* Added: Automatic inclusion of source for IML dependencies if already
|
22
|
+
downloaded.
|
19
23
|
|
20
24
|
0.0.4 (May 29, 2010)
|
21
25
|
* Added: Ability to disable ipr generation using project.no_ipr
|
data/Rakefile
CHANGED
@@ -2,6 +2,7 @@ require 'rake'
|
|
2
2
|
require 'rake/rdoctask'
|
3
3
|
require 'rake/gempackagetask'
|
4
4
|
require 'spec/rake/spectask'
|
5
|
+
require File.expand_path("../lib/buildr/intellij_idea/version", __FILE__)
|
5
6
|
|
6
7
|
gem_spec = Gem::Specification.load(File.expand_path('buildr-iidea.gemspec', File.dirname(__FILE__)))
|
7
8
|
|
@@ -21,4 +22,11 @@ Rake::RDocTask.new :rdoc do |rdoc|
|
|
21
22
|
rdoc.rdoc_files.include gem_spec.extra_rdoc_files
|
22
23
|
end
|
23
24
|
|
24
|
-
Rake::GemPackageTask.new(gem_spec).define
|
25
|
+
Rake::GemPackageTask.new(gem_spec).define
|
26
|
+
|
27
|
+
namespace :deploy do
|
28
|
+
task :tag do
|
29
|
+
system("git tag -a #{Buildr::IntellijIdea::Version::STRING} -m 'Released #{Buildr::IntellijIdea::Version::STRING}'")
|
30
|
+
info "Tagged locally. Push if you're sure."
|
31
|
+
end
|
32
|
+
end
|
@@ -131,19 +131,22 @@ module Buildr
|
|
131
131
|
generate_compile_output(xml)
|
132
132
|
generate_content(xml) unless skip_content?
|
133
133
|
generate_initial_order_entries(xml)
|
134
|
+
project_dependencies = []
|
134
135
|
|
135
136
|
# Note: Use the test classpath since IDEA compiles both "main" and "test" classes using the same classpath
|
136
137
|
self.test_dependencies.each do |dependency_path, export, source_path|
|
137
138
|
project_for_dependency = Buildr.projects.detect do |project|
|
138
|
-
project.packages.
|
139
|
+
[project.packages, project.compile.target, project.test.compile.target].flatten.
|
140
|
+
detect { |proj_art| proj_art.to_s == dependency_path }
|
139
141
|
end
|
140
142
|
if project_for_dependency
|
141
|
-
if project_for_dependency.iml?
|
143
|
+
if project_for_dependency.iml? && !project_dependencies.include?(project_for_dependency)
|
142
144
|
generate_project_dependency( xml, project_for_dependency.iml.name, export )
|
143
145
|
end
|
146
|
+
project_dependencies << project_for_dependency
|
144
147
|
next
|
145
148
|
else
|
146
|
-
generate_module_lib(xml,
|
149
|
+
generate_module_lib(xml, url_for_path(dependency_path), export, (source_path ? url_for_path(source_path) : nil))
|
147
150
|
end
|
148
151
|
end
|
149
152
|
|
@@ -163,6 +166,14 @@ module Buildr
|
|
163
166
|
"file://#{resolve_path(path)}"
|
164
167
|
end
|
165
168
|
|
169
|
+
def url_for_path(path)
|
170
|
+
if path =~ /jar$/i
|
171
|
+
jar_path(path)
|
172
|
+
else
|
173
|
+
file_path(path)
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
166
177
|
def resolve_path(path)
|
167
178
|
m2repo = Buildr::Repositories.instance.local
|
168
179
|
if path.to_s.index(m2repo) == 0 && !self.local_repository_env_override.nil?
|
@@ -191,4 +191,53 @@ describe "iidea:generate" do
|
|
191
191
|
end
|
192
192
|
end
|
193
193
|
end
|
194
|
+
|
195
|
+
describe "with extensive intermodule dependencies" do
|
196
|
+
before do
|
197
|
+
mkdir_p 'foo/src/main/resources'
|
198
|
+
mkdir_p 'foo/src/main/java/foo'
|
199
|
+
touch 'foo/src/main/java/foo/Foo.java' # needed so that buildr will treat as a java project
|
200
|
+
define "root" do
|
201
|
+
repositories.remote << 'http://mirrors.ibiblio.org/pub/mirrors/maven2/'
|
202
|
+
project.version = "2.5.2"
|
203
|
+
define 'foo' do
|
204
|
+
resources.from _(:source, :main, :resources)
|
205
|
+
compile.with 'org.slf4j:slf4j-api:jar:1.5.11'
|
206
|
+
test.using(:junit)
|
207
|
+
package(:jar)
|
208
|
+
end
|
209
|
+
|
210
|
+
define 'bar' do
|
211
|
+
# internally transitive dependencies on foo, both runtime and test
|
212
|
+
compile.with project('root:foo'), project('root:foo').compile.dependencies
|
213
|
+
test.using(:junit).with [project('root:foo').test.compile.target,
|
214
|
+
project('root:foo').test.resources.target,
|
215
|
+
project('root:foo').test.compile.dependencies].compact
|
216
|
+
package(:jar)
|
217
|
+
end
|
218
|
+
end
|
219
|
+
|
220
|
+
invoke_generate_task
|
221
|
+
@bar_iml = xml_document(project('root:bar')._('bar.iml'))
|
222
|
+
@bar_lib_urls = @bar_iml.get_elements("//orderEntry[@type='module-library']/library/CLASSES/root").collect do |root|
|
223
|
+
root.attribute('url').to_s
|
224
|
+
end
|
225
|
+
end
|
226
|
+
|
227
|
+
it "depends on the associated module exactly once" do
|
228
|
+
@bar_iml.should have_nodes("//orderEntry[@type='module', @module-name='foo']", 1)
|
229
|
+
end
|
230
|
+
|
231
|
+
it "does not depend on the other project's packaged JAR" do
|
232
|
+
@bar_lib_urls.grep(%r{#{project('root:foo').packages.first}}).should == []
|
233
|
+
end
|
234
|
+
|
235
|
+
it "does not depend on the the other project's target/classes directory" do
|
236
|
+
@bar_lib_urls.grep(%r{foo/target/classes}).should == []
|
237
|
+
end
|
238
|
+
|
239
|
+
it "depends on the the other project's target/resources directory" do
|
240
|
+
@bar_lib_urls.grep(%r{file://\$MODULE_DIR\$/../foo/target/resources}).size.should == 1
|
241
|
+
end
|
242
|
+
end
|
194
243
|
end
|
data/spec/buildr_dir
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
/Users/rsutphin/buildr/svn/trunk
|
metadata
CHANGED
@@ -1,21 +1,22 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: buildr-iidea
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 15
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
version: 0.0.
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 8
|
10
|
+
version: 0.0.8
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
|
-
|
13
|
-
|
13
|
+
- Rhett Sutphin
|
14
|
+
- Peter Donald
|
14
15
|
autorequire:
|
15
16
|
bindir: bin
|
16
17
|
cert_chain: []
|
17
18
|
|
18
|
-
date: 2010-07-
|
19
|
+
date: 2010-07-15 00:00:00 -05:00
|
19
20
|
default_executable:
|
20
21
|
dependencies: []
|
21
22
|
|
@@ -25,74 +26,77 @@ description: |
|
|
25
26
|
settings of each project and extension specific settings.
|
26
27
|
|
27
28
|
email:
|
28
|
-
|
29
|
-
|
29
|
+
- rhett@detailedbalance.net
|
30
|
+
- peter@realityforge.org
|
30
31
|
executables: []
|
31
32
|
|
32
33
|
extensions: []
|
33
34
|
|
34
35
|
extra_rdoc_files:
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
36
|
+
- README.rdoc
|
37
|
+
- LICENSE
|
38
|
+
- NOTICE
|
39
|
+
- CHANGELOG
|
39
40
|
files:
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
41
|
+
- lib/buildr/intellij_idea/idea_file.rb
|
42
|
+
- lib/buildr/intellij_idea/idea_module.rb
|
43
|
+
- lib/buildr/intellij_idea/idea_project.rb
|
44
|
+
- lib/buildr/intellij_idea/project_extension.rb
|
45
|
+
- lib/buildr/intellij_idea/version.rb
|
46
|
+
- lib/buildr_iidea.rb
|
47
|
+
- spec/buildr/intellij_idea/clean_spec.rb
|
48
|
+
- spec/buildr/intellij_idea/dependency_spec.rb
|
49
|
+
- spec/buildr/intellij_idea/extra_modules_spec.rb
|
50
|
+
- spec/buildr/intellij_idea/facet_generation_spec.rb
|
51
|
+
- spec/buildr/intellij_idea/group_spec.rb
|
52
|
+
- spec/buildr/intellij_idea/idea_file_generation_spec.rb
|
53
|
+
- spec/buildr/intellij_idea/inform_spec.rb
|
54
|
+
- spec/buildr/intellij_idea/initial_components_spec.rb
|
55
|
+
- spec/buildr/intellij_idea/module_content_generation_spec.rb
|
56
|
+
- spec/buildr/intellij_idea/module_defaults.rb
|
57
|
+
- spec/buildr/intellij_idea/module_property_inheritance_spec.rb
|
58
|
+
- spec/buildr/intellij_idea/project_extension_spec.rb
|
59
|
+
- spec/buildr/intellij_idea/template_spec.rb
|
60
|
+
- spec/buildr_dir
|
61
|
+
- spec/spec.opts
|
62
|
+
- spec/spec_helper.rb
|
63
|
+
- spec/xpath_matchers.rb
|
64
|
+
- buildr-iidea.gemspec
|
65
|
+
- LICENSE
|
66
|
+
- NOTICE
|
67
|
+
- README.rdoc
|
68
|
+
- CHANGELOG
|
69
|
+
- Rakefile
|
68
70
|
has_rdoc: true
|
69
71
|
homepage: http://github.com/realityforge/buildr-iidea
|
70
72
|
licenses: []
|
71
73
|
|
72
74
|
post_install_message: Thanks for installing the Intellij IDEA extension for Buildr
|
73
75
|
rdoc_options:
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
76
|
+
- --title
|
77
|
+
- buildr-iidea 0.0.8
|
78
|
+
- --main
|
79
|
+
- README.rdoc
|
78
80
|
require_paths:
|
79
|
-
|
81
|
+
- lib
|
80
82
|
required_ruby_version: !ruby/object:Gem::Requirement
|
81
83
|
none: false
|
82
84
|
requirements:
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
85
|
+
- - ">="
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
hash: 3
|
88
|
+
segments:
|
89
|
+
- 0
|
90
|
+
version: "0"
|
88
91
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
89
92
|
none: false
|
90
93
|
requirements:
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
hash: 3
|
97
|
+
segments:
|
98
|
+
- 0
|
99
|
+
version: "0"
|
96
100
|
requirements: []
|
97
101
|
|
98
102
|
rubyforge_project:
|