maven-tools 0.34.0 → 0.34.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -131,22 +131,27 @@ module Maven
131
131
  name = spec.name
132
132
  end
133
133
 
134
- unless model.repositories.detect { |r| r.id == 'rubygems-releases' }
135
- repository( 'http://rubygems-proxy.torquebox.org/releases',
136
- :id => 'rubygems-releases' )
137
- end
138
- unless model.repositories.detect { |r| r.id == 'rubygems-prereleases' }
139
- snapshot_repository( 'http://rubygems-proxy.torquebox.org/prereleases',
140
- :id => 'rubygems-prereleases' )
141
- end
134
+ unless options[ :only_metadata ]
135
+
136
+ unless model.repositories.detect { |r| r.id == 'rubygems-releases' }
137
+ repository( 'http://rubygems-proxy.torquebox.org/releases',
138
+ :id => 'rubygems-releases' )
139
+ end
140
+ if ! model.repositories.detect { |r| r.id == 'rubygems-prereleases' } && model.dependencies.detect { |d| d.group_id == 'rubygems' && d.version.match( /[a-zA-Z]/ ) }
141
+
142
+ snapshot_repository( 'http://rubygems-proxy.torquebox.org/prereleases',
143
+ :id => 'rubygems-prereleases' )
144
+ end
142
145
 
143
- setup_jruby_plugins_version
146
+ setup_jruby_plugins_version
147
+ end
144
148
 
145
149
  if options.key?( :jar ) || options.key?( 'jar' )
146
150
  jarpath = options[ :jar ] || options[ 'jar' ]
147
151
  if jarpath
148
152
  jar = File.basename( jarpath ).sub( /.jar$/, '' )
149
- output = "#{require_path}/#{jarpath.sub( /#{jar}/, '' )}".sub( /\/$/, '' )
153
+ output = File.dirname( "#{require_path}/#{jarpath}" )
154
+ output.sub!( /\/$/, '' )
150
155
  end
151
156
  else
152
157
  jar = "#{name}"
@@ -260,20 +265,24 @@ module Maven
260
265
  id "rubygems:#{spec.name}:#{version}"
261
266
  name( spec.summary || spec.name )
262
267
  description spec.description
263
- packaging 'gem'
264
268
  url spec.homepage
265
- extension 'de.saumya.mojo:gem-extension:${jruby.plugins.version}'
269
+ unless options[ :only_metadata ]
270
+ packaging 'gem'
271
+ extension 'de.saumya.mojo:gem-extension:${jruby.plugins.version}'
272
+ end
266
273
  end
267
274
 
268
275
  setup_gem_support( options, spec )
269
276
 
277
+ return if options[ :only_metadata ]
278
+
270
279
  config = { :gemspec => name.sub( /^#{basedir}\/?/, '' ) }
271
280
  if options[ :include_jars ] || options[ 'include_jars' ]
272
281
  config[ :includeDependencies ] = true
273
282
  end
274
283
  plugin( 'de.saumya.mojo:gem-maven-plugin:${jruby.plugins.version}',
275
284
  config )
276
-
285
+
277
286
  deps = Maven::Tools::GemspecDependencies.new( spec )
278
287
  deps.runtime.each do |d|
279
288
  gem d
@@ -1022,7 +1031,7 @@ module Maven
1022
1031
  c = options.delete( :snapshots )
1023
1032
  c = options.delete( 'snapshots' ) if c.nil?
1024
1033
  unless c.nil?
1025
- r.snapshot = repository_policy( c )
1034
+ r.snapshots = repository_policy( c )
1026
1035
  end
1027
1036
  c = options.delete( :releases )
1028
1037
  c = options.delete( 'releases' ) if c.nil?
@@ -143,7 +143,7 @@ class Repository
143
143
 
144
144
  attribute :unique_version, String
145
145
  attribute :releases, RepositoryPolicy
146
- attribute :snapshot, RepositoryPolicy
146
+ attribute :snapshots, RepositoryPolicy
147
147
 
148
148
  include INU
149
149
 
@@ -20,6 +20,6 @@
20
20
  #
21
21
  module Maven
22
22
  module Tools
23
- VERSION = '0.34.0'.freeze
23
+ VERSION = '0.34.1'.freeze
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maven-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.34.0
4
+ version: 0.34.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-25 00:00:00.000000000 Z
12
+ date: 2013-12-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: virtus