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 bc8fb8eceb208cb4cd56ce99299468b18d7bd81d Author: Christofer Dutz <[email protected]> AuthorDate: Wed Aug 21 14:09:37 2019 +0200 - Migrated the gem and juby build to jgem and jruby which is downloaded as part of the build. --- plc4j/integrations/logstash-plugin/pom.xml | 30 ++++++++++++++++++++++++++++-- src/main/script/prerequisiteCheck.groovy | 8 ++++---- 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/plc4j/integrations/logstash-plugin/pom.xml b/plc4j/integrations/logstash-plugin/pom.xml index b8ea0c0..666f5b3 100644 --- a/plc4j/integrations/logstash-plugin/pom.xml +++ b/plc4j/integrations/logstash-plugin/pom.xml @@ -33,8 +33,32 @@ <name>PLC4J: Integrations: Logstash plugin</name> <description>Integration module for integrating PLC4X into Elastic Logstash.</description> + <properties> + <jruby.version>9.2.8.0</jruby.version> + </properties> <build> <plugins> + <plugin> + <groupId>com.googlecode.maven-download-plugin</groupId> + <artifactId>download-maven-plugin</artifactId> + <version>1.4.1</version> + <executions> + <execution> + <id>get-jruby</id> + <!-- Only execute this for the parent module --> + <inherited>false</inherited> + <phase>generate-resources</phase> + <goals> + <goal>wget</goal> + </goals> + <configuration> + <url>https://repo1.maven.org/maven2/org/jruby/jruby-dist/${jruby.version}/jruby-dist-${jruby.version}-bin.tar.gz</url> + <unpack>true</unpack> + <outputDirectory>${project.build.directory}/jruby</outputDirectory> + </configuration> + </execution> + </executions> + </plugin> <!-- Prepare the gemspec file containing the project information --> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -92,11 +116,13 @@ <goal>exec</goal> </goals> <configuration> - <executable>gem</executable> + <executable>jruby/jruby-${jruby.version}/bin/jruby</executable> <arguments> + <argument>-S</argument> + <argument>jruby/jruby-${jruby.version}/bin/gem</argument> <argument>build</argument> <argument>gem/logstash-input-plc4x.gemspec</argument> - <argument>--output=${project.artifactId}-${project.version}.gem</argument> + <!--argument>-output=${project.artifactId}-${project.version}.gem</argument--> </arguments> <workingDirectory>${project.build.directory}</workingDirectory> </configuration> diff --git a/src/main/script/prerequisiteCheck.groovy b/src/main/script/prerequisiteCheck.groovy index b4814fd..7247be7 100644 --- a/src/main/script/prerequisiteCheck.groovy +++ b/src/main/script/prerequisiteCheck.groovy @@ -146,7 +146,7 @@ def checkGpp() { } } -def checkGem() { +/*def checkGem() { print "Detecting Gem version: " def output = "gem --version".execute().text Matcher matcher = extractVersion(output) @@ -160,7 +160,7 @@ def checkGem() { println "missing" allConditionsMet = false } -} +}*/ def checkPython() { print "Detecting Python version: " @@ -343,9 +343,9 @@ if(!boostEnabled && cppEnabled) { checkBoost() } -if(javaEnabled && logstashEnabled) { +/*if(javaEnabled && logstashEnabled) { checkGem() -} +}*/ if(!allConditionsMet) { throw new RuntimeException("Not all conditions met, see log for details.")
