maven-tools 0.34.5 → 1.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +7 -0
  2. data/lib/maven/tools/artifact.rb +18 -12
  3. data/lib/maven/tools/dsl.rb +282 -121
  4. data/lib/maven/tools/gemfile_lock.rb +0 -6
  5. data/lib/maven/tools/model.rb +78 -69
  6. data/lib/maven/tools/pom.rb +8 -8
  7. data/lib/maven/tools/version.rb +1 -1
  8. data/lib/maven/tools/versions.rb +4 -4
  9. data/lib/maven/tools/visitor.rb +2 -2
  10. data/spec/gemfile_with_lock/bouncy-castle-version.rb +4 -0
  11. data/spec/pom_maven_alternative_style/pom.rb +116 -169
  12. data/spec/pom_maven_hash_style/pom.rb +134 -100
  13. data/spec/pom_maven_style/pom.rb +160 -163
  14. data/spec/pom_spec.rb +3 -1
  15. metadata +12 -90
  16. data/lib/maven/model/dependencies.rb +0 -249
  17. data/lib/maven/model/model.rb +0 -618
  18. data/lib/maven/model/utils.rb +0 -393
  19. data/lib/maven/tools/execute_in_phase.rb +0 -28
  20. data/lib/maven/tools/gem_project.rb +0 -513
  21. data/lib/maven/tools/maven_project.rb +0 -72
  22. data/lib/maven/tools/minimal_project.rb +0 -84
  23. data/lib/maven/tools/pom_generator.rb +0 -83
  24. data/lib/maven/tools/rails_project.rb +0 -133
  25. data/rspec/maven/model/dependencies_spec.rb +0 -260
  26. data/rspec/maven/model/model_spec.rb +0 -714
  27. data/rspec/maven/tools/Gemfile.gems +0 -11
  28. data/rspec/maven/tools/Gemfile.groups +0 -15
  29. data/rspec/maven/tools/Gemfile.ignored +0 -30
  30. data/rspec/maven/tools/Gemfile.lockfile +0 -8
  31. data/rspec/maven/tools/Gemfile.lockfile.lock +0 -53
  32. data/rspec/maven/tools/Gemfile.minimal +0 -1
  33. data/rspec/maven/tools/Gemfile.nolock +0 -1
  34. data/rspec/maven/tools/Gemfile.rails +0 -16
  35. data/rspec/maven/tools/Gemfile.simple +0 -7
  36. data/rspec/maven/tools/Gemfile.withlock +0 -1
  37. data/rspec/maven/tools/Gemfile.withlock.lock +0 -28
  38. data/rspec/maven/tools/Jarfile.with +0 -2
  39. data/rspec/maven/tools/Jarfile.with.lock +0 -1
  40. data/rspec/maven/tools/Jarfile.without +0 -2
  41. data/rspec/maven/tools/deps.gemspec +0 -8
  42. data/rspec/maven/tools/gem_project_spec.rb +0 -1126
  43. data/rspec/maven/tools/maven-tools.gemspec +0 -17
  44. data/rspec/maven/tools/minimal.gemspec +0 -5
  45. data/rspec/maven/tools/no-deps.gemspec +0 -27
  46. data/rspec/maven/tools/rails_project_spec.rb +0 -284
  47. data/rspec/maven/tools/spec_helper.rb +0 -22
@@ -1,11 +0,0 @@
1
- gem 'rspec', :platforms => :mri
2
- gem 'dm-core', :platforms => :ruby
3
- gem 'ixtlan-core', :platforms => :jruby
4
- gem 'ixtlan-error-handler', :platforms => :mswin
5
- gem 'facest', :path => "../facets"
6
- gem 'rails', :git =>"git://github.com/rails/rails.git" , :platforms => :jruby, :group => :integration
7
-
8
- gem 'dm-sqlite3-adapter', '~> 0.10.0', :group => :test
9
- gem 'dm-mysql-adapter', ['~> 0.10.0', '< 0.10.3'], :group => [:development, :production]
10
- gem 'dm-oracle-adapter', ['~> 0.10.0'], :group => :test, :platforms => :mswin
11
- gem 'dm-hsqldb-adapter', '= 0.10.0', :group => :development, :platforms => [:ruby, :jruby]
@@ -1,15 +0,0 @@
1
- group :test, :production do
2
- gem 'rspec', :platforms => :mri
3
- gem 'dm-core', :platforms => :ruby
4
- gem 'ixtlan-core', :platforms => :jruby
5
- gem 'ixtlan-error-handler', :platforms => :mswin
6
- end
7
-
8
- group :development do
9
- gem 'dm-sqlite-adapter', '~> 1.0.0'
10
- end
11
-
12
- group :production do
13
- gem 'dm-mysql-adapter', ['~> 1.0.0', '< 1.0.3']
14
- gem 'dm-postgres-adapter', ['<= 1.0.0']
15
- end
@@ -1,30 +0,0 @@
1
- source :rubygems
2
- source 'http://rubygems.org/gems'
3
-
4
- path "../projects"
5
-
6
- platforms :mri do
7
- gem 'rspec'
8
- end
9
-
10
- platforms :ruby do
11
- gem 'dm-core'
12
- end
13
-
14
- platforms :jruby do
15
- gem 'ixtlan-core'
16
- end
17
-
18
- platforms :mswin do
19
- gem 'ixtlan-error-handler'
20
- end
21
-
22
- git "git://github.com/rails/rails.git" do
23
- gem "activesupport"
24
- gem "actionpack"
25
- end
26
-
27
- path "../projects" do
28
- gem "wirble"
29
- gem "faker"
30
- end
@@ -1,8 +0,0 @@
1
- gem 'ixtlan-core'
2
- gem 'dm-sqlite-adapter', '~> 1.0.0'
3
-
4
-
5
- group :production do
6
- gem 'dm-mysql-adapter', ['~> 1.0.0', '< 1.0.3']
7
- gem 'dm-postgres-adapter', ['<= 1.0.0']
8
- end
@@ -1,53 +0,0 @@
1
- GEM
2
- specs:
3
- addressable (2.2.4)
4
- data_objects (0.10.3)
5
- addressable (~> 2.1)
6
- dm-core (1.0.2)
7
- addressable (~> 2.2)
8
- extlib (~> 0.9.15)
9
- dm-do-adapter (1.0.2)
10
- data_objects (~> 0.10.2)
11
- dm-core (~> 1.0.2)
12
- dm-mysql-adapter (1.0.2)
13
- dm-do-adapter (~> 1.0.2)
14
- do_mysql (~> 0.10.2)
15
- dm-postgres-adapter (1.0.0)
16
- dm-do-adapter (~> 1.0.0)
17
- do_postgres (~> 0.10.2)
18
- dm-sqlite-adapter (1.0.2)
19
- dm-do-adapter (~> 1.0.2)
20
- do_sqlite3 (~> 0.10.2)
21
- do_jdbc (0.10.3-java)
22
- data_objects (= 0.10.3)
23
- do_mysql (0.10.3-java)
24
- data_objects (= 0.10.3)
25
- do_jdbc (= 0.10.3)
26
- jdbc-mysql (>= 5.0.4)
27
- do_postgres (0.10.3-java)
28
- data_objects (= 0.10.3)
29
- do_jdbc (= 0.10.3)
30
- jdbc-postgres (>= 8.2)
31
- do_sqlite3 (0.10.3-java)
32
- data_objects (= 0.10.3)
33
- do_jdbc (= 0.10.3)
34
- jdbc-sqlite3 (>= 3.5.8)
35
- extlib (0.9.15)
36
- ixtlan-core (0.1.1)
37
- slf4r (= 0.4.2)
38
- jdbc-mysql (5.0.4)
39
- jdbc-postgres (8.4.702-java)
40
- jdbc-sqlite3 (3.6.14.2.056-java)
41
- slf4r (0.4.2)
42
-
43
- PLATFORMS
44
- java
45
-
46
- DEPENDENCIES
47
- dm-core
48
- dm-mysql-adapter (~> 1.0.0, < 1.0.3)
49
- dm-postgres-adapter (<= 1.0.0)
50
- dm-sqlite-adapter (~> 1.0.0)
51
- ixtlan-core
52
- ixtlan-error-handler
53
- rspec
@@ -1 +0,0 @@
1
- gemspec "minimal.gemspec"
@@ -1 +0,0 @@
1
- gemspec "maven-tools.gemspec"
@@ -1,16 +0,0 @@
1
- source 'http://rubygems.org'
2
-
3
- gem 'rails', '3.0.1'
4
-
5
- gem 'sqlite3', :group => :development unless defined?(JRUBY_VERSION)
6
- gem "activerecord-jdbc-adapter" if defined?(JRUBY_VERSION)
7
- gem "jdbc-sqlite3", :group => :development , :require => false if defined?(JRUBY_VERSION)
8
-
9
- group :development, :test do
10
- gem 'rspec'
11
- end
12
-
13
- group :production do
14
- gem 'mysql' unless defined?(JRUBY_VERSION)
15
- gem "jdbc-mysql", :require => false if defined?(JRUBY_VERSION)
16
- end
@@ -1,7 +0,0 @@
1
- source 'http://rubygems.org'
2
-
3
- gem 'rails', '3.0.1'
4
-
5
- gem 'sqlite3' unless defined?(JRUBY_VERSION)
6
- gem "activerecord-jdbc-adapter" if defined?(JRUBY_VERSION)
7
- gem "jdbc-sqlite3", :require => false if defined?(JRUBY_VERSION)
@@ -1 +0,0 @@
1
- gemspec "maven-tools.gemspec"
@@ -1,28 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- maven-tools (0.32.0)
5
-
6
- GEM
7
- remote: http://rubygems.org/
8
- specs:
9
- diff-lcs (1.1.3)
10
- minitest (4.4.0)
11
- rake (10.0.3)
12
- rspec (2.7.0)
13
- rspec-core (~> 2.7.0)
14
- rspec-expectations (~> 2.7.0)
15
- rspec-mocks (~> 2.7.0)
16
- rspec-core (2.7.1)
17
- rspec-expectations (2.7.0)
18
- diff-lcs (~> 1.1.2)
19
- rspec-mocks (2.7.0)
20
-
21
- PLATFORMS
22
- java
23
-
24
- DEPENDENCIES
25
- maven-tools!
26
- minitest (~> 4.4)
27
- rake (~> 10.0.3)
28
- rspec (= 2.7)
@@ -1,2 +0,0 @@
1
- jar 'org.slf4j:slf4j-simple', '>= 1.5.6'
2
- pom 'org.slf4j:slf4j-default'
@@ -1 +0,0 @@
1
- org.slf4j:slf4j-simple:jar:1.5.6
@@ -1,2 +0,0 @@
1
- jar 'org.slf4j:slf4j-simple', '>= 1.5.6'
2
- pom 'org.slf4j:slf4j-default'
@@ -1,8 +0,0 @@
1
- #-*- mode: ruby -*-
2
- Gem::Specification.new do |s|
3
- s.name = 'deps'
4
- s.version = '1.0.0'
5
- s.add_dependency 'slf4r', '>0.4.0'
6
- s.add_development_dependency 'rspec', '~>2.4.0'
7
- s.add_development_dependency 'cucumber', ['>= 0.10.0', "< 0.11.1"]
8
- end
@@ -1,1126 +0,0 @@
1
- require File.expand_path(File.join(File.dirname(__FILE__), 'spec_helper.rb'))
2
- require 'maven/tools/gem_project'
3
-
4
- describe Maven::Tools::GemProject do
5
-
6
- before :each do
7
- @project = Maven::Tools::GemProject.new("test")
8
- end
9
-
10
- it 'should setup an empty gem project' do
11
- @project.to_xml.should == <<-XML
12
- <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
13
- <modelVersion>4.0.0</modelVersion>
14
- <groupId>rubygems</groupId>
15
- <artifactId>test</artifactId>
16
- <version>0.0.0</version>
17
- <packaging>gem</packaging>
18
- </project>
19
- XML
20
- end
21
-
22
- describe "Jarfile" do
23
-
24
- it 'should load Jarfile without lockfile' do
25
- @project.load_jarfile(File.join(File.dirname(__FILE__), 'Jarfile.without'))
26
- @project.to_xml.should == <<-XML
27
- <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
28
- <modelVersion>4.0.0</modelVersion>
29
- <groupId>rubygems</groupId>
30
- <artifactId>test</artifactId>
31
- <version>0.0.0</version>
32
- <packaging>gem</packaging>
33
- <dependencies>
34
- <dependency>
35
- <groupId>org.slf4j</groupId>
36
- <artifactId>slf4j-simple</artifactId>
37
- <version>[1.5.6,)</version>
38
- <type>jar</type>
39
- </dependency>
40
- <dependency>
41
- <groupId>org.slf4j</groupId>
42
- <artifactId>slf4j-default</artifactId>
43
- <type>pom</type>
44
- </dependency>
45
- </dependencies>
46
- </project>
47
- XML
48
- end
49
-
50
- it 'should load Jarfile with lockfile' do
51
- @project.load_jarfile(File.join(File.dirname(__FILE__), 'Jarfile.with'))
52
- @project.to_xml.should == <<-XML
53
- <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
54
- <modelVersion>4.0.0</modelVersion>
55
- <groupId>rubygems</groupId>
56
- <artifactId>test</artifactId>
57
- <version>0.0.0</version>
58
- <packaging>gem</packaging>
59
- <dependencies>
60
- <dependency>
61
- <groupId>org.slf4j</groupId>
62
- <artifactId>slf4j-simple</artifactId>
63
- <version>1.5.6</version>
64
- <type>jar</type>
65
- </dependency>
66
- </dependencies>
67
- </project>
68
- XML
69
- end
70
- end
71
-
72
- describe "Gemfile" do
73
-
74
- it 'should load Gemfile with minimal gemspec' do
75
- @project.load_gemfile(File.join(File.dirname(__FILE__), 'Gemfile.minimal'))
76
- @project.to_xml.should == <<-XML
77
- <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
78
- <modelVersion>4.0.0</modelVersion>
79
- <groupId>rubygems</groupId>
80
- <artifactId>minimal</artifactId>
81
- <version>1.0.0</version>
82
- <name><![CDATA[minimal - gem]]></name>
83
- <packaging>gem</packaging>
84
- <build>
85
- <plugins>
86
- <plugin>
87
- <groupId>de.saumya.mojo</groupId>
88
- <artifactId>gem-maven-plugin</artifactId>
89
- <configuration>
90
- <gemspec>rspec/maven/tools/minimal.gemspec</gemspec>
91
- </configuration>
92
- </plugin>
93
- <plugin>
94
- <groupId>de.saumya.mojo</groupId>
95
- <artifactId>bundler-maven-plugin</artifactId>
96
- </plugin>
97
- </plugins>
98
- </build>
99
- </project>
100
- XML
101
- end
102
-
103
- it 'should load Gemfile with gemspec but no Gemfile.lock' do
104
- @project.load_gemfile(File.join(File.dirname(__FILE__), 'Gemfile.nolock'))
105
- @project.to_xml.should == <<-XML
106
- <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
107
- <modelVersion>4.0.0</modelVersion>
108
- <groupId>rubygems</groupId>
109
- <artifactId>maven-tools</artifactId>
110
- <version>0.32.0</version>
111
- <name><![CDATA[helpers for maven related tasks]]></name>
112
- <packaging>gem</packaging>
113
- <description><![CDATA[adds versions conversion from rubygems to maven and vice versa, ruby DSL for POM (Project Object Model from maven), pom generators, etc]]></description>
114
- <url>http://github.com/torquebox/maven-tools</url>
115
- <developers>
116
- <developer>
117
- <id>m_dot_kristian_at_web_dot_de</id>
118
- <name>Christian Meier</name>
119
- <email>m.kristian@web.de</email>
120
- </developer>
121
- </developers>
122
- <dependencies>
123
- <dependency>
124
- <groupId>rubygems</groupId>
125
- <artifactId>rake</artifactId>
126
- <version>[10.0.3,10.0.99999]</version>
127
- <type>gem</type>
128
- <scope>test</scope>
129
- </dependency>
130
- <dependency>
131
- <groupId>rubygems</groupId>
132
- <artifactId>minitest</artifactId>
133
- <version>[4.4,4.99999]</version>
134
- <type>gem</type>
135
- <scope>test</scope>
136
- </dependency>
137
- <dependency>
138
- <groupId>rubygems</groupId>
139
- <artifactId>rspec</artifactId>
140
- <version>[2.7,2.7.0.0.0.0.1)</version>
141
- <type>gem</type>
142
- <scope>test</scope>
143
- </dependency>
144
- </dependencies>
145
- <build>
146
- <plugins>
147
- <plugin>
148
- <groupId>de.saumya.mojo</groupId>
149
- <artifactId>gem-maven-plugin</artifactId>
150
- <configuration>
151
- <gemspec>rspec/maven/tools/maven-tools.gemspec</gemspec>
152
- </configuration>
153
- </plugin>
154
- <plugin>
155
- <groupId>de.saumya.mojo</groupId>
156
- <artifactId>bundler-maven-plugin</artifactId>
157
- </plugin>
158
- </plugins>
159
- </build>
160
- </project>
161
- XML
162
- end
163
-
164
- it 'should load Gemfile with gemspec but with Gemfile.lock' do
165
- pending "hash is differently orderd in ruby1.8" if RUBY_VERSION =~ /^1.8/ && !defined? JRUBY_VERSION
166
- @project.load_gemfile(File.join(File.dirname(__FILE__), 'Gemfile.withlock'))
167
- @project.to_xml.should == <<-XML
168
- <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
169
- <modelVersion>4.0.0</modelVersion>
170
- <groupId>rubygems</groupId>
171
- <artifactId>maven-tools</artifactId>
172
- <version>0.32.0</version>
173
- <name><![CDATA[helpers for maven related tasks]]></name>
174
- <packaging>gem</packaging>
175
- <description><![CDATA[adds versions conversion from rubygems to maven and vice versa, ruby DSL for POM (Project Object Model from maven), pom generators, etc]]></description>
176
- <url>http://github.com/torquebox/maven-tools</url>
177
- <developers>
178
- <developer>
179
- <id>m_dot_kristian_at_web_dot_de</id>
180
- <name>Christian Meier</name>
181
- <email>m.kristian@web.de</email>
182
- </developer>
183
- </developers>
184
- <dependencies>
185
- <dependency>
186
- <groupId>rubygems</groupId>
187
- <artifactId>rake</artifactId>
188
- <type>gem</type>
189
- <scope>test</scope>
190
- </dependency>
191
- <dependency>
192
- <groupId>rubygems</groupId>
193
- <artifactId>minitest</artifactId>
194
- <type>gem</type>
195
- <scope>test</scope>
196
- </dependency>
197
- <dependency>
198
- <groupId>rubygems</groupId>
199
- <artifactId>rspec</artifactId>
200
- <type>gem</type>
201
- <scope>test</scope>
202
- </dependency>
203
- <dependency>
204
- <groupId>rubygems</groupId>
205
- <artifactId>rspec-core</artifactId>
206
- <type>gem</type>
207
- <scope>test</scope>
208
- </dependency>
209
- <dependency>
210
- <groupId>rubygems</groupId>
211
- <artifactId>rspec-expectations</artifactId>
212
- <type>gem</type>
213
- <scope>test</scope>
214
- </dependency>
215
- <dependency>
216
- <groupId>rubygems</groupId>
217
- <artifactId>diff-lcs</artifactId>
218
- <type>gem</type>
219
- <scope>test</scope>
220
- </dependency>
221
- <dependency>
222
- <groupId>rubygems</groupId>
223
- <artifactId>rspec-mocks</artifactId>
224
- <type>gem</type>
225
- <scope>test</scope>
226
- </dependency>
227
- </dependencies>
228
- <dependencyManagement>
229
- <dependencies>
230
- <dependency>
231
- <groupId>rubygems</groupId>
232
- <artifactId>maven-tools</artifactId>
233
- <version>0.32.0</version>
234
- <type>gem</type>
235
- </dependency>
236
- <dependency>
237
- <groupId>rubygems</groupId>
238
- <artifactId>diff-lcs</artifactId>
239
- <version>1.1.3</version>
240
- <type>gem</type>
241
- </dependency>
242
- <dependency>
243
- <groupId>rubygems</groupId>
244
- <artifactId>minitest</artifactId>
245
- <version>4.4.0</version>
246
- <type>gem</type>
247
- </dependency>
248
- <dependency>
249
- <groupId>rubygems</groupId>
250
- <artifactId>rake</artifactId>
251
- <version>10.0.3</version>
252
- <type>gem</type>
253
- </dependency>
254
- <dependency>
255
- <groupId>rubygems</groupId>
256
- <artifactId>rspec</artifactId>
257
- <version>2.7.0</version>
258
- <type>gem</type>
259
- </dependency>
260
- <dependency>
261
- <groupId>rubygems</groupId>
262
- <artifactId>rspec-core</artifactId>
263
- <version>2.7.1</version>
264
- <type>gem</type>
265
- </dependency>
266
- <dependency>
267
- <groupId>rubygems</groupId>
268
- <artifactId>rspec-expectations</artifactId>
269
- <version>2.7.0</version>
270
- <type>gem</type>
271
- </dependency>
272
- <dependency>
273
- <groupId>rubygems</groupId>
274
- <artifactId>rspec-mocks</artifactId>
275
- <version>2.7.0</version>
276
- <type>gem</type>
277
- </dependency>
278
- </dependencies>
279
- </dependencyManagement>
280
- <build>
281
- <plugins>
282
- <plugin>
283
- <groupId>de.saumya.mojo</groupId>
284
- <artifactId>gem-maven-plugin</artifactId>
285
- <configuration>
286
- <gemspec>rspec/maven/tools/maven-tools.gemspec</gemspec>
287
- </configuration>
288
- </plugin>
289
- <plugin>
290
- <groupId>de.saumya.mojo</groupId>
291
- <artifactId>bundler-maven-plugin</artifactId>
292
- </plugin>
293
- </plugins>
294
- </build>
295
- </project>
296
- XML
297
- end
298
-
299
- it 'should load Gemfile with "source", "path" and "platform"' do
300
- @project.load_gemfile(File.join(File.dirname(__FILE__), 'Gemfile.ignored'))
301
- @project.to_xml.should == <<-XML
302
- <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
303
- <modelVersion>4.0.0</modelVersion>
304
- <groupId>rubygems</groupId>
305
- <artifactId>test</artifactId>
306
- <version>0.0.0</version>
307
- <packaging>gem</packaging>
308
- <dependencies>
309
- <dependency>
310
- <groupId>rubygems</groupId>
311
- <artifactId>ixtlan-core</artifactId>
312
- <version>[0,)</version>
313
- <type>gem</type>
314
- </dependency>
315
- </dependencies>
316
- <build>
317
- <plugins>
318
- <plugin>
319
- <groupId>de.saumya.mojo</groupId>
320
- <artifactId>bundler-maven-plugin</artifactId>
321
- </plugin>
322
- </plugins>
323
- </build>
324
- </project>
325
- XML
326
- end
327
-
328
- it 'should load Gemfile with simple gems"' do
329
- @project.load_gemfile(File.join(File.dirname(__FILE__), 'Gemfile.gems'))
330
- @project.to_xml.should == <<-XML
331
- <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
332
- <modelVersion>4.0.0</modelVersion>
333
- <groupId>rubygems</groupId>
334
- <artifactId>test</artifactId>
335
- <version>0.0.0</version>
336
- <packaging>gem</packaging>
337
- <dependencies>
338
- <dependency>
339
- <groupId>rubygems</groupId>
340
- <artifactId>ixtlan-core</artifactId>
341
- <version>[0,)</version>
342
- <type>gem</type>
343
- </dependency>
344
- </dependencies>
345
- <build>
346
- <plugins>
347
- <plugin>
348
- <groupId>de.saumya.mojo</groupId>
349
- <artifactId>bundler-maven-plugin</artifactId>
350
- </plugin>
351
- </plugins>
352
- </build>
353
- <profiles>
354
- <profile>
355
- <id>test</id>
356
- <dependencies>
357
- <dependency>
358
- <groupId>rubygems</groupId>
359
- <artifactId>dm-sqlite3-adapter</artifactId>
360
- <version>[0.10.0,0.10.99999]</version>
361
- <type>gem</type>
362
- </dependency>
363
- </dependencies>
364
- </profile>
365
- <profile>
366
- <id>development</id>
367
- <dependencies>
368
- <dependency>
369
- <groupId>rubygems</groupId>
370
- <artifactId>dm-mysql-adapter</artifactId>
371
- <version>[0.10.0,0.10.3)</version>
372
- <type>gem</type>
373
- </dependency>
374
- <dependency>
375
- <groupId>rubygems</groupId>
376
- <artifactId>dm-hsqldb-adapter</artifactId>
377
- <version>[0.10.0,0.10.0.0.0.0.0.1)</version>
378
- <type>gem</type>
379
- </dependency>
380
- </dependencies>
381
- </profile>
382
- <profile>
383
- <id>production</id>
384
- <dependencies>
385
- <dependency>
386
- <groupId>rubygems</groupId>
387
- <artifactId>dm-mysql-adapter</artifactId>
388
- <version>[0.10.0,0.10.3)</version>
389
- <type>gem</type>
390
- </dependency>
391
- </dependencies>
392
- </profile>
393
- </profiles>
394
- </project>
395
- XML
396
- end
397
-
398
- it 'should load Gemfile with grouped gems and added defaults"' do
399
- @project.load_gemfile(File.join(File.dirname(__FILE__), 'Gemfile.groups'))
400
- @project.name "test"
401
- @project.add_defaults
402
- @project.to_xml.should == <<-XML
403
- <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
404
- <modelVersion>4.0.0</modelVersion>
405
- <groupId>rubygems</groupId>
406
- <artifactId>test</artifactId>
407
- <version>0.0.0</version>
408
- <name><![CDATA[test]]></name>
409
- <packaging>gem</packaging>
410
- <repositories>
411
- <repository>
412
- <id>rubygems-releases</id>
413
- <url>http://rubygems-proxy.torquebox.org/releases</url>
414
- </repository>
415
- </repositories>
416
- <pluginRepositories>
417
- <pluginRepository>
418
- <id>rubygems-releases</id>
419
- <url>http://rubygems-proxy.torquebox.org/releases</url>
420
- </pluginRepository>
421
- </pluginRepositories>
422
- <dependencies>
423
- <dependency>
424
- <groupId>rubygems</groupId>
425
- <artifactId>bundler</artifactId>
426
- <type>gem</type>
427
- <scope>test</scope>
428
- </dependency>
429
- </dependencies>
430
- <dependencyManagement>
431
- <dependencies>
432
- <dependency>
433
- <groupId>rubygems</groupId>
434
- <artifactId>bundler</artifactId>
435
- <version>_bundler.version_</version>
436
- <type>gem</type>
437
- </dependency>
438
- </dependencies>
439
- </dependencyManagement>
440
- <properties>
441
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
442
- <gem.home>${project.build.directory}/rubygems</gem.home>
443
- <gem.path>${project.build.directory}/rubygems</gem.path>
444
- <jruby.plugins.version>_project.version_</jruby.plugins.version>
445
- </properties>
446
- <build>
447
- <plugins>
448
- <plugin>
449
- <groupId>de.saumya.mojo</groupId>
450
- <artifactId>bundler-maven-plugin</artifactId>
451
- <version>${jruby.plugins.version}</version>
452
- <executions>
453
- <execution>
454
- <goals>
455
- <goal>install</goal>
456
- </goals>
457
- </execution>
458
- </executions>
459
- <dependencies>
460
- <dependency>
461
- <groupId>rubygems</groupId>
462
- <artifactId>ixtlan-core</artifactId>
463
- <version>[0,)</version>
464
- <type>gem</type>
465
- </dependency>
466
- <dependency>
467
- <groupId>rubygems</groupId>
468
- <artifactId>dm-sqlite-adapter</artifactId>
469
- <version>[1.0.0,1.0.99999]</version>
470
- <type>gem</type>
471
- </dependency>
472
- <dependency>
473
- <groupId>rubygems</groupId>
474
- <artifactId>dm-mysql-adapter</artifactId>
475
- <version>[1.0.0,1.0.3)</version>
476
- <type>gem</type>
477
- </dependency>
478
- <dependency>
479
- <groupId>rubygems</groupId>
480
- <artifactId>dm-postgres-adapter</artifactId>
481
- <version>[0,1.0.0]</version>
482
- <type>gem</type>
483
- </dependency>
484
- </dependencies>
485
- </plugin>
486
- <plugin>
487
- <groupId>de.saumya.mojo</groupId>
488
- <artifactId>gem-maven-plugin</artifactId>
489
- <version>${jruby.plugins.version}</version>
490
- <extensions>true</extensions>
491
- </plugin>
492
- </plugins>
493
- <pluginManagement>
494
- <plugins>
495
- <plugin>
496
- <groupId>org.eclipse.m2e</groupId>
497
- <artifactId>lifecycle-mapping</artifactId>
498
- <version>1.0.0</version>
499
- <configuration>
500
- <lifecycleMappingMetadata>
501
- <pluginExecutions>
502
- <pluginExecution>
503
- <pluginExecutionFilter>
504
- <groupId>de.saumya.mojo</groupId>
505
- <artifactId>bundler-maven-plugin</artifactId>
506
- <versionRange>[0,)</versionRange>
507
- <goals>
508
- <goal>install</goal>
509
- </goals>
510
- </pluginExecutionFilter>
511
- <action>
512
- <ignore></ignore>
513
- </action>
514
- </pluginExecution>
515
- <pluginExecution>
516
- <pluginExecutionFilter>
517
- <groupId>de.saumya.mojo</groupId>
518
- <artifactId>gem-maven-plugin</artifactId>
519
- <versionRange>[0,)</versionRange>
520
- <goals>
521
- <goal>initialize</goal>
522
- </goals>
523
- </pluginExecutionFilter>
524
- <action>
525
- <ignore></ignore>
526
- </action>
527
- </pluginExecution>
528
- </pluginExecutions>
529
- </lifecycleMappingMetadata>
530
- </configuration>
531
- </plugin>
532
- </plugins>
533
- </pluginManagement>
534
- </build>
535
- <profiles>
536
- <profile>
537
- <id>test</id>
538
- <dependencies>
539
- <dependency>
540
- <groupId>rubygems</groupId>
541
- <artifactId>ixtlan-core</artifactId>
542
- <version>[0,)</version>
543
- <type>gem</type>
544
- </dependency>
545
- </dependencies>
546
- </profile>
547
- <profile>
548
- <id>production</id>
549
- <dependencies>
550
- <dependency>
551
- <groupId>rubygems</groupId>
552
- <artifactId>ixtlan-core</artifactId>
553
- <version>[0,)</version>
554
- <type>gem</type>
555
- </dependency>
556
- <dependency>
557
- <groupId>rubygems</groupId>
558
- <artifactId>dm-mysql-adapter</artifactId>
559
- <version>[1.0.0,1.0.3)</version>
560
- <type>gem</type>
561
- </dependency>
562
- <dependency>
563
- <groupId>rubygems</groupId>
564
- <artifactId>dm-postgres-adapter</artifactId>
565
- <version>[0,1.0.0]</version>
566
- <type>gem</type>
567
- </dependency>
568
- </dependencies>
569
- </profile>
570
- <profile>
571
- <id>development</id>
572
- <dependencies>
573
- <dependency>
574
- <groupId>rubygems</groupId>
575
- <artifactId>dm-sqlite-adapter</artifactId>
576
- <version>[1.0.0,1.0.99999]</version>
577
- <type>gem</type>
578
- </dependency>
579
- </dependencies>
580
- </profile>
581
- <profile>
582
- <id>executable</id>
583
- <dependencies>
584
- <dependency>
585
- <groupId>de.saumya.mojo</groupId>
586
- <artifactId>gem-assembly-descriptors</artifactId>
587
- <version>${jruby.plugins.version}</version>
588
- <type>jar</type>
589
- <scope>runtime</scope>
590
- </dependency>
591
- </dependencies>
592
- <build>
593
- <plugins>
594
- <plugin>
595
- <artifactId>maven-assembly-plugin</artifactId>
596
- <version>_assembly.version_</version>
597
- <configuration>
598
- <descriptorRefs>
599
- <descriptorRef>jar-with-dependencies-and-gems</descriptorRef>
600
- </descriptorRefs>
601
- <archive>
602
- <manifest>
603
- <mainClass>de.saumya.mojo.assembly.Main</mainClass>
604
- </manifest>
605
- </archive>
606
- </configuration>
607
- <executions>
608
- <execution>
609
- <id>in_phase_package</id>
610
- <phase>package</phase>
611
- <goals>
612
- <goal>assembly</goal>
613
- </goals>
614
- </execution>
615
- </executions>
616
- <dependencies>
617
- <dependency>
618
- <groupId>de.saumya.mojo</groupId>
619
- <artifactId>gem-assembly-descriptors</artifactId>
620
- <version>${jruby.plugins.version}</version>
621
- <type>jar</type>
622
- </dependency>
623
- </dependencies>
624
- </plugin>
625
- </plugins>
626
- </build>
627
- </profile>
628
- </profiles>
629
- </project>
630
- XML
631
- end
632
-
633
- it 'should load Gemfile with grouped gems and lock file"' do
634
- pending "hash is differently orderd in ruby1.8" if RUBY_VERSION =~ /^1.8/ && !defined? JRUBY_VERSION
635
- @project.load_gemfile(File.join(File.dirname(__FILE__), 'Gemfile.lockfile'))
636
- @project.name "test"
637
- @project.to_xml.should == <<-XML
638
- <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
639
- <modelVersion>4.0.0</modelVersion>
640
- <groupId>rubygems</groupId>
641
- <artifactId>test</artifactId>
642
- <version>0.0.0</version>
643
- <name><![CDATA[test]]></name>
644
- <packaging>gem</packaging>
645
- <dependencies>
646
- <dependency>
647
- <groupId>rubygems</groupId>
648
- <artifactId>ixtlan-core</artifactId>
649
- <type>gem</type>
650
- </dependency>
651
- <dependency>
652
- <groupId>rubygems</groupId>
653
- <artifactId>slf4r</artifactId>
654
- <type>gem</type>
655
- </dependency>
656
- <dependency>
657
- <groupId>rubygems</groupId>
658
- <artifactId>dm-sqlite-adapter</artifactId>
659
- <type>gem</type>
660
- </dependency>
661
- <dependency>
662
- <groupId>rubygems</groupId>
663
- <artifactId>dm-do-adapter</artifactId>
664
- <type>gem</type>
665
- </dependency>
666
- <dependency>
667
- <groupId>rubygems</groupId>
668
- <artifactId>data_objects</artifactId>
669
- <type>gem</type>
670
- </dependency>
671
- <dependency>
672
- <groupId>rubygems</groupId>
673
- <artifactId>addressable</artifactId>
674
- <type>gem</type>
675
- </dependency>
676
- <dependency>
677
- <groupId>rubygems</groupId>
678
- <artifactId>dm-core</artifactId>
679
- <type>gem</type>
680
- </dependency>
681
- <dependency>
682
- <groupId>rubygems</groupId>
683
- <artifactId>extlib</artifactId>
684
- <type>gem</type>
685
- </dependency>
686
- <dependency>
687
- <groupId>rubygems</groupId>
688
- <artifactId>do_sqlite3</artifactId>
689
- <type>gem</type>
690
- </dependency>
691
- <dependency>
692
- <groupId>rubygems</groupId>
693
- <artifactId>do_jdbc</artifactId>
694
- <type>gem</type>
695
- </dependency>
696
- <dependency>
697
- <groupId>rubygems</groupId>
698
- <artifactId>jdbc-sqlite3</artifactId>
699
- <type>gem</type>
700
- </dependency>
701
- </dependencies>
702
- <dependencyManagement>
703
- <dependencies>
704
- <dependency>
705
- <groupId>rubygems</groupId>
706
- <artifactId>addressable</artifactId>
707
- <version>2.2.4</version>
708
- <type>gem</type>
709
- </dependency>
710
- <dependency>
711
- <groupId>rubygems</groupId>
712
- <artifactId>data_objects</artifactId>
713
- <version>0.10.3</version>
714
- <type>gem</type>
715
- </dependency>
716
- <dependency>
717
- <groupId>rubygems</groupId>
718
- <artifactId>dm-core</artifactId>
719
- <version>1.0.2</version>
720
- <type>gem</type>
721
- </dependency>
722
- <dependency>
723
- <groupId>rubygems</groupId>
724
- <artifactId>extlib</artifactId>
725
- <version>0.9.15</version>
726
- <type>gem</type>
727
- </dependency>
728
- <dependency>
729
- <groupId>rubygems</groupId>
730
- <artifactId>dm-do-adapter</artifactId>
731
- <version>1.0.2</version>
732
- <type>gem</type>
733
- </dependency>
734
- <dependency>
735
- <groupId>rubygems</groupId>
736
- <artifactId>dm-mysql-adapter</artifactId>
737
- <version>1.0.2</version>
738
- <type>gem</type>
739
- </dependency>
740
- <dependency>
741
- <groupId>rubygems</groupId>
742
- <artifactId>do_mysql</artifactId>
743
- <version>0.10.3</version>
744
- <type>gem</type>
745
- </dependency>
746
- <dependency>
747
- <groupId>rubygems</groupId>
748
- <artifactId>do_jdbc</artifactId>
749
- <version>0.10.3</version>
750
- <type>gem</type>
751
- </dependency>
752
- <dependency>
753
- <groupId>rubygems</groupId>
754
- <artifactId>jdbc-mysql</artifactId>
755
- <version>5.0.4</version>
756
- <type>gem</type>
757
- </dependency>
758
- <dependency>
759
- <groupId>rubygems</groupId>
760
- <artifactId>dm-postgres-adapter</artifactId>
761
- <version>1.0.0</version>
762
- <type>gem</type>
763
- </dependency>
764
- <dependency>
765
- <groupId>rubygems</groupId>
766
- <artifactId>do_postgres</artifactId>
767
- <version>0.10.3</version>
768
- <type>gem</type>
769
- </dependency>
770
- <dependency>
771
- <groupId>rubygems</groupId>
772
- <artifactId>jdbc-postgres</artifactId>
773
- <version>8.4.702</version>
774
- <type>gem</type>
775
- </dependency>
776
- <dependency>
777
- <groupId>rubygems</groupId>
778
- <artifactId>dm-sqlite-adapter</artifactId>
779
- <version>1.0.2</version>
780
- <type>gem</type>
781
- </dependency>
782
- <dependency>
783
- <groupId>rubygems</groupId>
784
- <artifactId>do_sqlite3</artifactId>
785
- <version>0.10.3</version>
786
- <type>gem</type>
787
- </dependency>
788
- <dependency>
789
- <groupId>rubygems</groupId>
790
- <artifactId>jdbc-sqlite3</artifactId>
791
- <version>3.6.14.2.056</version>
792
- <type>gem</type>
793
- </dependency>
794
- <dependency>
795
- <groupId>rubygems</groupId>
796
- <artifactId>ixtlan-core</artifactId>
797
- <version>0.1.1</version>
798
- <type>gem</type>
799
- </dependency>
800
- <dependency>
801
- <groupId>rubygems</groupId>
802
- <artifactId>slf4r</artifactId>
803
- <version>0.4.2</version>
804
- <type>gem</type>
805
- </dependency>
806
- </dependencies>
807
- </dependencyManagement>
808
- <build>
809
- <plugins>
810
- <plugin>
811
- <groupId>de.saumya.mojo</groupId>
812
- <artifactId>bundler-maven-plugin</artifactId>
813
- </plugin>
814
- </plugins>
815
- </build>
816
- <profiles>
817
- <profile>
818
- <id>production</id>
819
- <dependencies>
820
- <dependency>
821
- <groupId>rubygems</groupId>
822
- <artifactId>dm-mysql-adapter</artifactId>
823
- <type>gem</type>
824
- </dependency>
825
- <dependency>
826
- <groupId>rubygems</groupId>
827
- <artifactId>do_mysql</artifactId>
828
- <type>gem</type>
829
- </dependency>
830
- <dependency>
831
- <groupId>rubygems</groupId>
832
- <artifactId>jdbc-mysql</artifactId>
833
- <type>gem</type>
834
- </dependency>
835
- <dependency>
836
- <groupId>rubygems</groupId>
837
- <artifactId>dm-postgres-adapter</artifactId>
838
- <type>gem</type>
839
- </dependency>
840
- <dependency>
841
- <groupId>rubygems</groupId>
842
- <artifactId>do_postgres</artifactId>
843
- <type>gem</type>
844
- </dependency>
845
- <dependency>
846
- <groupId>rubygems</groupId>
847
- <artifactId>jdbc-postgres</artifactId>
848
- <type>gem</type>
849
- </dependency>
850
- </dependencies>
851
- </profile>
852
- </profiles>
853
- </project>
854
- XML
855
- end
856
- end
857
-
858
- describe "gemspec" do
859
-
860
- it 'should load minimal gemspec' do
861
- @project.load_gemspec(File.join(File.dirname(__FILE__), 'minimal.gemspec'))
862
- @project.to_xml.should == <<-XML
863
- <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
864
- <modelVersion>4.0.0</modelVersion>
865
- <groupId>rubygems</groupId>
866
- <artifactId>minimal</artifactId>
867
- <version>1.0.0</version>
868
- <name><![CDATA[minimal - gem]]></name>
869
- <packaging>gem</packaging>
870
- <build>
871
- <plugins>
872
- <plugin>
873
- <groupId>de.saumya.mojo</groupId>
874
- <artifactId>gem-maven-plugin</artifactId>
875
- <configuration>
876
- <gemspec>rspec/maven/tools/minimal.gemspec</gemspec>
877
- </configuration>
878
- </plugin>
879
- </plugins>
880
- </build>
881
- </project>
882
- XML
883
- end
884
-
885
- it 'should load gemspec without dependencies' do
886
- @project.load_gemspec(File.join(File.dirname(__FILE__), 'no-deps.gemspec'))
887
- @project.to_xml.should == <<-XML
888
- <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
889
- <modelVersion>4.0.0</modelVersion>
890
- <groupId>rubygems</groupId>
891
- <artifactId>no-deps</artifactId>
892
- <version>1.0.0</version>
893
- <name><![CDATA[no dependencies project]]></name>
894
- <packaging>gem</packaging>
895
- <description><![CDATA[a no dependencies project to demonstrat how gemspec2pom works]]></description>
896
- <url>http://example.com</url>
897
- <developers>
898
- <developer>
899
- <id>k_at_example_dot_com</id>
900
- <name>Krysh Sample</name>
901
- <email>k@example.com</email>
902
- </developer>
903
- <developer>
904
- <id>Me_And_The_Corner</id>
905
- <name>Me And The Corner</name>
906
- </developer>
907
- </developers>
908
- <licenses>
909
- <license>
910
- <name>AGPL</name>
911
- <url>./AGPL.txt</url>
912
- <distribution>repo</distribution>
913
- </license>
914
- </licenses>
915
- <build>
916
- <plugins>
917
- <plugin>
918
- <groupId>de.saumya.mojo</groupId>
919
- <artifactId>gem-maven-plugin</artifactId>
920
- <configuration>
921
- <gemspec>rspec/maven/tools/no-deps.gemspec</gemspec>
922
- <autorequire>my</autorequire>
923
- <defaultExecutable>myexe</defaultExecutable>
924
- <testFiles>test/first_test.rb</testFiles>
925
- <extraRdocFiles>README.txt</extraRdocFiles>
926
- <rdocOptions>--main,README.txt</rdocOptions>
927
- <requirePaths>mylib</requirePaths>
928
- <rubyforgeProject>myproject</rubyforgeProject>
929
- <requiredRubygemsVersion><![CDATA[= 1.4.2]]></requiredRubygemsVersion>
930
- <bindir>mybin</bindir>
931
- <requiredRubyVersion><![CDATA[= 1.8.7]]></requiredRubyVersion>
932
- <postInstallMessage><![CDATA[be happy]]></postInstallMessage>
933
- <executables>hello</executables>
934
- <extensions>myext</extensions>
935
- <platform>java</platform>
936
- <files>AGPL.txt,README.txt,test/first_test.rb,mybin/hello,myext,lib/first.rb,spec/first_spec.rb,features/first.feature</files>
937
- <requirements>installed java</requirements>
938
- </configuration>
939
- </plugin>
940
- </plugins>
941
- </build>
942
- </project>
943
- XML
944
- end
945
-
946
- it 'should load gemspec with dependencies' do
947
- @project.load_gemspec(File.join(File.dirname(__FILE__), 'deps.gemspec'))
948
- @project.to_xml.should == <<-XML
949
- <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
950
- <modelVersion>4.0.0</modelVersion>
951
- <groupId>rubygems</groupId>
952
- <artifactId>deps</artifactId>
953
- <version>1.0.0</version>
954
- <name><![CDATA[deps - gem]]></name>
955
- <packaging>gem</packaging>
956
- <dependencies>
957
- <dependency>
958
- <groupId>rubygems</groupId>
959
- <artifactId>slf4r</artifactId>
960
- <version>(0.4.0,)</version>
961
- <type>gem</type>
962
- <scope>compile</scope>
963
- </dependency>
964
- <dependency>
965
- <groupId>rubygems</groupId>
966
- <artifactId>rspec</artifactId>
967
- <version>[2.4.0,2.4.99999]</version>
968
- <type>gem</type>
969
- <scope>test</scope>
970
- </dependency>
971
- <dependency>
972
- <groupId>rubygems</groupId>
973
- <artifactId>cucumber</artifactId>
974
- <version>[0.10.0,0.11.1)</version>
975
- <type>gem</type>
976
- <scope>test</scope>
977
- </dependency>
978
- </dependencies>
979
- <build>
980
- <plugins>
981
- <plugin>
982
- <groupId>de.saumya.mojo</groupId>
983
- <artifactId>gem-maven-plugin</artifactId>
984
- <configuration>
985
- <gemspec>rspec/maven/tools/deps.gemspec</gemspec>
986
- </configuration>
987
- </plugin>
988
- </plugins>
989
- </build>
990
- </project>
991
- XML
992
- end
993
-
994
- it 'should load minimal gemspec with applied defaults' do
995
- @project.load_gemspec(File.join(File.dirname(__FILE__), 'minimal.gemspec'))
996
- @project.add_defaults
997
- @project.to_xml.should == <<-XML
998
- <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
999
- <modelVersion>4.0.0</modelVersion>
1000
- <groupId>rubygems</groupId>
1001
- <artifactId>minimal</artifactId>
1002
- <version>1.0.0</version>
1003
- <name><![CDATA[minimal - gem]]></name>
1004
- <packaging>gem</packaging>
1005
- <repositories>
1006
- <repository>
1007
- <id>rubygems-releases</id>
1008
- <url>http://rubygems-proxy.torquebox.org/releases</url>
1009
- </repository>
1010
- </repositories>
1011
- <pluginRepositories>
1012
- <pluginRepository>
1013
- <id>rubygems-releases</id>
1014
- <url>http://rubygems-proxy.torquebox.org/releases</url>
1015
- </pluginRepository>
1016
- </pluginRepositories>
1017
- <properties>
1018
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1019
- <gem.home>${project.build.directory}/rubygems</gem.home>
1020
- <gem.path>${project.build.directory}/rubygems</gem.path>
1021
- <jruby.plugins.version>_project.version_</jruby.plugins.version>
1022
- </properties>
1023
- <build>
1024
- <plugins>
1025
- <plugin>
1026
- <groupId>de.saumya.mojo</groupId>
1027
- <artifactId>gem-maven-plugin</artifactId>
1028
- <version>${jruby.plugins.version}</version>
1029
- <extensions>true</extensions>
1030
- <configuration>
1031
- <gemspec>rspec/maven/tools/minimal.gemspec</gemspec>
1032
- </configuration>
1033
- <dependencies>
1034
- <dependency>
1035
- <groupId>rubygems</groupId>
1036
- <artifactId>jruby-openssl</artifactId>
1037
- <version>[0,)</version>
1038
- <type>gem</type>
1039
- </dependency>
1040
- </dependencies>
1041
- </plugin>
1042
- </plugins>
1043
- <pluginManagement>
1044
- <plugins>
1045
- <plugin>
1046
- <groupId>org.eclipse.m2e</groupId>
1047
- <artifactId>lifecycle-mapping</artifactId>
1048
- <version>1.0.0</version>
1049
- <configuration>
1050
- <lifecycleMappingMetadata>
1051
- <pluginExecutions>
1052
- <pluginExecution>
1053
- <pluginExecutionFilter>
1054
- <groupId>de.saumya.mojo</groupId>
1055
- <artifactId>gem-maven-plugin</artifactId>
1056
- <versionRange>[0,)</versionRange>
1057
- <goals>
1058
- <goal>initialize</goal>
1059
- </goals>
1060
- </pluginExecutionFilter>
1061
- <action>
1062
- <ignore></ignore>
1063
- </action>
1064
- </pluginExecution>
1065
- </pluginExecutions>
1066
- </lifecycleMappingMetadata>
1067
- </configuration>
1068
- </plugin>
1069
- </plugins>
1070
- </pluginManagement>
1071
- </build>
1072
- <profiles>
1073
- <profile>
1074
- <id>executable</id>
1075
- <dependencies>
1076
- <dependency>
1077
- <groupId>de.saumya.mojo</groupId>
1078
- <artifactId>gem-assembly-descriptors</artifactId>
1079
- <version>${jruby.plugins.version}</version>
1080
- <type>jar</type>
1081
- <scope>runtime</scope>
1082
- </dependency>
1083
- </dependencies>
1084
- <build>
1085
- <plugins>
1086
- <plugin>
1087
- <artifactId>maven-assembly-plugin</artifactId>
1088
- <version>_assembly.version_</version>
1089
- <configuration>
1090
- <descriptorRefs>
1091
- <descriptorRef>jar-with-dependencies-and-gems</descriptorRef>
1092
- </descriptorRefs>
1093
- <archive>
1094
- <manifest>
1095
- <mainClass>de.saumya.mojo.assembly.Main</mainClass>
1096
- </manifest>
1097
- </archive>
1098
- </configuration>
1099
- <executions>
1100
- <execution>
1101
- <id>in_phase_package</id>
1102
- <phase>package</phase>
1103
- <goals>
1104
- <goal>assembly</goal>
1105
- </goals>
1106
- </execution>
1107
- </executions>
1108
- <dependencies>
1109
- <dependency>
1110
- <groupId>de.saumya.mojo</groupId>
1111
- <artifactId>gem-assembly-descriptors</artifactId>
1112
- <version>${jruby.plugins.version}</version>
1113
- <type>jar</type>
1114
- </dependency>
1115
- </dependencies>
1116
- </plugin>
1117
- </plugins>
1118
- </build>
1119
- </profile>
1120
- </profiles>
1121
- </project>
1122
- XML
1123
- end
1124
- end
1125
-
1126
- end