jar-dependencies 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Mavenfile +1 -2
- data/lib/jar_dependencies.rb +17 -11
- data/lib/jars/installer.rb +2 -2
- data/lib/jars/maven_exec.rb +13 -6
- data/lib/jars/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8046f88d8efe9b20de38785a7f2ba5b9cafc963
|
4
|
+
data.tar.gz: dcb3af6f3d1763359e5a00386582a37ebd1963c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2bd6d2d4eb6139407e04d67956643b34d60e9110baa6a769d16d2cfbc7a5e7ad586b0b84fd631cafcf7becd643bff5ee8611e046ee41faf642af732507dfba2
|
7
|
+
data.tar.gz: 8f52b67493e13f75cfbe93507fcfa3199631883ef05b9971de0b87f9294f0b84126725e4e5aadb709843c013109be78ebf33aa7fe9f22393693a7aa9e305da43
|
data/Mavenfile
CHANGED
@@ -10,8 +10,7 @@ jruby_plugin( :minitest, :minispecDirectory => "specs/*_spec.rb" ) do
|
|
10
10
|
gem 'ruby-maven', '3.1.1.0.8'
|
11
11
|
end
|
12
12
|
|
13
|
-
|
14
|
-
properties( 'jruby.versions' => ['1.6.8', '1.7.12', '${jruby.version}', '9.0.0.0.pre1'
|
13
|
+
properties( 'jruby.versions' => ['1.7.12', '${jruby.version}', '9.0.0.0.pre1'
|
15
14
|
].join(','),
|
16
15
|
'jruby.modes' => ['1.9', '2.0', '2.1'].join(','),
|
17
16
|
# just lock the version
|
data/lib/jar_dependencies.rb
CHANGED
@@ -48,18 +48,19 @@ module Jars
|
|
48
48
|
|
49
49
|
if defined? JRUBY_VERSION
|
50
50
|
def to_prop( key )
|
51
|
-
|
52
|
-
|
51
|
+
key = key.gsub( '_', '.' )
|
52
|
+
ENV_JAVA[ ( key.downcase!; key ) ] ||
|
53
|
+
ENV[ ( key.gsub!( '.', '_' ); key.upcase!; key ) ]
|
53
54
|
end
|
54
55
|
else
|
55
56
|
def to_prop( key )
|
56
|
-
ENV[ key.
|
57
|
+
ENV[ key.gsub( '.', '_' ).upcase ]
|
57
58
|
end
|
58
59
|
end
|
59
60
|
|
60
61
|
def to_boolean( key )
|
61
62
|
prop = to_prop( key )
|
62
|
-
prop
|
63
|
+
! prop.nil? && ( prop.empty? || prop.eql?('true') )
|
63
64
|
end
|
64
65
|
|
65
66
|
def skip?
|
@@ -67,11 +68,11 @@ module Jars
|
|
67
68
|
end
|
68
69
|
|
69
70
|
def no_require?
|
70
|
-
@frozen || to_boolean( NO_REQUIRE )
|
71
|
+
( @frozen ||= false ) || to_boolean( NO_REQUIRE )
|
71
72
|
end
|
72
73
|
|
73
74
|
def quiet?
|
74
|
-
@silent || to_boolean( QUIET )
|
75
|
+
( @silent ||= false ) || to_boolean( QUIET )
|
75
76
|
end
|
76
77
|
|
77
78
|
def verbose?
|
@@ -112,9 +113,11 @@ module Jars
|
|
112
113
|
end
|
113
114
|
|
114
115
|
def maven_user_settings
|
115
|
-
|
116
|
+
unless instance_variable_defined?(:@_jars_maven_user_settings_)
|
117
|
+
@_jars_maven_user_settings_ = nil
|
118
|
+
end
|
119
|
+
if ( @_jars_maven_user_settings_ ||= nil ).nil?
|
116
120
|
if settings = absolute( to_prop( MAVEN_SETTINGS ) )
|
117
|
-
settings = File.expand_path(settings)
|
118
121
|
unless File.exists?(settings)
|
119
122
|
warn "configured ENV['#{MAVEN_SETTINGS}'] = '#{settings}' not found" unless quiet?
|
120
123
|
settings = false
|
@@ -130,6 +133,9 @@ module Jars
|
|
130
133
|
alias maven_settings maven_user_settings
|
131
134
|
|
132
135
|
def maven_global_settings
|
136
|
+
unless instance_variable_defined?(:@_jars_maven_global_settings_)
|
137
|
+
@_jars_maven_global_settings_ = nil
|
138
|
+
end
|
133
139
|
if @_jars_maven_global_settings_.nil?
|
134
140
|
if mvn_home = ENV[ 'M2_HOME' ] || ENV[ 'MAVEN_HOME' ]
|
135
141
|
settings = File.join( mvn_home, 'conf/settings.xml' )
|
@@ -143,7 +149,7 @@ module Jars
|
|
143
149
|
end
|
144
150
|
|
145
151
|
def home
|
146
|
-
if @_jars_home_.nil?
|
152
|
+
if ( @_jars_home_ ||= nil ).nil?
|
147
153
|
unless @_jars_home_ = absolute( to_prop( HOME ) )
|
148
154
|
begin
|
149
155
|
if user_settings = maven_user_settings
|
@@ -169,7 +175,7 @@ module Jars
|
|
169
175
|
if jars_lock = classpath.jars_lock
|
170
176
|
@@jars_lock = jars_lock
|
171
177
|
classpath.require( scope )
|
172
|
-
|
178
|
+
no_more_warnings
|
173
179
|
end
|
174
180
|
end
|
175
181
|
|
@@ -229,7 +235,7 @@ module Jars
|
|
229
235
|
ENV_JAVA[ a[2..-2] ] || a
|
230
236
|
end
|
231
237
|
if local_repo.empty? or not File.exists?( local_repo )
|
232
|
-
local_repo = nil
|
238
|
+
local_repo = nil
|
233
239
|
end
|
234
240
|
local_repo
|
235
241
|
end
|
data/lib/jars/installer.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'jar_dependencies'
|
2
2
|
require 'jars/maven_exec'
|
3
|
-
|
3
|
+
|
4
4
|
module Jars
|
5
5
|
class Installer
|
6
6
|
|
@@ -183,5 +183,5 @@ module Jars
|
|
183
183
|
end
|
184
184
|
end
|
185
185
|
# to stay backward compatible
|
186
|
-
JarInstaller = Installer
|
186
|
+
JarInstaller = Installer unless defined? JarInstaller
|
187
187
|
end
|
data/lib/jars/maven_exec.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'jar_dependencies'
|
2
|
-
|
2
|
+
|
3
3
|
module Jars
|
4
4
|
class MavenExec
|
5
5
|
|
@@ -78,9 +78,9 @@ module Jars
|
|
78
78
|
end
|
79
79
|
|
80
80
|
def setup_arguments( pom, *goals )
|
81
|
-
args = [ *goals,
|
82
|
-
'-DoutputAbsoluteArtifactFilename=true',
|
83
|
-
'-DincludeTypes=jar',
|
81
|
+
args = [ *goals,
|
82
|
+
'-DoutputAbsoluteArtifactFilename=true',
|
83
|
+
'-DincludeTypes=jar',
|
84
84
|
'-DoutputScope=true',
|
85
85
|
'-DuseRepositoryLayout=true',
|
86
86
|
"-DoutputDirectory=#{Jars.home}",
|
@@ -93,13 +93,20 @@ module Jars
|
|
93
93
|
args << '--quiet'
|
94
94
|
end
|
95
95
|
|
96
|
-
|
97
|
-
|
96
|
+
# TODO what todo with https proxy ?
|
97
|
+
# FIX this proxy settings seems not to work
|
98
|
+
if (proxy = Gem.configuration[ :http_proxy ]).is_a?( String )
|
99
|
+
require 'uri'; uri = URI.parse( proxy )
|
98
100
|
args << "-DproxySet=true"
|
99
101
|
args << "-DproxyHost=#{uri.host}"
|
100
102
|
args << "-DproxyPort=#{uri.port}"
|
101
103
|
end
|
102
104
|
|
105
|
+
if Jars.maven_settings
|
106
|
+
args << '-s'
|
107
|
+
args << Jars.maven_settings
|
108
|
+
end
|
109
|
+
|
103
110
|
args << "-Dmaven.repo.local=#{java.io.File.new( Jars.local_maven_repo ).absolute_path}"
|
104
111
|
|
105
112
|
args
|
data/lib/jars/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jar-dependencies
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
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-
|
11
|
+
date: 2015-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|