This is an automated email from the ASF dual-hosted git repository. cdutz pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/plc4x.git
commit e45c8bf1d5275bd37864afc867c2f63e79adc0e5 Author: Till Voss <[email protected]> AuthorDate: Wed Aug 21 18:02:13 2019 +0200 naming stuff etc --- .../logstash-plugin/src/gem/lib/logstash-input-plc4x_jars.rb | 1 + .../logstash-plugin/src/gem/lib/logstash/inputs/plc4x.rb | 4 ++-- .../logstash-plugin/src/gem/logstash-input-plc4x.gemspec | 10 +++++----- .../org/apache/plc4x/logstash/{Plc4xInput.java => Plc4x.java} | 4 ++-- .../test/java/org/apache/plc4x/logstash/Plc4xInputTest.java | 6 +++--- plc4j/pom.xml | 1 - 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/plc4j/integrations/logstash-plugin/src/gem/lib/logstash-input-plc4x_jars.rb b/plc4j/integrations/logstash-plugin/src/gem/lib/logstash-input-plc4x_jars.rb index fed2279..e7950b2 100644 --- a/plc4j/integrations/logstash-plugin/src/gem/lib/logstash-input-plc4x_jars.rb +++ b/plc4j/integrations/logstash-plugin/src/gem/lib/logstash-input-plc4x_jars.rb @@ -18,4 +18,5 @@ # ---------------------------------------------------------------------------- require 'jar_dependencies' +# TODO replace 0.5.0 with version require_jar('${project.groupId}', 'logstash-input-plc4x', '0.5.0') \ No newline at end of file diff --git a/plc4j/integrations/logstash-plugin/src/gem/lib/logstash/inputs/plc4x.rb b/plc4j/integrations/logstash-plugin/src/gem/lib/logstash/inputs/plc4x.rb index 30b8b9b..8787aee 100644 --- a/plc4j/integrations/logstash-plugin/src/gem/lib/logstash/inputs/plc4x.rb +++ b/plc4j/integrations/logstash-plugin/src/gem/lib/logstash/inputs/plc4x.rb @@ -22,8 +22,8 @@ require 'logstash/namespace' require 'logstash-input-plc4x_jars' require 'java' -class LogStash::Inputs::Plc4xInput < LogStash::Inputs::Base +class LogStash::Inputs::Plc4jLogstashPlugin < LogStash::Inputs::Base config_name 'plc4x' - def self.javaClass() org.apache.plc4x.logstash.Plc4xInput.java_class; end + def self.javaClass() Java::org.apache.plc4x.logstash.Plc4x.java_class; end end diff --git a/plc4j/integrations/logstash-plugin/src/gem/logstash-input-plc4x.gemspec b/plc4j/integrations/logstash-plugin/src/gem/logstash-input-plc4x.gemspec index 90e85c4..a16567e 100644 --- a/plc4j/integrations/logstash-plugin/src/gem/logstash-input-plc4x.gemspec +++ b/plc4j/integrations/logstash-plugin/src/gem/logstash-input-plc4x.gemspec @@ -18,25 +18,25 @@ # ---------------------------------------------------------------------------- Gem::Specification.new do |s| - s.name = '${project.artifactId}' + s.name = 'logstash-input-plc4x' s.version = '${current-full-version}' s.licenses = ['Apache-2.0'] s.summary = '${project.name}' s.description = '${project.description}' s.authors = ['Apache Software Foundation'] - s.email = '[email protected]' + s.email = ['[email protected]'] s.homepage = 'http://plc4x.apache.org/index.html' s.require_paths = ['lib', 'vendor/jar-dependencies'] # Files - s.files = Dir['lib/**/*', '*.gemspec', 'vendor/jar-dependencies/**/*.jar'] + s.files = Dir["lib/**/*","*.gemspec","*.md","CONTRIBUTORS","Gemfile","LICENSE","NOTICE.TXT", "vendor/jar-dependencies/**/*.jar", "vendor/jar-dependencies/**/*.rb", "VERSION", "docs/**/*"] # Special flag to let us know this is actually a logstash plugin - s.metadata = { 'logstash_plugin' => 'true', 'logstash_group' => 'input'} + s.metadata = { 'logstash_plugin' => 'true', 'logstash_group' => 'input', 'java_plugin' => 'true'} # Gem dependencies + s.add_runtime_dependency 'logstash-core-plugin-api', '>= 1.60', '<= 2.99' s.add_runtime_dependency 'jar-dependencies', '~> 0' - s.add_development_dependency 'logstash-devutils', '~> 0' end \ No newline at end of file diff --git a/plc4j/integrations/logstash-plugin/src/main/java/org/apache/plc4x/logstash/Plc4xInput.java b/plc4j/integrations/logstash-plugin/src/main/java/org/apache/plc4x/logstash/Plc4x.java similarity index 98% rename from plc4j/integrations/logstash-plugin/src/main/java/org/apache/plc4x/logstash/Plc4xInput.java rename to plc4j/integrations/logstash-plugin/src/main/java/org/apache/plc4x/logstash/Plc4x.java index 5e36106..91e2c13 100644 --- a/plc4j/integrations/logstash-plugin/src/main/java/org/apache/plc4x/logstash/Plc4xInput.java +++ b/plc4j/integrations/logstash-plugin/src/main/java/org/apache/plc4x/logstash/Plc4x.java @@ -39,7 +39,7 @@ import java.util.function.Consumer; // class name must match plugin name @LogstashPlugin(name="plc4x") -public class Plc4xInput implements Input { +public class Plc4x implements Input { public static final PluginConfigSpec<Map<String, Object>> JOB_CONFIG = PluginConfigSpec.hashSetting("jobs"); @@ -57,7 +57,7 @@ public class Plc4xInput implements Input { private final CountDownLatch done = new CountDownLatch(1); // all plugins must provide a constructor that accepts id, Configuration, and Context - public Plc4xInput(String id, Configuration config, Context context) { + public Plc4x(String id, Configuration config, Context context) { // constructors should validate configuration options this.id = id; jobs = config.get(JOB_CONFIG); diff --git a/plc4j/integrations/logstash-plugin/src/test/java/org/apache/plc4x/logstash/Plc4xInputTest.java b/plc4j/integrations/logstash-plugin/src/test/java/org/apache/plc4x/logstash/Plc4xInputTest.java index 144c6c1..024a43b 100644 --- a/plc4j/integrations/logstash-plugin/src/test/java/org/apache/plc4x/logstash/Plc4xInputTest.java +++ b/plc4j/integrations/logstash-plugin/src/test/java/org/apache/plc4x/logstash/Plc4xInputTest.java @@ -40,12 +40,12 @@ public class Plc4xInputTest { jobValues.put("queries", queries); jobValues.put("sources", sources); - configValues.put(Plc4xInput.SOURCE_CONFIG.name(), Maps.newHashMap("TestConnection", "test:hurzpurzfurz")); - configValues.put(Plc4xInput.JOB_CONFIG.name(), Maps.newHashMap("job1", jobValues)); + configValues.put(Plc4x.SOURCE_CONFIG.name(), Maps.newHashMap("TestConnection", "test:hurzpurzfurz")); + configValues.put(Plc4x.JOB_CONFIG.name(), Maps.newHashMap("job1", jobValues)); Configuration config = new ConfigurationImpl(configValues); - Plc4xInput input = new Plc4xInput("test-id", config, null); + Plc4x input = new Plc4x("test-id", config, null); TestConsumer testConsumer = new TestConsumer(); input.start(testConsumer); diff --git a/plc4j/pom.xml b/plc4j/pom.xml index 5f1f374..8f85e15 100644 --- a/plc4j/pom.xml +++ b/plc4j/pom.xml @@ -252,7 +252,6 @@ <ignoredDependency>org.codehaus.groovy:groovy-test-junit5</ignoredDependency> <ignoredDependency>org.codehaus.groovy:groovy</ignoredDependency> <ignoredDependency>com.athaydes:spock-reports</ignoredDependency> - <ignoredDependency>org.apache.plc4x:plc4j-driver-simulated</ignoredDependency> </ignoredDependencies> </configuration> </execution>
