From fcc89a4e0fa9e561bfae50295fd08f00acbb6518 Mon Sep 17 00:00:00 2001 From: Christofer Dutz Date: Fri, 13 Sep 2024 20:14:11 +0200 Subject: [PATCH 1/6] chore: Updated many dependencies and plugins to more recent versions. --- code-generation/language-c/pom.xml | 1 - code-generation/language-go/pom.xml | 1 - code-generation/language-java/pom.xml | 6 ++ jenkins.pom | 2 +- plc4j/drivers/iec-60870/pom.xml | 9 +- .../base/optimizer/ModbusOptimizer.java | 2 + plc4j/pom.xml | 5 +- plc4j/utils/test-generator/pom.xml | 14 ++- .../readwrite/model/KnxManufacturer.cs | 42 +++++--- pom.xml | 98 +++++++++++-------- protocols/opcua/pom.xml | 11 +-- 11 files changed, 111 insertions(+), 80 deletions(-) diff --git a/code-generation/language-c/pom.xml b/code-generation/language-c/pom.xml index 6e7c5a14b30..746887eb57e 100644 --- a/code-generation/language-c/pom.xml +++ b/code-generation/language-c/pom.xml @@ -41,7 +41,6 @@ org.apache.maven.plugins maven-invoker-plugin - 3.7.0 integration-test diff --git a/code-generation/language-go/pom.xml b/code-generation/language-go/pom.xml index a5d02fc0a29..bd8a3f9f05b 100644 --- a/code-generation/language-go/pom.xml +++ b/code-generation/language-go/pom.xml @@ -41,7 +41,6 @@ org.apache.maven.plugins maven-invoker-plugin - 3.7.0 integration-test diff --git a/code-generation/language-java/pom.xml b/code-generation/language-java/pom.xml index 3a1a98300ff..04682d9788a 100644 --- a/code-generation/language-java/pom.xml +++ b/code-generation/language-java/pom.xml @@ -71,6 +71,12 @@ */pom.xml + + --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED + --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED + --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED + --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED + --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED test diff --git a/jenkins.pom b/jenkins.pom index a26a416d876..7a8448dfafd 100644 --- a/jenkins.pom +++ b/jenkins.pom @@ -26,7 +26,7 @@ org.apache apache - 31 + 33 org.apache.plc4x diff --git a/plc4j/drivers/iec-60870/pom.xml b/plc4j/drivers/iec-60870/pom.xml index 1ed5d57b07b..c7c55d54009 100644 --- a/plc4j/drivers/iec-60870/pom.xml +++ b/plc4j/drivers/iec-60870/pom.xml @@ -113,10 +113,6 @@ io.netty netty-transport - - commons-codec - commons-codec - org.apache.commons commons-lang3 @@ -128,6 +124,11 @@ 0.13.0-SNAPSHOT test + + commons-codec + commons-codec + test + org.apache.plc4x diff --git a/plc4j/drivers/modbus/src/main/java/org/apache/plc4x/java/modbus/base/optimizer/ModbusOptimizer.java b/plc4j/drivers/modbus/src/main/java/org/apache/plc4x/java/modbus/base/optimizer/ModbusOptimizer.java index 51873f30674..d78bfe94836 100644 --- a/plc4j/drivers/modbus/src/main/java/org/apache/plc4x/java/modbus/base/optimizer/ModbusOptimizer.java +++ b/plc4j/drivers/modbus/src/main/java/org/apache/plc4x/java/modbus/base/optimizer/ModbusOptimizer.java @@ -329,6 +329,8 @@ protected static class Response { public Response(int startingAddress, byte[] responseData) { this.startingAddress = startingAddress; this.responseData = responseData; + // In general a "Celil(responseData.length / 2)" would habe been more correct, + // but the data returned from the device should already be an even number. this.endingAddress = startingAddress + (responseData.length / 2); } diff --git a/plc4j/pom.xml b/plc4j/pom.xml index c38830e987b..c07499e41f0 100644 --- a/plc4j/pom.xml +++ b/plc4j/pom.xml @@ -107,9 +107,7 @@ org.slf4j:slf4j-api ch.qos.logback:logback-classic org.apache.groovy:groovy-test-junit5 - org.apache.groovy:groovy com.athaydes:spock-reports - org.apache.nifi:nifi-standard-nar @@ -268,7 +266,8 @@ Also do we have to pass in the byte-buddy agent to work around issues with dynamic loading of jvm agents. --> - -javaagent:${project.basedir}/target/byte-buddy-agent-${byte-buddy.version}.jar -Xmx512m @{surefireArgLine} + + -Xmx512m @{surefireArgLine} **/*Test.java **/*Tests.java diff --git a/plc4j/utils/test-generator/pom.xml b/plc4j/utils/test-generator/pom.xml index 69ad7953ccc..009d219009b 100644 --- a/plc4j/utils/test-generator/pom.xml +++ b/plc4j/utils/test-generator/pom.xml @@ -119,10 +119,6 @@ org.pcap4j pcap4j-core - - org.xmlunit - xmlunit-matchers - org.apache.commons commons-lang3 @@ -137,6 +133,11 @@ compile + + org.apache.groovy + groovy + ${groovy.version} + org.apache.plc4x @@ -169,6 +170,11 @@ commons-io test + + org.xmlunit + xmlunit-matchers + test + \ No newline at end of file diff --git a/plc4net/drivers/knxnetip/src/drivers/knxnetip/readwrite/model/KnxManufacturer.cs b/plc4net/drivers/knxnetip/src/drivers/knxnetip/readwrite/model/KnxManufacturer.cs index dace26735ba..4ed1707bd74 100644 --- a/plc4net/drivers/knxnetip/src/drivers/knxnetip/readwrite/model/KnxManufacturer.cs +++ b/plc4net/drivers/knxnetip/src/drivers/knxnetip/readwrite/model/KnxManufacturer.cs @@ -118,7 +118,7 @@ public enum KnxManufacturer M_VESTAMATIC = 91, M_MDT_TECHNOLOGIES = 92, M_WARENDORFER_KUECHEN_GMBH = 93, - M_VIDEO_STAR = 94, + M_GVS = 94, M_SITEK = 95, M_CONTROLTRONIC = 96, M_FUNCTION_TECHNOLOGY = 97, @@ -712,8 +712,10 @@ public enum KnxManufacturer M_ZHEJIANG_FORICK__INTELLIGENT_TECHNOLOGY_CO___LTD = 685, M_VARNI_DIGITAL_PRIVATE_LIMITED = 686, M_3A_ENTREPRISE_APS = 687, - M_ABB___RESERVED = 688, - M_BUSCH_JAEGER_ELEKTRO___RESERVED = 689, + M_ITALIANA_CONDUTTORI_SRL = 688, + M_XIAMEN_LEELEN_TECHNOLOGY_CO__LTD_ = 689, + M_ABB___RESERVED = 690, + M_BUSCH_JAEGER_ELEKTRO___RESERVED = 691, } public static class KnxManufacturerInfo @@ -2685,15 +2687,21 @@ public static class KnxManufacturerInfo case KnxManufacturer.M_3A_ENTREPRISE_APS: { /* '687' */ return 745; } - case KnxManufacturer.M_ABB___RESERVED: { /* '688' */ - return 43954; + case KnxManufacturer.M_ITALIANA_CONDUTTORI_SRL: { /* '688' */ + return 746; } - case KnxManufacturer.M_BUSCH_JAEGER_ELEKTRO___RESERVED: { /* '689' */ - return 43959; + case KnxManufacturer.M_XIAMEN_LEELEN_TECHNOLOGY_CO__LTD_: { /* '689' */ + return 747; } case KnxManufacturer.M_EELECTRON: { /* '69' */ return 108; } + case KnxManufacturer.M_ABB___RESERVED: { /* '690' */ + return 43954; + } + case KnxManufacturer.M_BUSCH_JAEGER_ELEKTRO___RESERVED: { /* '691' */ + return 43959; + } case KnxManufacturer.M_GIRA_GIERSIEPEN: { /* '7' */ return 8; } @@ -2775,7 +2783,7 @@ public static class KnxManufacturerInfo case KnxManufacturer.M_WARENDORFER_KUECHEN_GMBH: { /* '93' */ return 132; } - case KnxManufacturer.M_VIDEO_STAR: { /* '94' */ + case KnxManufacturer.M_GVS: { /* '94' */ return 133; } case KnxManufacturer.M_SITEK: { /* '95' */ @@ -4765,15 +4773,21 @@ public static string Name(this KnxManufacturer value) case KnxManufacturer.M_3A_ENTREPRISE_APS: { /* '687' */ return "3a entreprise aps"; } - case KnxManufacturer.M_ABB___RESERVED: { /* '688' */ - return "ABB - reserved"; + case KnxManufacturer.M_ITALIANA_CONDUTTORI_SRL: { /* '688' */ + return "Italiana Conduttori srl"; } - case KnxManufacturer.M_BUSCH_JAEGER_ELEKTRO___RESERVED: { /* '689' */ - return "Busch-Jaeger Elektro - reserved"; + case KnxManufacturer.M_XIAMEN_LEELEN_TECHNOLOGY_CO__LTD_: { /* '689' */ + return "Xiamen Leelen Technology Co.,Ltd."; } case KnxManufacturer.M_EELECTRON: { /* '69' */ return "Eelectron"; } + case KnxManufacturer.M_ABB___RESERVED: { /* '690' */ + return "ABB - reserved"; + } + case KnxManufacturer.M_BUSCH_JAEGER_ELEKTRO___RESERVED: { /* '691' */ + return "Busch-Jaeger Elektro - reserved"; + } case KnxManufacturer.M_GIRA_GIERSIEPEN: { /* '7' */ return "GIRA Giersiepen"; } @@ -4855,8 +4869,8 @@ public static string Name(this KnxManufacturer value) case KnxManufacturer.M_WARENDORFER_KUECHEN_GMBH: { /* '93' */ return "Warendorfer Küchen GmbH"; } - case KnxManufacturer.M_VIDEO_STAR: { /* '94' */ - return "Video-Star"; + case KnxManufacturer.M_GVS: { /* '94' */ + return "GVS"; } case KnxManufacturer.M_SITEK: { /* '95' */ return "Sitek"; diff --git a/pom.xml b/pom.xml index b5ab6b7ba25..a836fd03754 100644 --- a/pom.xml +++ b/pom.xml @@ -24,8 +24,7 @@ org.apache apache - - 31 + 33 org.apache.plc4x @@ -102,53 +101,54 @@ 1.7.0 - 4.13.1 + 4.13.2 1.1.2 - 3.26.0 - 4.2.1 + 3.26.3 + 4.2.2 1.4.3 1.78.1 - 1.14.17 - 3.29.3-b2 + 1.15.1 + 3.30.2-b1 1.9.4 - 1.8.0 - 1.17.0 + 1.9.0 + 1.17.1 4.4 - 1.26.2 + 1.27.1 2.11.0 2.16.1 - 3.14.0 + 3.17.0 1.3.3 3.6.1 3.11.1 1.12.0 1.11.0 2.1.4 - 3.16.1 + 3.16.2 + 2.3.32 - 4.0.22 + 4.0.23 33.2.1-jre - 2.2 + 3.0 4.5.14 4.4.16 - 2.16.1 - 6.5.1 + 2.17.2 + 7.0.0 4.0.4 11.0.20 5.14.0 2.11.0 - 5.10.3 + 5.11.0 1.8.2 - 1.5.6 + 1.5.8 3.2.0 - 0.6.13 - 5.12.0 - 4.1.111.Final + 0.6.14 + 5.13.0 + 4.1.113.Final 1.8.2 - 2.0.13 + 2.0.16 0.10.4 2.10.0 @@ -216,11 +216,6 @@ import - - commons-beanutils - commons-beanutils - ${commons-beanutils.version} - commons-cli commons-cli @@ -280,7 +275,7 @@ com.google.googlejavaformat google-java-format - 1.22.0 + 1.23.0 @@ -535,8 +530,12 @@ xmlunit-matchers ${xmlunit.version} + + org.opentest4j + opentest4j + 1.3.0 + - tel.schich javacan-core @@ -566,6 +565,12 @@ ********************************************************************************** ****************************************************************************** --> + + org.codehaus.woodstox + stax2-api + 4.2.2 + + commons-logging commons-logging @@ -688,7 +693,11 @@ license-check - verify + + test check @@ -1071,6 +1080,12 @@ 3.5.0 + + org.apache.maven.plugins + maven-invoker-plugin + 3.7.0 + + org.apache.felix maven-bundle-plugin @@ -1128,13 +1143,13 @@ org.codehaus.plexus plexus-compiler-eclipse - 2.13.0 + 2.15.0 org.eclipse.jdt ecj - 3.32.0 + 3.39.0 @@ -1142,7 +1157,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.3.0 + 3.5.0 org.junit.jupiter @@ -1158,8 +1173,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.3.0 - + 3.5.0 org.junit.jupiter @@ -1202,8 +1216,8 @@ org.apache.maven.plugins maven-shade-plugin - - 3.2.4 + + 3.6.0 ${project.build.directory}/${project.artifactId}-${project.version}-uber-jar.${project.packaging} @@ -1239,7 +1253,7 @@ is officially released in version 4. Till then, we would have to build our own version of the draft branch of the plugin. So for now, we'll stay at 3.x. --> - 3.12.1 + 3.20.0 true @@ -1287,7 +1301,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.7.0 + 3.10.0 true @@ -1349,7 +1363,7 @@ org.apache.maven.plugins maven-dependency-plugin - 12.4 + 12.5 From ca0f8c62ef53904474720bf5268bc1f5564c782d Mon Sep 17 00:00:00 2001 From: Christofer Dutz Date: Fri, 13 Sep 2024 20:50:01 +0200 Subject: [PATCH 2/6] chore: Updated the dependency plugin to the latest version and did all adjustments now needed or problems now detected by it. --- plc4j/drivers/bacnet/pom.xml | 9 +++++---- plc4j/drivers/c-bus/pom.xml | 13 +++++++++++++ plc4j/drivers/can/pom.xml | 13 +++++++++++++ plc4j/drivers/canopen/pom.xml | 13 +++++++++++++ plc4j/drivers/profinet/pom.xml | 4 ++++ plc4j/tools/opm/pom.xml | 11 ++++++----- plc4j/transports/serial/pom.xml | 12 ++++++------ plc4j/utils/raw-sockets/pom.xml | 7 +++++++ pom.xml | 17 ++++++++--------- 9 files changed, 75 insertions(+), 24 deletions(-) diff --git a/plc4j/drivers/bacnet/pom.xml b/plc4j/drivers/bacnet/pom.xml index 2863e2156a2..c5bf6578908 100644 --- a/plc4j/drivers/bacnet/pom.xml +++ b/plc4j/drivers/bacnet/pom.xml @@ -125,10 +125,6 @@ org.apache.commons commons-csv - - commons-io - commons-io - org.apache.commons commons-lang3 @@ -173,6 +169,11 @@ commons-codec test + + commons-io + commons-io + test + org.apache.plc4x diff --git a/plc4j/drivers/c-bus/pom.xml b/plc4j/drivers/c-bus/pom.xml index 8714125bf69..4f93374c783 100644 --- a/plc4j/drivers/c-bus/pom.xml +++ b/plc4j/drivers/c-bus/pom.xml @@ -85,6 +85,19 @@ + + org.apache.maven.plugins + maven-dependency-plugin + + + + org.apache.commons:commons-text + + + diff --git a/plc4j/drivers/can/pom.xml b/plc4j/drivers/can/pom.xml index d5d2a4dc6e1..28c160a29ee 100644 --- a/plc4j/drivers/can/pom.xml +++ b/plc4j/drivers/can/pom.xml @@ -174,6 +174,19 @@ + + org.apache.maven.plugins + maven-dependency-plugin + + + + io.netty:netty-buffer + + + diff --git a/plc4j/drivers/canopen/pom.xml b/plc4j/drivers/canopen/pom.xml index 1f30bb0ba89..6f83dad6b83 100644 --- a/plc4j/drivers/canopen/pom.xml +++ b/plc4j/drivers/canopen/pom.xml @@ -84,6 +84,19 @@ + + org.apache.maven.plugins + maven-dependency-plugin + + + + io.netty:netty-buffer + + + diff --git a/plc4j/drivers/profinet/pom.xml b/plc4j/drivers/profinet/pom.xml index b874cc7e458..673ab767966 100644 --- a/plc4j/drivers/profinet/pom.xml +++ b/plc4j/drivers/profinet/pom.xml @@ -124,6 +124,10 @@ io.netty netty-buffer + + io.netty + netty-transport + org.apache.commons commons-lang3 diff --git a/plc4j/tools/opm/pom.xml b/plc4j/tools/opm/pom.xml index d14e106415a..7a0beee2d5c 100644 --- a/plc4j/tools/opm/pom.xml +++ b/plc4j/tools/opm/pom.xml @@ -43,11 +43,6 @@ plc4j-api 0.13.0-SNAPSHOT - - org.apache.plc4x - plc4j-spi - 0.13.0-SNAPSHOT - @@ -64,6 +59,12 @@ + + org.apache.plc4x + plc4j-spi + 0.13.0-SNAPSHOT + test + org.apache.plc4x plc4j-driver-mock diff --git a/plc4j/transports/serial/pom.xml b/plc4j/transports/serial/pom.xml index c2ffa8fa4bf..9e59c586993 100644 --- a/plc4j/transports/serial/pom.xml +++ b/plc4j/transports/serial/pom.xml @@ -36,12 +36,6 @@ - - org.apache.plc4x - plc4j-api - 0.13.0-SNAPSHOT - - org.apache.plc4x plc4j-spi @@ -71,6 +65,12 @@ jSerialComm + + org.apache.plc4x + plc4j-api + 0.13.0-SNAPSHOT + test + io.netty netty-codec diff --git a/plc4j/utils/raw-sockets/pom.xml b/plc4j/utils/raw-sockets/pom.xml index f68c89a2336..8ddda788a75 100644 --- a/plc4j/utils/raw-sockets/pom.xml +++ b/plc4j/utils/raw-sockets/pom.xml @@ -103,6 +103,13 @@ org.pcap4j:pcap4j-packetfactory-static + + + io.netty:netty-common + diff --git a/pom.xml b/pom.xml index a836fd03754..b69f7dfc3db 100644 --- a/pom.xml +++ b/pom.xml @@ -1362,15 +1362,14 @@ org.apache.maven.plugins maven-dependency-plugin - - 3.1.2 + 3.8.0 + + + org.apache.maven.shared + maven-dependency-analyzer + 1.14.1 + + From a27eb493da840bc1cecf649974303e83330a4127 Mon Sep 17 00:00:00 2001 From: Christofer Dutz Date: Fri, 13 Sep 2024 23:40:55 +0200 Subject: [PATCH 3/6] fix: Reduced the eclipse compiler dependencies to the last version supporting Java 11 --- pom.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index b69f7dfc3db..e26792146c1 100644 --- a/pom.xml +++ b/pom.xml @@ -1143,13 +1143,15 @@ org.codehaus.plexus plexus-compiler-eclipse - 2.15.0 + + 2.13.0 org.eclipse.jdt ecj - 3.39.0 + + 3.33.0 From e1606b5129a227d6d365492bdd533bffdebb3e93 Mon Sep 17 00:00:00 2001 From: Christofer Dutz Date: Sat, 14 Sep 2024 10:53:51 +0200 Subject: [PATCH 4/6] fix: Fixed a false positive in the serial module --- plc4j/transports/serial/pom.xml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/plc4j/transports/serial/pom.xml b/plc4j/transports/serial/pom.xml index 9e59c586993..b1d994c97c2 100644 --- a/plc4j/transports/serial/pom.xml +++ b/plc4j/transports/serial/pom.xml @@ -36,6 +36,11 @@ + + org.apache.plc4x + plc4j-api + 0.13.0-SNAPSHOT + org.apache.plc4x plc4j-spi @@ -65,12 +70,6 @@ jSerialComm - - org.apache.plc4x - plc4j-api - 0.13.0-SNAPSHOT - test - io.netty netty-codec @@ -100,6 +99,19 @@ + + org.apache.maven.plugins + maven-dependency-plugin + + + + org.apache.plc4x:plc4j-api + + + From c982b58efefeb9a850b6ff95748942e2e0a051fd Mon Sep 17 00:00:00 2001 From: Christofer Dutz Date: Sat, 14 Sep 2024 11:48:43 +0200 Subject: [PATCH 5/6] fix: Tried fixing the invoker tests on windows. --- code-generation/language-java/pom.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/code-generation/language-java/pom.xml b/code-generation/language-java/pom.xml index 04682d9788a..35ceb4aff8b 100644 --- a/code-generation/language-java/pom.xml +++ b/code-generation/language-java/pom.xml @@ -71,12 +71,7 @@ */pom.xml - - --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED - --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED - --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED - --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED - --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED + --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED test From f33cae56c9de787d1af71fec7a3f1565393d5306 Mon Sep 17 00:00:00 2001 From: Christofer Dutz Date: Sat, 14 Sep 2024 12:51:18 +0200 Subject: [PATCH 6/6] chore: Removed the byte-buddy agent stuff. --- plc4j/pom.xml | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/plc4j/pom.xml b/plc4j/pom.xml index c07499e41f0..0b78dcca75d 100644 --- a/plc4j/pom.xml +++ b/plc4j/pom.xml @@ -53,28 +53,6 @@ org.apache.maven.plugins maven-dependency-plugin - - - copy - process-resources - - copy - - - - - net.bytebuddy - byte-buddy-agent - ${byte-buddy.version} - ${project.build.directory} - - - - - -Xmx512m @{surefireArgLine} **/*Test.java