# Custom the logstash java-Filter meet problem(cannot create task "gem")

**URL:** https://discuss.elastic.co/t/custom-the-logstash-java-filter-meet-problem-cannot-create-task-gem/253774
**Category:** Logstash
**Created:** [October 30, 2020, 6:32am UTC](https://discuss.elastic.co/t/custom-the-logstash-java-filter-meet-problem-cannot-create-task-gem/253774 "2020-10-30T06:32:13Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![xiaoping1993](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xiaoping1993/32/77996_2.png) [@xiaoping1993](https://discuss.elastic.co/u/xiaoping1993)
#### Post date: [October 30, 2020, 6:32am UTC](https://discuss.elastic.co/t/custom-the-logstash-java-filter-meet-problem-cannot-create-task-gem/253774/1 "2020-10-30T06:32:13Z")

</div>

I want to custom the logstash java-Filter follow the url:[https://www.elastic.co/guide/en/logstash/7.6/java-filter-plugin.html](https://www.elastic.co/guide/en/logstash/7.6/java-filter-plugin.html)

but I meet a problem when I run "gradlew gem"  
the error is below  
 ![e9b2890554e42d2a74d5ab1b64e986f](https://us1.discourse-cdn.com/elastic/original/3X/2/1/21c936396274b6e4f4a99ca4a38854aa821eb8cd.png)

---

<div class="post-metadata">

### Author: ![xiaoping1993](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/xiaoping1993/32/77996_2.png) [@xiaoping1993](https://discuss.elastic.co/u/xiaoping1993)
#### Post date: [October 30, 2020, 11:45pm UTC](https://discuss.elastic.co/t/custom-the-logstash-java-filter-meet-problem-cannot-create-task-gem/253774/2 "2020-10-30T23:45:56Z")

</div>

this problem have be resovled!!!!  
just to modiy the configuration file:build.gradle  
use  
tasks.register("gem"){  
dependsOn downloadAndInstallJRuby  
dependsOn removeObsoleteJars  
dependsOn vendor  
dependsOn generateRubySupportFiles  
doLast {  
buildGem(projectDir, buildDir, pluginInfo.pluginFullName() + ".gemspec")  
}  
}  
replace  
tasks.register("gem"){  
dependsOn [downloadAndInstallJRuby,removeObsoleteJars,vendor,generateRubySupportFiles]  
doLast {  
buildGem(projectDir, buildDir, pluginInfo.pluginFullName() + ".gemspec")  
}

---

<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: [November 27, 2020, 11:45pm UTC](https://discuss.elastic.co/t/custom-the-logstash-java-filter-meet-problem-cannot-create-task-gem/253774/3 "2020-11-27T23:45:59Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
