maven-tools 0.32.0 → 0.32.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. data/lib/maven-tools.rb +20 -0
  2. data/lib/maven/model/dependencies.rb +21 -1
  3. data/lib/maven/model/model.rb +21 -1
  4. data/lib/maven/model/utils.rb +21 -1
  5. data/lib/maven/tools/coordinate.rb +21 -1
  6. data/lib/maven/tools/execute_in_phase.rb +20 -1
  7. data/lib/maven/tools/gem_project.rb +39 -3
  8. data/lib/maven/tools/gemfile_lock.rb +21 -1
  9. data/lib/maven/tools/jarfile.rb +21 -1
  10. data/lib/maven/tools/minimal_project.rb +21 -1
  11. data/lib/maven/tools/pom_generator.rb +21 -1
  12. data/lib/maven/tools/rails_project.rb +23 -2
  13. data/lib/maven/tools/version.rb +21 -1
  14. data/lib/maven/tools/versions.rb +25 -5
  15. data/lib/maven_tools.rb +20 -0
  16. data/rspec/maven/model/dependencies_spec.rb +260 -0
  17. data/rspec/maven/model/model_spec.rb +713 -0
  18. data/rspec/maven/tools/Gemfile.gems +11 -0
  19. data/rspec/maven/tools/Gemfile.groups +15 -0
  20. data/rspec/maven/tools/Gemfile.ignored +30 -0
  21. data/rspec/maven/tools/Gemfile.lockfile +8 -0
  22. data/rspec/maven/tools/Gemfile.lockfile.lock +53 -0
  23. data/rspec/maven/tools/Gemfile.minimal +1 -0
  24. data/rspec/maven/tools/Gemfile.nolock +1 -0
  25. data/rspec/maven/tools/Gemfile.rails +16 -0
  26. data/rspec/maven/tools/Gemfile.simple +7 -0
  27. data/rspec/maven/tools/Gemfile.withlock +1 -0
  28. data/rspec/maven/tools/Gemfile.withlock.lock +28 -0
  29. data/rspec/maven/tools/Jarfile.with +2 -0
  30. data/rspec/maven/tools/Jarfile.with.lock +1 -0
  31. data/rspec/maven/tools/Jarfile.without +2 -0
  32. data/rspec/maven/tools/deps.gemspec +8 -0
  33. data/rspec/maven/tools/gem_project_spec.rb +1127 -0
  34. data/rspec/maven/tools/maven-tools.gemspec +17 -0
  35. data/rspec/maven/tools/minimal.gemspec +5 -0
  36. data/rspec/maven/tools/no-deps.gemspec +27 -0
  37. data/rspec/maven/tools/rails_project_spec.rb +286 -0
  38. data/rspec/maven/tools/spec_helper.rb +22 -0
  39. metadata +66 -3
@@ -0,0 +1,17 @@
1
+ # -*- coding: utf-8 -*-
2
+ require File.expand_path('lib/maven/tools/version.rb')
3
+ Gem::Specification.new do |s|
4
+ s.name = 'maven-tools'
5
+ s.version = '0.32.0'
6
+
7
+ s.summary = 'helpers for maven related tasks'
8
+ s.description = 'adds versions conversion from rubygems to maven and vice versa, ruby DSL for POM (Project Object Model from maven), pom generators, etc'
9
+ s.homepage = 'http://github.com/torquebox/maven-tools'
10
+
11
+ s.authors = ['Christian Meier']
12
+ s.email = ['m.kristian@web.de']
13
+
14
+ s.add_development_dependency 'rake', '~> 10.0.3'
15
+ s.add_development_dependency 'minitest', '~> 4.4'
16
+ s.add_development_dependency 'rspec', '2.7'
17
+ end
@@ -0,0 +1,5 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = 'minimal'
3
+ s.version = '1.0.0'
4
+ end
5
+
@@ -0,0 +1,27 @@
1
+ #-*- mode: ruby -*-
2
+ Gem::Specification.new do |s|
3
+ s.name = 'no-deps'
4
+ s.version = '1.0.0'
5
+ s.summary = 'no dependencies project'
6
+ s.description = 'a no dependencies project to demonstrat how gemspec2pom works'
7
+ s.homepage = 'http://example.com'
8
+ s.authors = ['Krysh Sample', 'Me And The Corner']
9
+ s.email = ['k@example.com']
10
+ s.licenses += ['AGPL']
11
+ s.autorequire = 'my'
12
+ s.bindir = 'mybin'
13
+ s.default_executable = 'myexe'
14
+ s.executables = ['hello']
15
+ s.extensions = ['myext']
16
+ s.extra_rdoc_files = ['README.txt']
17
+ s.files = ['AGPL.txt','README.txt','test/first_test.rb','mybin/hello','myext','lib/first.rb','spec/first_spec.rb','features/first.feature']
18
+ s.platform = 'java'
19
+ s.post_install_message = 'be happy'
20
+ s.rdoc_options = ['--main','README.txt']
21
+ s.require_paths = ['mylib']
22
+ s.required_ruby_version = '= 1.8.7'
23
+ s.required_rubygems_version = '= 1.4.2'
24
+ s.requirements = ['installed java']
25
+ s.rubyforge_project = 'myproject'
26
+ s.test_files = ['test/first_test.rb']
27
+ end
@@ -0,0 +1,286 @@
1
+ require File.expand_path(File.join(File.dirname(__FILE__), 'spec_helper.rb'))
2
+ require 'maven/tools/rails_project'
3
+
4
+ describe Maven::Tools::RailsProject do
5
+
6
+ before :each do
7
+ @project = Maven::Tools::RailsProject.new("test")
8
+ end
9
+
10
+ it 'should load Gemfile from a simple rails application with applied defaults' do
11
+ pending "hash is differently orderd in ruby1.8" if nil == (RUBY_VERSION =~ /^1.8/) && !defined? JRUBY_VERSION
12
+ @project.load_gemfile(File.join(File.dirname(__FILE__), 'Gemfile.simple'))
13
+ @project.name "test"
14
+ @project.add_defaults
15
+ @project.to_xml.should == <<-XML
16
+ <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">
17
+ <modelVersion>4.0.0</modelVersion>
18
+ <groupId>rails</groupId>
19
+ <artifactId>test</artifactId>
20
+ <version>0.0.0</version>
21
+ <name><![CDATA[test]]></name>
22
+ <packaging>war</packaging>
23
+ <repositories>
24
+ <repository>
25
+ <id>rubygems-releases</id>
26
+ <url>http://rubygems-proxy.torquebox.org/releases</url>
27
+ </repository>
28
+ </repositories>
29
+ <dependencies>
30
+ <dependency>
31
+ <groupId>rubygems</groupId>
32
+ <artifactId>rails</artifactId>
33
+ <version>3.0.1</version>
34
+ <type>gem</type>
35
+ </dependency>
36
+ #{ !defined?(JRUBY_VERSION) ? '' : ' <dependency>
37
+ <groupId>rubygems</groupId>
38
+ <artifactId>activerecord-jdbc-adapter</artifactId>
39
+ <version>[0,)</version>
40
+ <type>gem</type>
41
+ </dependency>
42
+ '
43
+ } <dependency>
44
+ <groupId>rubygems</groupId>
45
+ <artifactId>#{ defined?(JRUBY_VERSION) ? 'jdbc-' : ''}sqlite3</artifactId>
46
+ <version>[0,)</version>
47
+ <type>gem</type>
48
+ </dependency>
49
+ <dependency>
50
+ <groupId>rubygems</groupId>
51
+ <artifactId>bundler</artifactId>
52
+ <type>gem</type>
53
+ </dependency>
54
+ <dependency>
55
+ <groupId>org.jruby</groupId>
56
+ <artifactId>jruby-complete</artifactId>
57
+ <version>${jruby.version}</version>
58
+ <type>jar</type>
59
+ </dependency>
60
+ <dependency>
61
+ <groupId>org.jruby.rack</groupId>
62
+ <artifactId>jruby-rack</artifactId>
63
+ <version>_jruby.rack.version_</version>
64
+ <type>jar</type>
65
+ </dependency>
66
+ </dependencies>
67
+ <dependencyManagement>
68
+ <dependencies>
69
+ <dependency>
70
+ <groupId>rubygems</groupId>
71
+ <artifactId>bundler</artifactId>
72
+ <version>_bundler.version_</version>
73
+ <type>gem</type>
74
+ </dependency>
75
+ </dependencies>
76
+ </dependencyManagement>
77
+ <properties>
78
+ <gem.home>${project.build.directory}/rubygems</gem.home>
79
+ <gem.includeRubygemsInTestResources>false</gem.includeRubygemsInTestResources>
80
+ <gem.path>${project.build.directory}/rubygems</gem.path>
81
+ <jruby.plugins.version>_project.version_</jruby.plugins.version>
82
+ <jruby.version>_jruby.version_</jruby.version>
83
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
84
+ <rails.env>development</rails.env>
85
+ </properties>
86
+ <build>
87
+ <plugins>
88
+ <plugin>
89
+ <artifactId>maven-war-plugin</artifactId>
90
+ <version>_war.version_</version>
91
+ <configuration>
92
+ <webResources>
93
+ <resource>
94
+ <directory>public</directory>
95
+ </resource>
96
+ <resource>
97
+ <directory>.</directory>
98
+ <includes>
99
+ <include>app/**</include>
100
+ <include>config/**</include>
101
+ <include>lib/**</include>
102
+ <include>vendor/**</include>
103
+ <include>Gemfile</include>
104
+ </includes>
105
+ <targetPath>WEB-INF</targetPath>
106
+ </resource>
107
+ <resource>
108
+ <directory>${gem.path}</directory>
109
+ <includes>
110
+ <include>gems/**</include>
111
+ <include>specifications/**</include>
112
+ </includes>
113
+ <targetPath>WEB-INF/gems</targetPath>
114
+ </resource>
115
+ </webResources>
116
+ <webXml>config/web.xml</webXml>
117
+ </configuration>
118
+ </plugin>
119
+ <plugin>
120
+ <groupId>de.saumya.mojo</groupId>
121
+ <artifactId>bundler-maven-plugin</artifactId>
122
+ <version>${jruby.plugins.version}</version>
123
+ </plugin>
124
+ <plugin>
125
+ <groupId>de.saumya.mojo</groupId>
126
+ <artifactId>rails3-maven-plugin</artifactId>
127
+ <version>${jruby.plugins.version}</version>
128
+ <executions>
129
+ <execution>
130
+ <id>in_phase_validate</id>
131
+ <phase>validate</phase>
132
+ <goals>
133
+ <goal>initialize</goal>
134
+ </goals>
135
+ </execution>
136
+ </executions>
137
+ </plugin>
138
+ </plugins>
139
+ <pluginManagement>
140
+ <plugins>
141
+ <plugin>
142
+ <groupId>org.eclipse.m2e</groupId>
143
+ <artifactId>lifecycle-mapping</artifactId>
144
+ <version>1.0.0</version>
145
+ <configuration>
146
+ <lifecycleMappingMetadata>
147
+ <pluginExecutions>
148
+ <pluginExecution>
149
+ <action>
150
+ <ignore></ignore>
151
+ </action>
152
+ <pluginExecutionFilter>
153
+ <artifactId>bundler-maven-plugin</artifactId>
154
+ <goals>
155
+ <goal>install</goal>
156
+ </goals>
157
+ <groupId>de.saumya.mojo</groupId>
158
+ <versionRange>[0,)</versionRange>
159
+ </pluginExecutionFilter>
160
+ </pluginExecution>
161
+ </pluginExecutions>
162
+ </lifecycleMappingMetadata>
163
+ </configuration>
164
+ </plugin>
165
+ </plugins>
166
+ </pluginManagement>
167
+ </build>
168
+ <profiles>
169
+ <profile>
170
+ <id>assets</id>
171
+ <activation>
172
+ <activeByDefault>true</activeByDefault>
173
+ </activation>
174
+ </profile>
175
+ <profile>
176
+ <id>development</id>
177
+ <activation>
178
+ <activeByDefault>true</activeByDefault>
179
+ </activation>
180
+ </profile>
181
+ <profile>
182
+ <id>production</id>
183
+ <activation>
184
+ <property>
185
+ <name>rails.env</name>
186
+ <value>production</value>
187
+ </property>
188
+ </activation>
189
+ <properties>
190
+ <gem.home>${project.build.directory}/rubygems-production</gem.home>
191
+ <gem.path>${project.build.directory}/rubygems-production</gem.path>
192
+ </properties>
193
+ </profile>
194
+ <profile>
195
+ <id>test</id>
196
+ <activation>
197
+ <activeByDefault>true</activeByDefault>
198
+ <property>
199
+ <name>rails.env</name>
200
+ <value>test</value>
201
+ </property>
202
+ </activation>
203
+ </profile>
204
+ </profiles>
205
+ </project>
206
+ XML
207
+ end
208
+
209
+ it 'should load Gemfile from a rails application"' do
210
+ pending "hash is differently orderd in ruby1.8" if nil == (RUBY_VERSION =~ /^1.8/) && !defined? JRUBY_VERSION
211
+ @project.load_gemfile(File.join(File.dirname(__FILE__), 'Gemfile.rails'))
212
+ @project.to_xml.should == <<-XML
213
+ <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">
214
+ <modelVersion>4.0.0</modelVersion>
215
+ <groupId>rails</groupId>
216
+ <artifactId>test</artifactId>
217
+ <version>0.0.0</version>
218
+ <packaging>war</packaging>
219
+ <dependencies>
220
+ <dependency>
221
+ <groupId>rubygems</groupId>
222
+ <artifactId>rails</artifactId>
223
+ <version>3.0.1</version>
224
+ <type>gem</type>
225
+ </dependency>
226
+ #{ !defined?(JRUBY_VERSION) ? '' : ' <dependency>
227
+ <groupId>rubygems</groupId>
228
+ <artifactId>activerecord-jdbc-adapter</artifactId>
229
+ <version>[0,)</version>
230
+ <type>gem</type>
231
+ </dependency>
232
+ '
233
+ } </dependencies>
234
+ <build>
235
+ <plugins>
236
+ <plugin>
237
+ <groupId>de.saumya.mojo</groupId>
238
+ <artifactId>bundler-maven-plugin</artifactId>
239
+ </plugin>
240
+ </plugins>
241
+ </build>
242
+ <profiles>
243
+ <profile>
244
+ <id>development</id>
245
+ <dependencies>
246
+ <dependency>
247
+ <groupId>rubygems</groupId>
248
+ <artifactId>#{ defined?(JRUBY_VERSION) ? 'jdbc-' : ''}sqlite3</artifactId>
249
+ <version>[0,)</version>
250
+ <type>gem</type>
251
+ </dependency>
252
+ <dependency>
253
+ <groupId>rubygems</groupId>
254
+ <artifactId>rspec</artifactId>
255
+ <version>[0,)</version>
256
+ <type>gem</type>
257
+ </dependency>
258
+ </dependencies>
259
+ </profile>
260
+ <profile>
261
+ <id>production</id>
262
+ <dependencies>
263
+ <dependency>
264
+ <groupId>rubygems</groupId>
265
+ <artifactId>#{ defined?(JRUBY_VERSION) ? 'jdbc-' : ''}mysql</artifactId>
266
+ <version>[0,)</version>
267
+ <type>gem</type>
268
+ </dependency>
269
+ </dependencies>
270
+ </profile>
271
+ <profile>
272
+ <id>test</id>
273
+ <dependencies>
274
+ <dependency>
275
+ <groupId>rubygems</groupId>
276
+ <artifactId>rspec</artifactId>
277
+ <version>[0,)</version>
278
+ <type>gem</type>
279
+ </dependency>
280
+ </dependencies>
281
+ </profile>
282
+ </profiles>
283
+ </project>
284
+ XML
285
+ end
286
+ end
@@ -0,0 +1,22 @@
1
+ require 'maven/tools/versions'
2
+ unless defined? PLUGINS_VERSION
3
+
4
+ # keep plugins version for version test
5
+ PLUGINS_VERSION = Maven::Tools::VERSIONS[:jruby_plugins]
6
+
7
+ original_verbosity = $VERBOSE
8
+ $VERBOSE = nil
9
+
10
+ Maven::Tools::VERSIONS = {
11
+ :jetty_plugin => "_jetty.version_",
12
+ :jruby_rack => "_jruby.rack.version_",
13
+ :assembly_plugin => "_assembly.version_",
14
+ :war_plugin => "_war.version_",
15
+ :jar_plugin => "_jar.version_",
16
+ :jruby_plugins => "_project.version_",
17
+ :bundler_version => "_bundler.version_",
18
+ :jruby_version => "_jruby.version_"
19
+ }
20
+
21
+ $VERBOSE = original_verbosity
22
+ end
metadata CHANGED
@@ -2,14 +2,14 @@
2
2
  name: maven-tools
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.32.0
5
+ version: 0.32.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Christian Meier
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-22 00:00:00.000000000 Z
12
+ date: 2013-01-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -59,6 +59,22 @@ dependencies:
59
59
  none: false
60
60
  prerelease: false
61
61
  type: :development
62
+ - !ruby/object:Gem::Dependency
63
+ name: copyright-header
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 1.0.7
69
+ none: false
70
+ requirement: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: 1.0.7
75
+ none: false
76
+ prerelease: false
77
+ type: :development
62
78
  description: adds versions conversion from rubygems to maven and vice versa, ruby DSL for POM (Project Object Model from maven), pom generators, etc
63
79
  email:
64
80
  - m.kristian@web.de
@@ -83,10 +99,34 @@ files:
83
99
  - lib/maven/model/dependencies.rb
84
100
  - spec/coordinate_spec.rb
85
101
  - spec/jarfile_spec.rb
102
+ - rspec/maven/tools/Gemfile.withlock
103
+ - rspec/maven/tools/Gemfile.lockfile.lock
104
+ - rspec/maven/tools/rails_project_spec.rb
105
+ - rspec/maven/tools/Gemfile.nolock
106
+ - rspec/maven/tools/maven-tools.gemspec
107
+ - rspec/maven/tools/Gemfile.groups
108
+ - rspec/maven/tools/Gemfile.minimal
109
+ - rspec/maven/tools/spec_helper.rb
110
+ - rspec/maven/tools/Gemfile.lockfile
111
+ - rspec/maven/tools/no-deps.gemspec
112
+ - rspec/maven/tools/Gemfile.ignored
113
+ - rspec/maven/tools/Gemfile.rails
114
+ - rspec/maven/tools/gem_project_spec.rb
115
+ - rspec/maven/tools/Gemfile.gems
116
+ - rspec/maven/tools/Gemfile.simple
117
+ - rspec/maven/tools/Jarfile.with
118
+ - rspec/maven/tools/minimal.gemspec
119
+ - rspec/maven/tools/Gemfile.withlock.lock
120
+ - rspec/maven/tools/Jarfile.with.lock
121
+ - rspec/maven/tools/Jarfile.without
122
+ - rspec/maven/tools/deps.gemspec
123
+ - rspec/maven/model/model_spec.rb
124
+ - rspec/maven/model/dependencies_spec.rb
86
125
  - MIT-LICENSE
87
126
  - README.md
88
127
  homepage: http://github.com/torquebox/maven-tools
89
- licenses: []
128
+ licenses:
129
+ - MIT
90
130
  post_install_message:
91
131
  rdoc_options: []
92
132
  require_paths:
@@ -114,3 +154,26 @@ summary: helpers for maven related tasks
114
154
  test_files:
115
155
  - spec/coordinate_spec.rb
116
156
  - spec/jarfile_spec.rb
157
+ - rspec/maven/tools/Gemfile.withlock
158
+ - rspec/maven/tools/Gemfile.lockfile.lock
159
+ - rspec/maven/tools/rails_project_spec.rb
160
+ - rspec/maven/tools/Gemfile.nolock
161
+ - rspec/maven/tools/maven-tools.gemspec
162
+ - rspec/maven/tools/Gemfile.groups
163
+ - rspec/maven/tools/Gemfile.minimal
164
+ - rspec/maven/tools/spec_helper.rb
165
+ - rspec/maven/tools/Gemfile.lockfile
166
+ - rspec/maven/tools/no-deps.gemspec
167
+ - rspec/maven/tools/Gemfile.ignored
168
+ - rspec/maven/tools/Gemfile.rails
169
+ - rspec/maven/tools/gem_project_spec.rb
170
+ - rspec/maven/tools/Gemfile.gems
171
+ - rspec/maven/tools/Gemfile.simple
172
+ - rspec/maven/tools/Jarfile.with
173
+ - rspec/maven/tools/minimal.gemspec
174
+ - rspec/maven/tools/Gemfile.withlock.lock
175
+ - rspec/maven/tools/Jarfile.with.lock
176
+ - rspec/maven/tools/Jarfile.without
177
+ - rspec/maven/tools/deps.gemspec
178
+ - rspec/maven/model/model_spec.rb
179
+ - rspec/maven/model/dependencies_spec.rb