jar-dependencies 0.1.13 → 0.1.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 67596525df0c9a029290a56e4c2e0fbca74fc298
4
- data.tar.gz: 44fe4eb030153ed7e44dc790ea65d3bbc59f0633
3
+ metadata.gz: f61541c9618a7319040695dbccad08964f6ad347
4
+ data.tar.gz: 15cdc1a05d4c51b6850b01112c52ed94f5bb630c
5
5
  SHA512:
6
- metadata.gz: f1ecf583501d0d4c8214c8e376100afa426db341dd8f0ea86af1478426321dfb6aaaa7512a3f0dfccc0601ed652d5f3cd2964051986c495576462f316015013d
7
- data.tar.gz: c0f829b0e0dda85a4f9f8696c4b7d7f9a55323b2fcac1cdf1c6658c0fc424a98b521f628b9e8674edfed19b4d34b5f0d9f7ec45cd9e852fd6b0c6c747ce92980
6
+ metadata.gz: 3c80d41900c8ee8653233e5b8e83c6a8ed1c366c018002b21b7fb88f23fce31843c880183bf41bf020ba7365e574ae1a6f1e74ecf610a8a91215667b18d029fb
7
+ data.tar.gz: 747eeb704d2f7c052205dd33905527913638d6f995e4326f28d80b3e9d11d371ae068c355e4e71a1561ac2de0df79d2a2d55ce780da1311c2410134dd94e77f7
data/Mavenfile CHANGED
@@ -7,17 +7,17 @@ plugin_repository :id => 'rubygems-releases', :url => 'http://rubygems-proxy.tor
7
7
 
8
8
  jruby_plugin( :minitest, :minispecDirectory => "specs/*_spec.rb" ) do
9
9
  execute_goals(:spec)
10
- gem 'ruby-maven', '3.1.1.0.8'
10
+ gem 'ruby-maven', '${ruby-maven.version}'
11
11
  end
12
12
 
13
- properties( 'jruby.versions' => ['1.7.12', '${jruby.version}', '9.0.0.0.pre1'
13
+ properties( 'jruby.versions' => ['1.7.12', '${jruby.version}', '9.0.0.0.pre2'
14
14
  ].join(','),
15
15
  'jruby.modes' => ['1.9', '2.0', '2.1'].join(','),
16
16
  # just lock the version
17
- 'jruby.version' => '1.7.19',
18
- 'jruby.plugins.version' => '1.0.9',
19
- 'tesla.dump.pom' => 'pom.xml',
20
- 'tesla.dump.readonly' => true )
17
+ 'bundler.version' => '1.9.2',
18
+ 'ruby-maven.version' => '3.1.1.0.11',
19
+ 'jruby.version' => '1.7.20',
20
+ 'jruby.plugins.version' => '1.0.9' )
21
21
 
22
22
  plugin :invoker, '1.8' do
23
23
  execute_goals( :install, :run,
@@ -30,10 +30,29 @@ plugin :invoker, '1.8' do
30
30
  :properties => { 'jar-dependencies.version' => '${project.version}',
31
31
  'jruby.version' => '${jruby.version}',
32
32
  'jruby.plugins.version' => '${jruby.plugins.version}',
33
- 'bundler.version' => '1.9.2',
34
- 'ruby-maven.version' => '3.1.1.0.11',
33
+ 'bundler.version' => '${bundler.version}',
34
+ 'ruby-maven.version' => '${ruby-maven.version}',
35
35
  # dump pom for the time being - for travis
36
36
  'polyglot.dump.pom' => 'pom.xml'})
37
37
  end
38
38
 
39
+ distribution_management do
40
+ repository :id => :ossrh, :url => 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
41
+
42
+ end
43
+
44
+ plugin :deploy, '2.8.2' do
45
+ execute_goal :deploy, :phase => :deploy, :id => 'deploy gem to maven central'
46
+ end
47
+
48
+ profile :id => :release do
49
+ properties 'maven.test.skip' => true, 'invoker.skip' => true
50
+ plugin :gpg, '1.5' do
51
+ execute_goal :sign, :id => 'sign artifacts', :phase => :verify
52
+ end
53
+ build do
54
+ default_goal :deploy
55
+ end
56
+ end
57
+
39
58
  # vim: syntax=Ruby
@@ -149,22 +149,10 @@ module Jars
149
149
  end
150
150
 
151
151
  def home
152
- if ( @_jars_home_ ||= nil ).nil?
153
- unless @_jars_home_ = absolute( to_prop( HOME ) )
154
- begin
155
- if user_settings = maven_user_settings
156
- @_jars_home_ = detect_local_repository(user_settings)
157
- end
158
- if ! @_jars_home_ && global_settings = maven_global_settings
159
- @_jars_home_ = detect_local_repository(global_settings)
160
- end
161
- rescue # ignore
162
- end
163
- end
164
- # use maven default repository
165
- @_jars_home_ ||= File.join( user_home, '.m2', 'repository' )
166
- end
167
- @_jars_home_
152
+ @_jars_home_ ||= absolute(to_prop(HOME)) ||
153
+ detect_local_repository(maven_user_settings) ||
154
+ detect_local_repository(maven_global_settings) ||
155
+ File.join( user_home, '.m2', 'repository' )
168
156
  end
169
157
 
170
158
  def require_jars_lock!( scope = :runtime )
@@ -227,6 +215,8 @@ module Jars
227
215
  end
228
216
 
229
217
  def detect_local_repository(settings)
218
+ return nil unless settings
219
+
230
220
  doc = File.read( settings )
231
221
  # TODO filter out xml comments
232
222
  local_repo = doc.sub( /<\/localRepository>.*/m, '' ).sub( /.*<localRepository>/m, '' )
@@ -238,6 +228,9 @@ module Jars
238
228
  local_repo = nil
239
229
  end
240
230
  local_repo
231
+ rescue
232
+ warn "error reading or parsing #{settings}"
233
+ nil
241
234
  end
242
235
 
243
236
  def to_jar( group_id, artifact_id, version, classifier = nil )
@@ -149,10 +149,16 @@ module Jars
149
149
 
150
150
  def has_jars?
151
151
  # first look if there are any requirements in the spec
152
- # and then if gem depends on jar-dependencies
152
+ # and then if gem depends on jar-dependencies for runtime.
153
153
  # only then install the jars declared in the requirements
154
- spec && ! spec.requirements.empty? &&
155
- spec.dependencies.detect { |d| d.name == 'jar-dependencies' && d.type == :runtime }
154
+ result = spec && ! spec.requirements.empty? &&
155
+ spec.dependencies.detect { |d| d.name == 'jar-dependencies' && d.type == :runtime } != nil
156
+ if result && spec.platform.to_s != 'java'
157
+ warn "\njar dependencies found on non-java platform gem - do not install jars\n"
158
+ false
159
+ else
160
+ result
161
+ end
156
162
  end
157
163
  alias_method :jars?, :has_jars?
158
164
 
data/lib/jars/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Jars
2
- VERSION = '0.1.13'.freeze
2
+ VERSION = '0.1.14'.freeze
3
3
  end
metadata CHANGED
@@ -1,57 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jar-dependencies
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.13
4
+ version: 0.1.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - christian meier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-20 00:00:00.000000000 Z
11
+ date: 2015-05-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
+ name: minitest
15
+ version_requirements: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '5.3'
14
20
  requirement: !ruby/object:Gem::Requirement
15
21
  requirements:
16
22
  - - ~>
17
23
  - !ruby/object:Gem::Version
18
24
  version: '5.3'
19
- name: minitest
20
25
  prerelease: false
21
26
  type: :development
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
22
29
  version_requirements: !ruby/object:Gem::Requirement
23
30
  requirements:
24
31
  - - ~>
25
32
  - !ruby/object:Gem::Version
26
- version: '5.3'
27
- - !ruby/object:Gem::Dependency
33
+ version: '10.2'
28
34
  requirement: !ruby/object:Gem::Requirement
29
35
  requirements:
30
36
  - - ~>
31
37
  - !ruby/object:Gem::Version
32
38
  version: '10.2'
33
- name: rake
34
39
  prerelease: false
35
40
  type: :development
41
+ - !ruby/object:Gem::Dependency
42
+ name: ruby-maven
36
43
  version_requirements: !ruby/object:Gem::Requirement
37
44
  requirements:
38
45
  - - ~>
39
46
  - !ruby/object:Gem::Version
40
- version: '10.2'
41
- - !ruby/object:Gem::Dependency
47
+ version: 3.1.1.0.11
42
48
  requirement: !ruby/object:Gem::Requirement
43
49
  requirements:
44
50
  - - ~>
45
51
  - !ruby/object:Gem::Version
46
52
  version: 3.1.1.0.11
47
- name: ruby-maven
48
53
  prerelease: false
49
54
  type: :development
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ~>
53
- - !ruby/object:Gem::Version
54
- version: 3.1.1.0.11
55
55
  description: manage jar dependencies for gems and keep track which jar was already loaded using maven artifact coordinates. it warns on version conflicts and loads only ONE jar assuming the first one is compatible to the second one otherwise your project needs to lock down the right version by providing a Jars.lock file.
56
56
  email:
57
57
  - mkristian@web.de
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
98
  version: '0'
99
99
  requirements: []
100
100
  rubyforge_project:
101
- rubygems_version: 2.1.9
101
+ rubygems_version: 2.4.6
102
102
  signing_key:
103
103
  specification_version: 4
104
104
  summary: manage jar dependencies for gems