You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2022/09/26 10:42:39 UTC

[plc4x] branch develop updated (d64eb4078 -> dd2dd7691)

This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git


    from d64eb4078 Create CONTRIBUTING.md
     new 7c8eefb97 chore(tools/ui): Updated the javafx libs to version 19
     new dd2dd7691 chore(build): Updated the build to be compatible with Java 19

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 README.md                                                  |  6 ++++--
 .../org/apache/plc4x/java/modbus/ModbusEncodeTest.java     |  9 ++++++++-
 plc4j/integrations/pom.xml                                 | 14 +++++++++++++-
 plc4j/tools/ui/pom.xml                                     |  2 +-
 pom.xml                                                    |  3 ++-
 5 files changed, 28 insertions(+), 6 deletions(-)


[plc4x] 02/02: chore(build): Updated the build to be compatible with Java 19

Posted by cd...@apache.org.
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 dd2dd7691dffa7bdd8058eee2f1811ff0bddca1f
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Mon Sep 26 12:42:23 2022 +0200

    chore(build): Updated the build to be compatible with Java 19
---
 README.md                                                  |  6 ++++--
 .../org/apache/plc4x/java/modbus/ModbusEncodeTest.java     |  9 ++++++++-
 plc4j/integrations/pom.xml                                 | 14 +++++++++++++-
 pom.xml                                                    |  3 ++-
 4 files changed, 27 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index 39d5fe37b..122bd0e5f 100644
--- a/README.md
+++ b/README.md
@@ -85,7 +85,7 @@ the language of choice.
 
 ### Java
 
-NOTE: Currently the Java version which supports building of all parts of Apache PLC4X is at least Java 11
+NOTE: Currently the Java version which supports building of all parts of Apache PLC4X is at least Java 11 (Currently with Java 19 the Apache Kafka integration module is excluded from the build as the plugins it requires are incompatible with this version)
 
 See the PLC4J user guide on the website to start using PLC4X in your Java application:
 [https://plc4x.apache.org/users/getting-started/plc4j.html](https://plc4x.apache.org/users/getting-started/plc4j.html)
@@ -139,7 +139,9 @@ If you don't want to bother setting up the environment on your normal system and
 ### Getting Started
 
 You must have at least Java 11 installed on your system and connectivity to Maven Central
-(for downloading external third party dependencies). Maven 3.6 is required to build, so be sure it's installed and available on your system. 
+(for downloading external third party dependencies). Maven 3.6 is required to build, so be sure it's installed and available on your system.
+
+NOTE: When using Java 19 currently the Apache Kafka integration module is excluded from the build as one of the plugins it requires has proven to be incompatible with this version. 
 
 NOTE: There is a convenience Maven-Wrapper installed in the repo, when used, this automatically downloads and installs Maven. If you want to use this, please use `./mvnw` or `mvnw` instead of the normal `mvn` command.
 
diff --git a/plc4j/drivers/modbus/src/test/java/org/apache/plc4x/java/modbus/ModbusEncodeTest.java b/plc4j/drivers/modbus/src/test/java/org/apache/plc4x/java/modbus/ModbusEncodeTest.java
index c9d103f4f..fe1ab6321 100644
--- a/plc4j/drivers/modbus/src/test/java/org/apache/plc4x/java/modbus/ModbusEncodeTest.java
+++ b/plc4j/drivers/modbus/src/test/java/org/apache/plc4x/java/modbus/ModbusEncodeTest.java
@@ -18,6 +18,7 @@
  */
 package org.apache.plc4x.java.modbus;
 
+import org.apache.plc4x.java.api.value.PlcValue;
 import org.apache.plc4x.java.modbus.base.field.ModbusFieldHoldingRegister;
 import org.apache.plc4x.java.modbus.base.field.ModbusFieldCoil;
 import org.apache.plc4x.java.spi.values.IEC61131ValueHandler;
@@ -137,7 +138,13 @@ public class ModbusEncodeTest {
         Float[] object = {1.1f,1000.1f,100000.1f,3.4028232E38f,-3.4028232E38f,-1f,10384759934840.0f};
         ModbusFieldHoldingRegister holdingregister = ModbusFieldHoldingRegister.of("holding-register:7:REAL");
         PlcList list = (PlcList) IEC61131ValueHandler.of(holdingregister, object);
-        Assertions.assertEquals("[1.1,1000.1,100000.1,3.4028233E38,-3.4028233E38,-1.0,1.03847601E13]", list.toString());
+        //! When using Java 19 it seems the toString method uses a different precision than the previous versions,
+        //! so we need to check differently in this case.
+        for (int i = 0; i < list.getLength(); i++) {
+            PlcValue plcValue = list.getIndex(i);
+            Float referenceValue = object[i];
+            Assertions.assertEquals(referenceValue, plcValue.getFloat());
+        }
     }
 
     @Test
diff --git a/plc4j/integrations/pom.xml b/plc4j/integrations/pom.xml
index 1eb4e73de..3d7fd4263 100644
--- a/plc4j/integrations/pom.xml
+++ b/plc4j/integrations/pom.xml
@@ -35,10 +35,22 @@
 
   <modules>
     <module>apache-camel</module>
-    <module>apache-kafka</module>
     <module>apache-nifi</module>
     <module>apache-calcite</module>
     <module>opcua-server</module>
   </modules>
 
+  <!-- ! the kafka maven plugin currently seems to have issues with Java 19 -->
+  <profiles>
+    <profile>
+      <id>java-version-not-19</id>
+      <activation>
+        <jdk>[1.8, 19)</jdk>
+      </activation>
+      <modules>
+        <module>apache-kafka</module>
+      </modules>
+    </profile>
+  </profiles>
+
 </project>
diff --git a/pom.xml b/pom.xml
index ebd2f4834..be016b5e8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -134,7 +134,8 @@
     <hamcrest.version>2.2</hamcrest.version>
     <httpclient.version>4.5.13</httpclient.version>
     <httpcore.version>4.4.15</httpcore.version>
-    <jackson.version>2.13.4</jackson.version>
+    <!-- ! 2.13.4 has a known CVE and 2.14.0-rc1 seems to fix that, even if not finally released -->
+    <jackson.version>2.14.0-rc1</jackson.version>
     <woodstox-core.version>6.3.1</woodstox-core.version>
     <!-- When updating this to the latest version, we're getting errors in the opcua server tests -->
     <jaxb.version>4.0.1</jaxb.version>


[plc4x] 01/02: chore(tools/ui): Updated the javafx libs to version 19

Posted by cd...@apache.org.
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 7c8eefb976f8c653c664ec5c74d59fce8f904fea
Author: Christofer Dutz <ch...@c-ware.de>
AuthorDate: Mon Sep 26 12:41:48 2022 +0200

    chore(tools/ui): Updated the javafx libs to version 19
---
 plc4j/tools/ui/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plc4j/tools/ui/pom.xml b/plc4j/tools/ui/pom.xml
index a3be8ca7a..cd640a1ec 100644
--- a/plc4j/tools/ui/pom.xml
+++ b/plc4j/tools/ui/pom.xml
@@ -33,7 +33,7 @@
   <description>Utility used to execute PLC4X API calls in a GUI.</description>
 
   <properties>
-    <javafx.version>18.0.2</javafx.version>
+    <javafx.version>19</javafx.version>
   </properties>
 
   <build>