# How to build logstash into a jar

**URL:** <https://discuss.elastic.co/t/how-to-build-logstash-into-a-jar/29617>\
**Category:** Logstash\
**Created:** [September 19, 2015, 1:22am UTC](https://discuss.elastic.co/t/how-to-build-logstash-into-a-jar/29617 "2015-09-19T01:22:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![neutronsharc](https://avatars.discourse-cdn.com/v4/letter/n/bbe5ce/32.png) [@neutronsharc](https://discuss.elastic.co/u/neutronsharc)\
**Post date:** [September 19, 2015, 1:22am UTC](https://discuss.elastic.co/t/how-to-build-logstash-into-a-jar/29617/1 "2015-09-19T01:22:15Z")

</div>

Hi all, I want to build logstash into a jar, and deploy this jar to my cluster. I found "warble" to be able to build jruby code into jar. I managed to get logstash.jar using warble, but when I run the jar file I got this error (bin/bundle is missing...) :

Any help ? Thanks!

$ java -jar ./hcd\_logstash.jar -f ./test1.conf  
LoadError: no such file to load -- hcd\_logstash/bin/bundle  
load at org/jruby/RubyKernel.java:1059  
(root) at file:/Users/shawn/codelab/hcd\_logstash/hcd\_logstash.jar!/META-INF/main.rb:1  
require at org/jruby/RubyKernel.java:1040  
(root) at /var/folders/rc/49k763cs3yn3d242qb3yfl2r0000gn/T/jruby5771743501305508191extract/jruby-stdlib-1.7.22.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core\_ext/kernel\_require.rb:1  
require at /var/folders/rc/49k763cs3yn3d242qb3yfl2r0000gn/T/jruby5771743501305508191extract/jruby-stdlib-1.7.22.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/core\_ext/kernel\_require.rb:54  
ERROR: org.jruby.embed.EvalFailedException: (LoadError) no such file to load -- hcd\_logstash/bin/bundle

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [September 29, 2015, 9:09am UTC](https://discuss.elastic.co/t/how-to-build-logstash-into-a-jar/29617/2 "2015-09-29T09:09:06Z")

</div>

This is not currently a supported deployment model.

---

<div class="post-metadata">

**Author:** ![palmerabollo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/palmerabollo/32/44772_2.png) [@palmerabollo](https://discuss.elastic.co/u/palmerabollo)\
**Post date:** [February 16, 2016, 9:18am UTC](https://discuss.elastic.co/t/how-to-build-logstash-into-a-jar/29617/3 "2016-02-16T09:18:57Z")

</div>

Even when it is not a supported deployment model, I am wondering whether it is possible to reuse parts of logstash code in other projects.

My intention is to reuse the grok parser code (from logstash-plugins/logstash-filter-grok) in other parts of a project I need to make compatible with logstash. Is that something doable? Any pointers would be much appreciated.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 5:11am UTC](https://discuss.elastic.co/t/how-to-build-logstash-into-a-jar/29617/4 "2017-07-06T05:11:16Z")

</div>


