jbundler 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/jbundle +25 -33
- data/lib/jbundler/dependency_pom.rb +4 -2
- data/lib/jbundler/lock_down.rb +31 -4
- data/lib/jbundler.jar +0 -0
- data/lib/jbundler.rb +4 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b80e3d23bf241019a06ab19e7420b8d5f19f60d0
|
4
|
+
data.tar.gz: 1201ee4b2f4848826b5597d7bfef605448ad8021
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db40392138c0bf75b2551a85c2e108c2510d2465d7f4fefa7a4cae80e8bdfcf4d3fd81019ded4fd5301d0530f984daf5ff251502805b2ba3e856ff3e0a621671
|
7
|
+
data.tar.gz: 313931856c7b2f97433df2bebaa89738661f934c1224073b40b84f203688c76a1ff23ade0072e9ed04619d977549e1ab5f60353f703e6b2d149568e22a3d518f
|
data/bin/jbundle
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
require 'rubygems'
|
3
|
-
# ensure we use the right version
|
4
|
-
gem 'ruby-maven', '>=3.1.0'
|
5
|
-
|
6
2
|
if ARGV[0] == 'help'
|
7
3
|
|
4
|
+
# ensure we use the right version
|
5
|
+
gem 'ruby-maven', '>=3.1.0'
|
6
|
+
|
8
7
|
require 'jbundler/cli'
|
9
8
|
|
10
9
|
JBundler::Cli.start
|
@@ -16,51 +15,44 @@ else
|
|
16
15
|
end
|
17
16
|
|
18
17
|
if ARGV[0] == 'console'
|
18
|
+
# ensure we use the right version
|
19
|
+
gem 'ruby-maven', '>=3.1.0'
|
20
|
+
|
19
21
|
require 'irb'
|
20
22
|
require 'jbundler'
|
21
23
|
require 'jbundler/lazy'
|
22
24
|
include JBundler::Lazy
|
23
|
-
end
|
24
25
|
|
25
|
-
|
26
|
-
|
26
|
+
ARGV.shift
|
27
|
+
require 'jbundler'
|
28
|
+
if defined? JBUNDLER_CLASSPATH
|
29
|
+
warn 'Jarfile dependencies loaded'
|
30
|
+
else
|
31
|
+
warn 'Could not locate a Jarfile'
|
32
|
+
end
|
33
|
+
|
34
|
+
IRB.start
|
35
|
+
|
36
|
+
else
|
37
|
+
if ['lock_down', 'install', 'update', 'show'].member?( ARGV[0] )
|
27
38
|
|
28
|
-
if ['lock_down', 'install', 'update', 'show', 'console'].member?( ARGV[0] )
|
29
|
-
begin
|
30
39
|
is_lock_down = ARGV.delete( 'lock_down' )
|
31
|
-
ARGV.delete( 0 ) if is_lock_down
|
32
40
|
is_vendor = ARGV.delete( '--vendor' )
|
33
|
-
is_debug = ARGV.delete( '--debug' )
|
34
|
-
is_verbose = ARGV.delete( '--verbose' )
|
41
|
+
is_debug = ARGV.delete( '--debug' )
|
35
42
|
ARGV.delete( '--skip-vendor' )
|
36
43
|
ARGV.delete( '--skip-debug' )
|
37
44
|
ARGV.delete( '--skip-verbose' )
|
38
|
-
|
45
|
+
|
39
46
|
load Gem.bin_path('bundler', 'bundle')
|
40
|
-
|
47
|
+
|
41
48
|
ARGV.insert( 0, 'lock_down' ) if is_lock_down
|
42
49
|
ARGV.insert( 1, '--debug' ) if is_debug
|
43
50
|
ARGV.insert( 1, '--vendor' ) if is_vendor
|
44
|
-
ARGV.insert( 1, '--verbose' ) if is_verbose
|
45
|
-
|
46
|
-
require 'jbundler/cli'
|
47
|
-
JBundler::Cli.start
|
48
|
-
rescue Exception => e
|
49
|
-
if ARGV[0] == 'console'
|
50
|
-
ARGV.shift
|
51
|
-
require 'jbundler'
|
52
|
-
if defined? JBUNDLER_CLASSPATH
|
53
|
-
warn 'Jarfile dependencies loaded'
|
54
|
-
else
|
55
|
-
warn 'Could not locate Jarfile'
|
56
|
-
|
57
|
-
end
|
58
|
-
IRB.start
|
59
|
-
else
|
60
|
-
raise e
|
61
|
-
end
|
62
51
|
end
|
63
|
-
|
52
|
+
|
53
|
+
# ensure we use the right version
|
54
|
+
gem 'ruby-maven', '>=3.1.0'
|
55
|
+
|
64
56
|
require 'jbundler/cli'
|
65
57
|
JBundler::Cli.start
|
66
58
|
end
|
@@ -9,10 +9,12 @@ if basedir != bdir
|
|
9
9
|
self.instance_variable_set( :@basedir, bdir )
|
10
10
|
end
|
11
11
|
|
12
|
-
gemfile( gfile ) if File.exists? gfile
|
13
|
-
|
14
12
|
jarfile( jfile, :skip_locked => true )
|
15
13
|
|
14
|
+
( 0..(java.lang.System.getProperty( "jbundler.jars.size" ).to_i - 1) ).each do |i|
|
15
|
+
dependency_artifact Maven::Tools::Artifact.from_coordinate( java.lang.System.getProperty( "jbundler.jars.#{i}" ).to_s )
|
16
|
+
end
|
17
|
+
|
16
18
|
build do
|
17
19
|
directory = jworkdir
|
18
20
|
end
|
data/lib/jbundler/lock_down.rb
CHANGED
@@ -3,6 +3,7 @@ require 'jbundler/classpath_file'
|
|
3
3
|
require 'jbundler/vendor'
|
4
4
|
require 'jbundler/gemfile_lock'
|
5
5
|
require 'jbundler/show'
|
6
|
+
require 'maven/tools/gemspec_dependencies'
|
6
7
|
require 'maven/tools/jarfile'
|
7
8
|
require 'maven/ruby/maven'
|
8
9
|
require 'fileutils'
|
@@ -123,16 +124,42 @@ module JBundler
|
|
123
124
|
m = Maven::Ruby::Maven.new
|
124
125
|
m.options[ '-f' ] = File.join( File.dirname( __FILE__ ),
|
125
126
|
'dependency_pom.rb' )
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
127
|
+
m.property( 'verbose', debug || verbose )
|
128
|
+
m.options[ '-q' ] = nil if !debug and !verbose
|
129
|
+
m.options[ '-e' ] = nil if !debug and verbose
|
130
|
+
m.options[ '-X' ] = nil if debug
|
130
131
|
m.verbose = debug
|
131
132
|
m.property( 'jbundler.outputFile', output )
|
132
133
|
|
133
134
|
@configurator.configure( m )
|
134
135
|
|
136
|
+
attach_jar_coordinates( m )
|
137
|
+
|
135
138
|
m.exec( 'dependency:list' )
|
136
139
|
end
|
140
|
+
|
141
|
+
private
|
142
|
+
|
143
|
+
def attach_jar_coordinates( maven )
|
144
|
+
load_path = $LOAD_PATH.dup
|
145
|
+
require 'bundler/setup'
|
146
|
+
done = []
|
147
|
+
index = 0
|
148
|
+
Gem.loaded_specs.each do |name, spec|
|
149
|
+
deps = Maven::Tools::GemspecDependencies.new( spec )
|
150
|
+
deps.java_dependency_artifacts.each do |a|
|
151
|
+
unless done.include? a.key
|
152
|
+
maven.property( "jbundler.jars.#{index}", a.to_s )
|
153
|
+
index += 1
|
154
|
+
done << a.key
|
155
|
+
end
|
156
|
+
end
|
157
|
+
end
|
158
|
+
if index > 0
|
159
|
+
maven.property( "jbundler.jars.size", index )
|
160
|
+
end
|
161
|
+
ensure
|
162
|
+
$LOAD_PATH.replace( load_path )
|
163
|
+
end
|
137
164
|
end
|
138
165
|
end
|
data/lib/jbundler.jar
CHANGED
Binary file
|
data/lib/jbundler.rb
CHANGED
@@ -37,7 +37,10 @@ module JBundler
|
|
37
37
|
context.gemfile_lock ) and
|
38
38
|
not context.vendor.vendored? )
|
39
39
|
|
40
|
-
warn '
|
40
|
+
warn ''
|
41
|
+
warn 'jar bundle is outdated - use jbundle install to update bundle'
|
42
|
+
warn ''
|
43
|
+
|
41
44
|
aether = JBundler::AetherRuby.new( context.config )
|
42
45
|
|
43
46
|
context.jarfile.populate_unlocked( aether )
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jbundler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christian Meier
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-maven
|
@@ -50,12 +50,12 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - ~>
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 0.0.
|
53
|
+
version: 0.0.6
|
54
54
|
requirement: !ruby/object:Gem::Requirement
|
55
55
|
requirements:
|
56
56
|
- - ~>
|
57
57
|
- !ruby/object:Gem::Version
|
58
|
-
version: 0.0.
|
58
|
+
version: 0.0.6
|
59
59
|
prerelease: false
|
60
60
|
type: :runtime
|
61
61
|
- !ruby/object:Gem::Dependency
|