Skip to content

Commit

Permalink
Use jbundler to managing jar dependencies. Yes, finally. Closes #418
Browse files Browse the repository at this point in the history
  • Loading branch information
jazzido committed Aug 2, 2017
1 parent 5874899 commit d74e63b
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 15 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ platform :jruby do
gem "tilt", "~> 2.0.7"

group :development do
gem 'jbundler', '~> 0.9.3'
gem "rake"
gem "warbler", "~> 2.0.3"
gem "jruby-jars", "9.1.12.0"
Expand Down
50 changes: 39 additions & 11 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
GEM
remote: https://rubygems.org/
specs:
axiom-types (0.1.1)
descendants_tracker (~> 0.0.4)
ice_nine (~> 0.11.0)
thread_safe (~> 0.3, >= 0.3.1)
bootstrap-sass (3.2.0.2)
sass (~> 3.2)
chunky_png (1.3.5)
chunky_png (1.3.8)
coercible (1.0.0)
descendants_tracker (~> 0.0.1)
compass (1.0.3)
chunky_png (~> 1.2)
compass-core (~> 1.0.2)
Expand All @@ -18,19 +24,40 @@ GEM
sass (>= 3.2, < 3.5)
cuba (3.8.1)
rack (>= 1.6.0)
ffi (1.9.10-java)
descendants_tracker (0.0.4)
thread_safe (~> 0.3, >= 0.3.1)
equalizer (0.0.11)
ffi (1.9.18-java)
ice_nine (0.11.2)
jar-dependencies (0.3.11)
jbundler (0.9.3)
bundler (~> 1.5)
jar-dependencies (~> 0.3)
maven-tools (~> 1.1)
ruby-maven (~> 3.3, >= 3.3.8)
jruby-jars (9.1.12.0)
jruby-rack (1.1.20)
multi_json (1.11.2)
maven-tools (1.1.6)
virtus (~> 1.0)
multi_json (1.12.1)
rack (2.0.3)
rake (10.5.0)
rb-fsevent (0.9.7)
rb-inotify (0.9.7)
ffi (>= 0.5.0)
rubyzip (1.2.0)
sass (3.4.21)
tilt (2.0.7)
warbler (2.0.3)
rake (12.0.0)
rb-fsevent (0.10.2)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
ruby-maven (3.3.12)
ruby-maven-libs (~> 3.3.9)
ruby-maven-libs (3.3.9)
rubyzip (1.2.1)
sass (3.4.25)
thread_safe (0.3.6-java)
tilt (2.0.8)
virtus (1.0.5)
axiom-types (~> 0.1)
coercible (~> 1.0)
descendants_tracker (~> 0.0, >= 0.0.3)
equalizer (~> 0.0, >= 0.0.9)
warbler (2.0.4)
jruby-jars (>= 9.0.0.0)
jruby-rack (>= 1.1.1, < 1.3)
rake (>= 10.1.0)
Expand All @@ -43,6 +70,7 @@ DEPENDENCIES
bootstrap-sass (~> 3.2.0)
compass
cuba (~> 3.8.1)
jbundler (~> 0.9.3)
jruby-jars (= 9.1.12.0)
rack (~> 2.0.3)
rake
Expand Down
1 change: 1 addition & 0 deletions Jarfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
jar 'technology.tabula:tabula', '1.0.0'
20 changes: 20 additions & 0 deletions Jarfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
:runtime:
- technology.tabula:tabula:jar:1.0.0
- org.apache.pdfbox:pdfbox-tools:jar:2.0.7
- org.apache.commons:commons-csv:jar:1.4
- commons-cli:commons-cli:jar:1.4
- org.bouncycastle:bcprov-jdk15on:jar:1.56
- jline:jline:jar:2.11
- org.slf4j:slf4j-simple:jar:1.7.25
- org.bouncycastle:bcmail-jdk15on:jar:1.56
- org.apache.pdfbox:fontbox:jar:2.0.7
- org.bouncycastle:bcpkix-jdk15on:jar:1.56
- org.slf4j:slf4j-api:jar:1.7.25
- commons-logging:commons-logging:jar:1.2
- com.google.code.gson:gson:jar:2.8.0
- org.yaml:snakeyaml:jar:1.18
- org.apache.pdfbox:pdfbox:jar:2.0.7
- net.sf.jsi:jsi:jar:1.1.0-SNAPSHOT
- org.apache.pdfbox:pdfbox-debugger:jar:2.0.7
- net.sf.trove4j:trove4j:jar:3.0.3
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,12 @@ Tabula has bindings for JRuby and R. If you end up writing bindings for another
gem install bundler
bundle install
jruby -S jbundle install
~~~

**Then, start the development server:**

jruby -G -S rackup
jruby -G -r jbundler -S rackup

(If you get encoding errors, set the `JAVA_OPTS` environment variable to `-Dfile.encoding=utf-8`)

Expand All @@ -169,7 +170,7 @@ You can a couple some options when executing the server in this manner:

TABULA_DATA_DIR="/tmp/tabula" \
TABULA_DEBUG=1 \
jruby -G -S rackup
jruby -G -r jbundler -S rackup

* `TABULA_DATA_DIR` controls where uploaded data for Tabula is stored. By default,
data is stored in the OS-dependent application data directory for the current
Expand Down
Binary file removed lib/jars/tabula-1.0.0-jar-with-dependencies.jar
Binary file not shown.
2 changes: 0 additions & 2 deletions webapp/tabula_web.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
require 'fileutils'
require 'securerandom'

require_relative '../lib/jars/tabula-1.0.0-jar-with-dependencies.jar'

require_relative '../lib/tabula_java_wrapper.rb'
java_import 'java.io.ByteArrayOutputStream'
java_import 'java.util.zip.ZipEntry'
Expand Down

0 comments on commit d74e63b

Please sign in to comment.