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,17 +0,0 @@
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
@@ -1,5 +0,0 @@
1
- Gem::Specification.new do |s|
2
- s.name = 'minimal'
3
- s.version = '1.0.0'
4
- end
5
-
@@ -1,27 +0,0 @@
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
@@ -1,284 +0,0 @@
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
- @project.load_gemfile(File.join(File.dirname(__FILE__), 'Gemfile.simple'))
12
- @project.name "test"
13
- @project.add_defaults
14
- @project.to_xml.should == <<-XML
15
- <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">
16
- <modelVersion>4.0.0</modelVersion>
17
- <groupId>rails</groupId>
18
- <artifactId>test</artifactId>
19
- <version>0.0.0</version>
20
- <name><![CDATA[test]]></name>
21
- <packaging>war</packaging>
22
- <repositories>
23
- <repository>
24
- <id>rubygems-releases</id>
25
- <url>http://rubygems-proxy.torquebox.org/releases</url>
26
- </repository>
27
- </repositories>
28
- <dependencies>
29
- <dependency>
30
- <groupId>rubygems</groupId>
31
- <artifactId>rails</artifactId>
32
- <version>3.0.1</version>
33
- <type>gem</type>
34
- </dependency>
35
- #{ !defined?(JRUBY_VERSION) ? '' : ' <dependency>
36
- <groupId>rubygems</groupId>
37
- <artifactId>activerecord-jdbc-adapter</artifactId>
38
- <version>[0,)</version>
39
- <type>gem</type>
40
- </dependency>
41
- '
42
- } <dependency>
43
- <groupId>rubygems</groupId>
44
- <artifactId>#{ defined?(JRUBY_VERSION) ? 'jdbc-' : ''}sqlite3</artifactId>
45
- <version>[0,)</version>
46
- <type>gem</type>
47
- </dependency>
48
- <dependency>
49
- <groupId>rubygems</groupId>
50
- <artifactId>bundler</artifactId>
51
- <type>gem</type>
52
- </dependency>
53
- <dependency>
54
- <groupId>org.jruby</groupId>
55
- <artifactId>jruby-complete</artifactId>
56
- <version>${jruby.version}</version>
57
- <type>jar</type>
58
- </dependency>
59
- <dependency>
60
- <groupId>org.jruby.rack</groupId>
61
- <artifactId>jruby-rack</artifactId>
62
- <version>_jruby.rack.version_</version>
63
- <type>jar</type>
64
- </dependency>
65
- </dependencies>
66
- <dependencyManagement>
67
- <dependencies>
68
- <dependency>
69
- <groupId>rubygems</groupId>
70
- <artifactId>bundler</artifactId>
71
- <version>_bundler.version_</version>
72
- <type>gem</type>
73
- </dependency>
74
- </dependencies>
75
- </dependencyManagement>
76
- <properties>
77
- <jruby.version>_jruby.version_</jruby.version>
78
- <rails.env>development</rails.env>
79
- <gem.includeRubygemsInTestResources>false</gem.includeRubygemsInTestResources>
80
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
81
- <gem.home>${project.build.directory}/rubygems</gem.home>
82
- <gem.path>${project.build.directory}/rubygems</gem.path>
83
- <jruby.plugins.version>_project.version_</jruby.plugins.version>
84
- </properties>
85
- <build>
86
- <plugins>
87
- <plugin>
88
- <groupId>de.saumya.mojo</groupId>
89
- <artifactId>bundler-maven-plugin</artifactId>
90
- <version>${jruby.plugins.version}</version>
91
- </plugin>
92
- <plugin>
93
- <groupId>de.saumya.mojo</groupId>
94
- <artifactId>rails3-maven-plugin</artifactId>
95
- <version>${jruby.plugins.version}</version>
96
- <executions>
97
- <execution>
98
- <id>in_phase_validate</id>
99
- <phase>validate</phase>
100
- <goals>
101
- <goal>initialize</goal>
102
- </goals>
103
- </execution>
104
- </executions>
105
- </plugin>
106
- <plugin>
107
- <artifactId>maven-war-plugin</artifactId>
108
- <version>_war.version_</version>
109
- <configuration>
110
- <webResources>
111
- <resource>
112
- <directory>public</directory>
113
- </resource>
114
- <resource>
115
- <directory>.</directory>
116
- <targetPath>WEB-INF</targetPath>
117
- <includes>
118
- <include>app/**</include>
119
- <include>config/**</include>
120
- <include>lib/**</include>
121
- <include>vendor/**</include>
122
- <include>Gemfile</include>
123
- </includes>
124
- </resource>
125
- <resource>
126
- <directory>${gem.path}</directory>
127
- <targetPath>WEB-INF/gems</targetPath>
128
- <includes>
129
- <include>gems/**</include>
130
- <include>specifications/**</include>
131
- </includes>
132
- </resource>
133
- </webResources>
134
- <webXml>config/web.xml</webXml>
135
- </configuration>
136
- </plugin>
137
- </plugins>
138
- <pluginManagement>
139
- <plugins>
140
- <plugin>
141
- <groupId>org.eclipse.m2e</groupId>
142
- <artifactId>lifecycle-mapping</artifactId>
143
- <version>1.0.0</version>
144
- <configuration>
145
- <lifecycleMappingMetadata>
146
- <pluginExecutions>
147
- <pluginExecution>
148
- <pluginExecutionFilter>
149
- <groupId>de.saumya.mojo</groupId>
150
- <artifactId>bundler-maven-plugin</artifactId>
151
- <versionRange>[0,)</versionRange>
152
- <goals>
153
- <goal>install</goal>
154
- </goals>
155
- </pluginExecutionFilter>
156
- <action>
157
- <ignore></ignore>
158
- </action>
159
- </pluginExecution>
160
- </pluginExecutions>
161
- </lifecycleMappingMetadata>
162
- </configuration>
163
- </plugin>
164
- </plugins>
165
- </pluginManagement>
166
- </build>
167
- <profiles>
168
- <profile>
169
- <id>assets</id>
170
- <activation>
171
- <activeByDefault>true</activeByDefault>
172
- </activation>
173
- </profile>
174
- <profile>
175
- <id>development</id>
176
- <activation>
177
- <activeByDefault>true</activeByDefault>
178
- </activation>
179
- </profile>
180
- <profile>
181
- <id>test</id>
182
- <activation>
183
- <activeByDefault>true</activeByDefault>
184
- <property>
185
- <name>rails.env</name>
186
- <value>test</value>
187
- </property>
188
- </activation>
189
- </profile>
190
- <profile>
191
- <id>production</id>
192
- <activation>
193
- <property>
194
- <name>rails.env</name>
195
- <value>production</value>
196
- </property>
197
- </activation>
198
- <properties>
199
- <gem.home>${project.build.directory}/rubygems-production</gem.home>
200
- <gem.path>${project.build.directory}/rubygems-production</gem.path>
201
- </properties>
202
- </profile>
203
- </profiles>
204
- </project>
205
- XML
206
- end
207
-
208
- it 'should load Gemfile from a rails application"' do
209
- @project.load_gemfile(File.join(File.dirname(__FILE__), 'Gemfile.rails'))
210
- @project.to_xml.should == <<-XML
211
- <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">
212
- <modelVersion>4.0.0</modelVersion>
213
- <groupId>rails</groupId>
214
- <artifactId>test</artifactId>
215
- <version>0.0.0</version>
216
- <packaging>war</packaging>
217
- <dependencies>
218
- <dependency>
219
- <groupId>rubygems</groupId>
220
- <artifactId>rails</artifactId>
221
- <version>3.0.1</version>
222
- <type>gem</type>
223
- </dependency>
224
- #{ !defined?(JRUBY_VERSION) ? '' : ' <dependency>
225
- <groupId>rubygems</groupId>
226
- <artifactId>activerecord-jdbc-adapter</artifactId>
227
- <version>[0,)</version>
228
- <type>gem</type>
229
- </dependency>
230
- '
231
- } </dependencies>
232
- <build>
233
- <plugins>
234
- <plugin>
235
- <groupId>de.saumya.mojo</groupId>
236
- <artifactId>bundler-maven-plugin</artifactId>
237
- </plugin>
238
- </plugins>
239
- </build>
240
- <profiles>
241
- <profile>
242
- <id>development</id>
243
- <dependencies>
244
- <dependency>
245
- <groupId>rubygems</groupId>
246
- <artifactId>#{ defined?(JRUBY_VERSION) ? 'jdbc-' : ''}sqlite3</artifactId>
247
- <version>[0,)</version>
248
- <type>gem</type>
249
- </dependency>
250
- <dependency>
251
- <groupId>rubygems</groupId>
252
- <artifactId>rspec</artifactId>
253
- <version>[0,)</version>
254
- <type>gem</type>
255
- </dependency>
256
- </dependencies>
257
- </profile>
258
- <profile>
259
- <id>test</id>
260
- <dependencies>
261
- <dependency>
262
- <groupId>rubygems</groupId>
263
- <artifactId>rspec</artifactId>
264
- <version>[0,)</version>
265
- <type>gem</type>
266
- </dependency>
267
- </dependencies>
268
- </profile>
269
- <profile>
270
- <id>production</id>
271
- <dependencies>
272
- <dependency>
273
- <groupId>rubygems</groupId>
274
- <artifactId>#{ defined?(JRUBY_VERSION) ? 'jdbc-' : ''}mysql</artifactId>
275
- <version>[0,)</version>
276
- <type>gem</type>
277
- </dependency>
278
- </dependencies>
279
- </profile>
280
- </profiles>
281
- </project>
282
- XML
283
- end
284
- end
@@ -1,22 +0,0 @@
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