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 +4 -4
- data/Mavenfile +4 -4
- data/lib/jars/lock_down.rb +10 -4
- data/lib/jars/maven_factory.rb +11 -1
- data/lib/jars/version.rb +2 -2
- metadata +21 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53767c5745bde116c2f6cbf6b4c44247590ddfdb
|
4
|
+
data.tar.gz: d6bded82c09871123d5782102b1b6116bbd922fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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}'
|
17
|
+
properties( 'jruby.versions' => ['1.7.12', '1.7.22', '${jruby.version}'
|
18
18
|
].join(','),
|
19
|
-
'jruby.modes' => ['1.9', '2.0', '2.
|
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' => '
|
24
|
-
'jruby.plugins.version' => '1.
|
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
|
data/lib/jars/lock_down.rb
CHANGED
@@ -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
|
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
|
-
|
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
|
67
|
-
|
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
|
data/lib/jars/maven_factory.rb
CHANGED
@@ -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})' #{@
|
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
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.
|
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-
|
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: '
|
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:
|
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: []
|