jar-dependencies 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Readme.md +9 -0
- data/bin/bundle-with-jars +1 -6
- data/jar-dependencies.gemspec +1 -1
- data/lib/jar_install_post_install_hook.rb +32 -0
- data/lib/rubygems_plugin.rb +1 -9
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a75e3039064c441fe8524357bbbdc3d7caca4c82
|
4
|
+
data.tar.gz: 07c4e7827bf5c7285c7d6dc294d11239946f8658
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e74527c71109fd5e04b9b5707033bae51d1de8ae64c2499acebfe4a00e596f459409163d590a1439f50d5c4fa30124dfbaeb6be21a8be504e2310f44453b800
|
7
|
+
data.tar.gz: 7cdf79275bd10df5ea9c5ca45a964aed59aca6cc62f5aaedd3e2c96e0b40df78249674a3a0afad77a8f8150e3d065e5c5b5dff8554a0816b7520192f76230747
|
data/Readme.md
CHANGED
@@ -50,6 +50,12 @@ this tells the jar_installer not vendor any jars but only create the file with t
|
|
50
50
|
* bundler does not install the jar-dependencies (unless JRuby adds the gem as default gem)
|
51
51
|
* you need ruby-maven doing the job of dependency resolution and downloading them. gems not part of <http://rubygems.org> will not work currently
|
52
52
|
|
53
|
+
## jar others then from maven-central ##
|
54
|
+
|
55
|
+
per default all jars need to come from maven-central (<search.maven.org>), in order to use jars from any other repo you need to add it into your settings.xml and configure it in a way that you use it without interactive prompt (username + passwords needs to be part of settings.xml).
|
56
|
+
|
57
|
+
**NOTE:** gems depending on jars other then maven-central will **NOT** work when they get published on rubygems.org since the user of those gems will not have the right settings.xml to allow them to access the jar dependencies.
|
58
|
+
|
53
59
|
## just look at the example ##
|
54
60
|
|
55
61
|
the [readme.md](example/Readme.md) walks you through an example and shows how development works and shows what happens during installation.
|
@@ -75,6 +81,9 @@ the [readme.md](example/Readme.md) walks you through an example and shows how de
|
|
75
81
|
<tr>
|
76
82
|
<td>`JARS_VENDOR`</td><td>jars.vendor</td><td>true</td><td>set to true means that the jars will be stored in JARS_HOME only</td>
|
77
83
|
</tr>
|
84
|
+
<tr>
|
85
|
+
<td>`JARS_SKIP`</td><td>jars.skip</td><td>true</td><td>do **NOT** install jar dependencies at all</td>
|
86
|
+
</tr>
|
78
87
|
</table>
|
79
88
|
|
80
89
|
# motivation #
|
data/bin/bundle-with-jars
CHANGED
@@ -1,10 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'rubygems'
|
3
|
-
|
4
|
-
Gem.post_install do |gem_installer|
|
5
|
-
require 'jar_installer'
|
6
|
-
::JarInstaller.new( gem_installer.spec ).vendor_jars
|
7
|
-
end
|
8
|
-
end
|
3
|
+
require 'jar_install_post_install_hook'
|
9
4
|
|
10
5
|
load Gem.bin_path('bundler', 'bundle')
|
data/jar-dependencies.gemspec
CHANGED
@@ -0,0 +1,32 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2014 Christian Meier
|
3
|
+
#
|
4
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
5
|
+
# this software and associated documentation files (the "Software"), to deal in
|
6
|
+
# the Software without restriction, including without limitation the rights to
|
7
|
+
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
8
|
+
# the Software, and to permit persons to whom the Software is furnished to do so,
|
9
|
+
# subject to the following conditions:
|
10
|
+
#
|
11
|
+
# The above copyright notice and this permission notice shall be included in all
|
12
|
+
# copies or substantial portions of the Software.
|
13
|
+
#
|
14
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
15
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
16
|
+
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
17
|
+
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
18
|
+
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
19
|
+
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
20
|
+
#
|
21
|
+
|
22
|
+
if defined?( JRUBY_VERSION ) && Gem.post_install_hooks.empty?
|
23
|
+
Gem.post_install do |gem_installer|
|
24
|
+
require 'jar_installer'
|
25
|
+
unless (ENV['JARS_SKIP'] || java.lang.System.get_property('jars.skip')) == 'true'
|
26
|
+
|
27
|
+
jars = Jars::JarInstaller.new( gem_installer.spec )
|
28
|
+
jars.ruby_maven_install_options = gem_installer.options || {}
|
29
|
+
jars.vendor_jars
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/lib/rubygems_plugin.rb
CHANGED
@@ -18,12 +18,4 @@
|
|
18
18
|
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
19
19
|
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
20
20
|
#
|
21
|
-
|
22
|
-
if defined?( JRUBY_VERSION ) && Gem.post_install_hooks.empty?
|
23
|
-
Gem.post_install do |gem_installer|
|
24
|
-
require 'jar_installer'
|
25
|
-
jars = Jars::JarInstaller.new( gem_installer.spec )
|
26
|
-
jars.ruby_maven_install_options = gem_installer.options || {}
|
27
|
-
jars.vendor_jars
|
28
|
-
end
|
29
|
-
end
|
21
|
+
require 'jar_install_post_install_hook'
|
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.0.
|
4
|
+
version: 0.0.7
|
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-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -46,6 +46,7 @@ executables:
|
|
46
46
|
extensions: []
|
47
47
|
extra_rdoc_files: []
|
48
48
|
files:
|
49
|
+
- lib/jar_install_post_install_hook.rb
|
49
50
|
- lib/jar_dependencies.rb
|
50
51
|
- lib/jar_installer.rb
|
51
52
|
- lib/jar-dependencies.rb
|