jar-dependencies 0.2.2 → 0.2.3

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: 4792c4d6bd31872ceda20216a0731b78ec12ffe1
4
- data.tar.gz: d87b5dcaa7942e50b4563548b4fdeb07eea89da8
3
+ metadata.gz: 53767c5745bde116c2f6cbf6b4c44247590ddfdb
4
+ data.tar.gz: d6bded82c09871123d5782102b1b6116bbd922fe
5
5
  SHA512:
6
- metadata.gz: dabd28099a91a7cf7fc45e54788defa80d73639ddfce69998713a33aced404a4eb69b3502dcaf739f1dd3d154cc1aa3c41ededb81435c8680c2cfad2005992d9
7
- data.tar.gz: 996b8b52713274079ad388d9be3ce64a3455f1bd4c69360f0612a8e937203c98a525f3d37613a98b4e65c65ba3fcef71e296157b8a212e6893351c0db8c7b3bd
6
+ metadata.gz: 33c19ed63947debdc596d5323baaba1a0c47888f0a9263ed6ef882496f312c627e95b7b5b04a1be1f7fc7c811823d803b532414db1b95a4a613bdd8a7f0d53f8
7
+ data.tar.gz: fd02f03753fe532f4289aa44f93678bbaf0428451b45b1c691ae7fd504f2fbaf0ed07fc3db3f323c06c7325a115a8bdd8361fe99dab3f93e5964eb330b2f7390
data/Mavenfile CHANGED
@@ -14,14 +14,14 @@ end
14
14
  pro = @model.profiles.detect { |p| p.id.to_sym == :gemfile } || @model
15
15
  ruby_maven = pro.dependencies.detect { |d| d.artifact_id == 'ruby-maven' }
16
16
 
17
- properties( 'jruby.versions' => ['1.7.12', '${jruby.version}', '9.0.1.0'
17
+ properties( 'jruby.versions' => ['1.7.12', '1.7.22', '${jruby.version}'
18
18
  ].join(','),
19
- 'jruby.modes' => ['1.9', '2.0', '2.1'].join(','),
19
+ 'jruby.modes' => ['1.9', '2.0', '2.2'].join(','),
20
20
  # just lock the version
21
21
  'bundler.version' => '1.9.2',
22
22
  'ruby-maven.version' => ruby_maven.version,
23
- 'jruby.version' => '1.7.22',
24
- 'jruby.plugins.version' => '1.0.9',
23
+ 'jruby.version' => '9.0.3.0',
24
+ 'jruby.plugins.version' => '1.1.2',
25
25
  'push.skip' => true )
26
26
 
27
27
  plugin :invoker, '1.8' do
@@ -38,13 +38,15 @@ module Jars
38
38
 
39
39
  def attach_jar_coordinates_from_bundler_dependencies( maven )
40
40
  load_path = $LOAD_PATH.dup
41
- require 'bundler/setup'
41
+ require 'bundler'
42
+ #TODO make this group a commandline option
43
+ Bundler.setup( 'default' )
42
44
  done = []
43
45
  index = 0
44
46
  Gem.loaded_specs.each do |name, spec|
45
47
  deps = GemspecArtifacts.new( spec )
46
48
  deps.artifacts.each do |a|
47
- unless done.include? a.key
49
+ if !done.include?( a.key ) and a.scope != 'provided' and a.scope != 'test'
48
50
  maven.property( "jars.#{index}", a.to_coord )
49
51
  if a.exclusions
50
52
  jndex = 0
@@ -58,13 +60,17 @@ module Jars
58
60
  end
59
61
  end
60
62
  end
63
+ rescue Gem::LoadError => e
64
+ # not sure why to reraise the exception
65
+ raise e
61
66
  rescue LoadError => e
62
67
  if Jars.verbose?
63
68
  warn e.message
64
69
  warn "no bundler found - ignore Gemfile if exists"
65
70
  end
66
- rescue SystemExit
67
- # we want to continue
71
+ rescue Bundler::GemNotFound => e
72
+ warn "can not setup bundler with #{Bundler.default_lockfile}"
73
+ raise e
68
74
  ensure
69
75
  $LOAD_PATH.replace( load_path )
70
76
  end
@@ -10,6 +10,7 @@ module Jars
10
10
  @options.delete( :ignore_dependencies )
11
11
  @debug = debug
12
12
  @verbose = verbose
13
+ @installed_maven = false
13
14
  end
14
15
 
15
16
  def maven_new( pom )
@@ -58,6 +59,14 @@ module Jars
58
59
  def lazy_load_maven
59
60
  add_gem_to_load_path( 'ruby-maven' )
60
61
  add_gem_to_load_path( 'ruby-maven-libs' )
62
+ if @installed_maven
63
+ puts
64
+ puts 'using maven for the first time results in maven'
65
+ puts 'downloading all its default plugin and can take time.'
66
+ puts 'as those plugins get cached on disk and further execution'
67
+ puts 'of maven is much faster then the first time.'
68
+ puts
69
+ end
61
70
  require 'maven/ruby/maven'
62
71
  end
63
72
 
@@ -89,6 +98,7 @@ module Jars
89
98
  end
90
99
 
91
100
  def install_gem( name, req )
101
+ @installed_maven = true
92
102
  puts "Installing gem '#{name}' . . ."
93
103
  require 'rubygems/dependency_installer'
94
104
  inst = Gem::DependencyInstaller.new( @options ||= {} )
@@ -98,7 +108,7 @@ module Jars
98
108
  warn "#{e.inspect}"
99
109
  warn e.backtrace.join( "\n" )
100
110
  end
101
- raise "there was an error installing '#{name} (#{req})' #{@option[:domain]}. please install it manually: #{e.inspect}"
111
+ raise "there was an error installing '#{name} (#{req})' #{@options[:domain]}. please install it manually: #{e.inspect}"
102
112
  end
103
113
  end
104
114
  end
data/lib/jars/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Jars
2
- VERSION = '0.2.2'.freeze
3
- JRUBY_PLUGINS_VERSION = '1.0.10'.freeze
2
+ VERSION = '0.2.3'.freeze
3
+ JRUBY_PLUGINS_VERSION = '1.1.2'.freeze
4
4
  DEPENDENCY_PLUGIN_VERSION = '2.8'.freeze
5
5
  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.2.2
4
+ version: 0.2.3
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-09-16 00:00:00.000000000 Z
11
+ date: 2015-10-22 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.3.3
42
48
  requirement: !ruby/object:Gem::Requirement
43
49
  requirements:
44
- - - ~>
50
+ - - "~>"
45
51
  - !ruby/object:Gem::Version
46
52
  version: 3.3.3
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.3.3
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
@@ -96,12 +96,12 @@ require_paths:
96
96
  - lib
97
97
  required_ruby_version: !ruby/object:Gem::Requirement
98
98
  requirements:
99
- - - '>='
99
+ - - ">="
100
100
  - !ruby/object:Gem::Version
101
101
  version: '0'
102
102
  required_rubygems_version: !ruby/object:Gem::Requirement
103
103
  requirements:
104
- - - '>='
104
+ - - ">="
105
105
  - !ruby/object:Gem::Version
106
106
  version: '0'
107
107
  requirements: []