ruby-maven 3.0.3.0.28.5 → 3.0.3.0.29.0.pre

Sign up to get free protection for your applications and to get access to all the features.
@@ -257,9 +257,9 @@ module Maven
257
257
  end
258
258
  self
259
259
  end
260
-
260
+
261
261
  def _name
262
- "project"
262
+ '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"'
263
263
  end
264
264
 
265
265
  def version(val = nil)
@@ -97,7 +97,7 @@ EOF
97
97
  buf << "#{indent} <#{var}>#{val}</#{var}>\n" if val
98
98
  end
99
99
  end
100
- buf << "#{indent}</#{_name}>\n"
100
+ buf << "#{indent}</#{_name.sub(/ .*$/, '')}>\n"
101
101
  buf
102
102
  end
103
103
  end
@@ -188,7 +188,7 @@ EOF
188
188
  def adjust_key(name)
189
189
  name = name.to_s
190
190
  if (name =~ /\:/).nil?
191
- if [:jruby, :gem, :rspec, :rake, :rails2, :rails3, :gemify, :cucumber, :runit, :bundler].member? name.to_sym
191
+ if [:jruby, :gem, :rspec, :rake, :minitest, :rails3, :gemify, :cucumber, :runit, :bundler].member? name.to_sym
192
192
  "de.saumya.mojo:#{name}-maven-plugin"
193
193
  else
194
194
  "maven-#{name}-plugin"
@@ -171,9 +171,13 @@ module Maven
171
171
 
172
172
  repository("rubygems-releases").url = "http://rubygems-proxy.torquebox.org/releases" unless repository("rubygems-releases").url
173
173
 
174
- has_prerelease = dependencies.detect { |d| d.type.to_sym == :gem && d.version =~ /[a-zA-Z]/ }
175
-
176
- repository("rubygems-prereleases").url = "http://rubygems-proxy.torquebox.org/prereleases" if has_prerelease && !repository("rubygems-prereleases").url
174
+ unless repository("rubygems-prereleases").url
175
+ repository("rubygems-prereleases") do |r|
176
+ r.url = "http://rubygems-proxy.torquebox.org/prereleases"
177
+ r.releases(:enabled => false)
178
+ r.snapshots(:enabled => true)
179
+ end
180
+ end
177
181
 
178
182
  # TODO go through all plugins to find out any SNAPSHOT version !!
179
183
  if versions[:jruby_plugins] =~ /-SNAPSHOT$/ || properties['jruby.plugins.version'] =~ /-SNAPSHOT$/
@@ -188,10 +192,15 @@ module Maven
188
192
  gem = plugin(:gem)
189
193
  gem.version = "${jruby.plugins.version}" unless gem.version
190
194
  gem.extensions = true if packaging =~ /gem/
195
+ if File.exists?('lib') && File.exists?(File.join('src', 'main', 'java'))
196
+ plugin(:jar) do |j|
197
+ j.version = versions[:jar_plugin] unless j.version
198
+ j.in_phase('prepare-package').execute_goal(:jar).with :outputDirectory => '${project.basedir}/lib', :finalName => '${project.artifactId}'
199
+ end
200
+ end
191
201
  end
192
-
202
+
193
203
  if plugin?(:bundler)
194
- plugin_repository("rubygems-releases").url = "http://rubygems-proxy.torquebox.org/releases" unless plugin_repository("rubygems-releases").url
195
204
  bundler = plugin(:bundler)
196
205
  bundler.version = "${jruby.plugins.version}" unless bundler.version
197
206
  bundler.executions.goals << "install"
@@ -204,6 +213,8 @@ module Maven
204
213
  #add_test_plugin(nil, "test")
205
214
  add_test_plugin("rspec", "spec")
206
215
  add_test_plugin("cucumber", "features")
216
+ add_test_plugin("minitest", "test")
217
+ add_test_plugin("minitest", "spec", 'spec')
207
218
  end
208
219
 
209
220
  self.properties = {
@@ -212,13 +223,29 @@ module Maven
212
223
  "gem.path" => "${project.build.directory}/rubygems",
213
224
  "jruby.plugins.version" => versions[:jruby_plugins]
214
225
  }.merge(self.properties)
226
+
227
+ has_plugin_gems = build.plugins.detect do |k, pl|
228
+ pl.dependencies.detect { |d| d.type.to_sym == :gem } if pl.dependencies
229
+ end
230
+
231
+ if has_plugin_gems
232
+ plugin_repository("rubygems-releases").url = "http://rubygems-proxy.torquebox.org/releases" unless plugin_repository("rubygems-releases").url
233
+
234
+ unless plugin_repository("rubygems-prereleases").url
235
+ plugin_repository("rubygems-prereleases") do |r|
236
+ r.url = "http://rubygems-proxy.torquebox.org/prereleases"
237
+ r.releases(:enabled => false)
238
+ r.snapshots(:enabled => true)
239
+ end
240
+ end
241
+ end
215
242
  end
216
243
 
217
- def add_test_plugin(name, test_dir)
244
+ def add_test_plugin(name, test_dir, goal = 'test')
218
245
  unless plugin?(name)
219
246
  has_gem = name.nil? ? true : gem?(name)
220
247
  if has_gem && File.exists?(test_dir)
221
- plugin(name || 'runit', "${jruby.plugins.version}").execution.goals << "test"
248
+ plugin(name || 'runit', "${jruby.plugins.version}").execution.goals << goal
222
249
  end
223
250
  else
224
251
  pl = plugin(name || 'runit')
@@ -332,7 +359,7 @@ module Maven
332
359
  bundler_deps = []
333
360
  #plugin(:bundler) do |bundler|
334
361
  # use a dep with version so just create it from the args
335
- bundler_deps << args unless project.dependencies.member? dep
362
+ bundler_deps << args
336
363
 
337
364
  #TODO this should be done after all deps are in place - otherwise it depends on order how bundler gets setup
338
365
  if @lock
@@ -79,6 +79,7 @@ module Maven
79
79
  end
80
80
  })
81
81
 
82
+ profile(:assets).activation.by_default if profiles.key?(:assets)
82
83
  profile(:development).activation.by_default
83
84
  profile(:test).activation.property("rails.env", "test")
84
85
  profile(:production) do |prod|
@@ -4,8 +4,9 @@
4
4
  :jetty_plugin => "7.5.1.v20110908",
5
5
  :jruby_rack => "1.0.10",
6
6
  :war_plugin => "2.1.1",
7
- :jruby_plugins => "0.28.5",
8
- :jruby_version => "1.6.4",
7
+ :jar_plugin => "2.3.1",
8
+ :jruby_plugins => "0.29.0-SNAPSHOT",
9
+ :jruby_version => defined?(JRUBY_VERSION) ? JRUBY_VERSION : '1.6.7'
9
10
  }.freeze
10
11
  end
11
12
  end
@@ -189,10 +189,12 @@ module Maven
189
189
  def exec(*args)
190
190
  log(args)
191
191
  a = command_line(args.dup.flatten)
192
+ verbose = options.delete('--verbose')
193
+ no_pom = options.delete('--no-pom')
192
194
  a << options_array
193
195
  a.flatten!
194
- a = generate_pom(*a)
195
- puts a.join ' '
196
+ a = generate_pom(*a) unless no_pom
197
+ puts a.join ' ' if verbose
196
198
  if defined? JRUBY_VERSION
197
199
  # TODO use a setup like maven_gemify from jruby to launch maven
198
200
  launch_java(a)
Binary file
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-maven
3
3
  version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 3.0.3.0.28.5
4
+ prerelease: 13
5
+ version: 3.0.3.0.29.0.pre
6
6
  platform: ruby
7
7
  authors:
8
8
  - mkristian
@@ -10,8 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-10-13 00:00:00 +05:30
14
- default_executable:
13
+ date: 2012-04-17 00:00:00 Z
15
14
  dependencies:
16
15
  - !ruby/object:Gem::Dependency
17
16
  name: thor
@@ -58,12 +57,12 @@ files:
58
57
  - lib/aether-util-1.11.jar
59
58
  - lib/maven-settings-builder-3.0.3.jar
60
59
  - lib/wagon-provider-api-1.0-beta-7.jar
60
+ - lib/ruby-maven-3.0.3.0.29.0.pre.jar
61
61
  - lib/maven-settings-3.0.3.jar
62
62
  - lib/maven-embedder-3.0.3.jar
63
63
  - lib/maven-aether-provider-3.0.3.jar
64
64
  - lib/plexus-component-annotations-1.5.5.jar
65
65
  - lib/wagon-http-shared-1.0-beta-7.jar
66
- - lib/ruby-maven-3.0.3.0.28.5.jar
67
66
  - lib/maven-model-builder-3.0.3.jar
68
67
  - lib/maven-repository-metadata-3.0.3.jar
69
68
  - lib/maven-model-3.0.3.jar
@@ -98,7 +97,6 @@ files:
98
97
  - lib/ruby/maven/model/model_utils.rb
99
98
  - lib/ruby/maven/model/model.rb
100
99
  - lib/ruby/maven/model/dependencies.rb
101
- has_rdoc: true
102
100
  homepage: http://github.com/mkristian/ruby-maven
103
101
  licenses: []
104
102
 
@@ -123,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
121
  requirements: []
124
122
 
125
123
  rubyforge_project:
126
- rubygems_version: 1.5.1
124
+ rubygems_version: 1.8.9
127
125
  signing_key:
128
126
  specification_version: 3
129
127
  summary: maven support for ruby projects with gemspec, Gemfile
Binary file