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 2024/01/05 15:04:57 UTC

(plc4x) branch feature/new-ui-tool updated (987f032011 -> 3f1ec74518)

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

cdutz pushed a change to branch feature/new-ui-tool
in repository https://gitbox.apache.org/repos/asf/plc4x.git


    from 987f032011 feat: Continued refactoring the application to using redux for the global state handling.
     add 0ad4474b96 build(deps): bump org.apache.maven.plugins:maven-compiler-plugin (#1315)
     add 6009420874 build(deps): bump nl.jqno.equalsverifier:equalsverifier (#1314)
     add fa046f9d40 build(deps): bump jackson.version from 2.16.0 to 2.16.1 (#1313)
     add 87d09dc091 build(deps): bump com.googlecode.maven-download-plugin:download-maven-plugin (#1312)
     add 0e495e7907 build(deps): bump com.fasterxml.jackson.datatype:jackson-datatype-jsr310 (#1311)
     add d6ce06a8a7 build(deps): bump tel.schich:javacan-core from 3.3.0 to 3.3.2 (#1316)
     add 49741c26d7 build(deps): bump slf4j.version from 2.0.9 to 2.0.10 (#1317)
     add 3c783d2c01 build(deps): bump org.jsoup:jsoup from 1.17.1 to 1.17.2 (#1318)
     add 86a5663b77 build(deps): bump org.asciidoctor:asciidoctorj-diagram (#1319)
     add 09a1550590 build(deps): bump org.assertj:assertj-core from 3.24.2 to 3.25.0 (#1320)
     add 1dc24fddb2 build(deps): bump org.assertj:assertj-core from 3.25.0 to 3.25.1 (#1322)
     add 05a326392f build(deps): bump com.google.errorprone:error_prone_annotations (#1323)
     new 690356d2a5 Merge remote-tracking branch 'origin/develop' into feature/new-ui-tool
     new 3f1ec74518 chore: Added a check to ensure the JDK compatability of dependencies. Enabled the kafka module as it seems to now work with Java 21.

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:
 plc4j/drivers/ctrlx/pom.xml                        |  2 +-
 plc4j/examples/hello-world-kotlin/pom.xml          |  2 +-
 plc4j/integrations/apache-calcite/pom.xml          |  2 +-
 plc4j/integrations/pom.xml                         | 14 +--------
 plc4j/tools/opcua-server/pom.xml                   |  2 +-
 plc4j/tools/pom.xml                                | 18 +++++++++++-
 plc4j/tools/ui/backend/pom.xml                     | 19 +++++++++++++
 plc4j/tools/ui/frontend/frontend/src/App.tsx       | 10 +++++--
 .../src/generated/plc4j-tools-ui-frontend.ts       |  4 +--
 .../ui/frontend/frontend/src/pages/Inspect.tsx     |  3 ++
 .../tools/ui/frontend/frontend/src/store/index.ts  | 19 +++++++++++++
 plc4j/tools/ui/pom.xml                             | 28 ++++++++++++++++++
 pom.xml                                            | 33 ++++++++++++++++------
 protocols/bacnetip/pom.xml                         |  2 +-
 14 files changed, 125 insertions(+), 33 deletions(-)


(plc4x) 02/02: chore: Added a check to ensure the JDK compatability of dependencies. Enabled the kafka module as it seems to now work with Java 21.

Posted by cd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch feature/new-ui-tool
in repository https://gitbox.apache.org/repos/asf/plc4x.git

commit 3f1ec745184070d8593e25479f315cec601d65cc
Author: Christofer Dutz <cd...@apache.org>
AuthorDate: Fri Jan 5 16:04:47 2024 +0100

    chore: Added a check to ensure the JDK compatability of dependencies. Enabled the kafka module as it seems to now work with Java 21.
---
 plc4j/integrations/pom.xml                         | 14 +----------
 plc4j/tools/opcua-server/pom.xml                   |  2 +-
 plc4j/tools/pom.xml                                | 18 +++++++++++++-
 plc4j/tools/ui/backend/pom.xml                     | 19 +++++++++++++++
 plc4j/tools/ui/frontend/frontend/src/App.tsx       | 10 +++++---
 .../src/generated/plc4j-tools-ui-frontend.ts       |  4 ++--
 .../ui/frontend/frontend/src/pages/Inspect.tsx     |  3 +++
 .../tools/ui/frontend/frontend/src/store/index.ts  | 19 +++++++++++++++
 plc4j/tools/ui/pom.xml                             | 28 ++++++++++++++++++++++
 pom.xml                                            | 17 ++++++++++++-
 10 files changed, 113 insertions(+), 21 deletions(-)

diff --git a/plc4j/integrations/pom.xml b/plc4j/integrations/pom.xml
index c09fc26ead..210ab519c1 100644
--- a/plc4j/integrations/pom.xml
+++ b/plc4j/integrations/pom.xml
@@ -40,19 +40,7 @@
   <modules>
     <module>apache-calcite</module>
     <module>apache-nifi</module>
+    <module>apache-kafka</module>
   </modules>
 
-  <!-- It seems that the Kafka-Connect plugin doesn't work with Java 21 -->
-  <profiles>
-    <profile>
-      <id>.below-java-21</id>
-      <activation>
-        <jdk>[11,21)</jdk>
-      </activation>
-      <modules>
-        <module>apache-kafka</module>
-      </modules>
-    </profile>
-  </profiles>
-
 </project>
diff --git a/plc4j/tools/opcua-server/pom.xml b/plc4j/tools/opcua-server/pom.xml
index d551d44f1f..d0e0f1a497 100644
--- a/plc4j/tools/opcua-server/pom.xml
+++ b/plc4j/tools/opcua-server/pom.xml
@@ -28,7 +28,7 @@
 
   <artifactId>plc4x-opcua-server</artifactId>
 
-  <name>PLC4J: Integrations: Eclipse Milo OPC UA Server</name>
+  <name>PLC4J: Tools: OPC-UA Server</name>
 
   <properties>
     <project.build.outputTimestamp>2023-11-02T07:23:09Z</project.build.outputTimestamp>
diff --git a/plc4j/tools/pom.xml b/plc4j/tools/pom.xml
index c7bbb8be58..30aa025ab3 100644
--- a/plc4j/tools/pom.xml
+++ b/plc4j/tools/pom.xml
@@ -45,7 +45,23 @@
     <module>plc4x-server</module>
     <module>scraper</module>
     <module>scraper-ng</module>
-    <module>ui</module>
   </modules>
 
+  <!--
+    As the UI is a standalone application, that is not meant for being integrated in anything
+    we don't want to limit us to old java versions and therefore be stuck with old Spring versions.
+    Therefore, at least Java 19 is needed in order to build this module.
+  -->
+  <profiles>
+    <profile>
+      <id>.above-or-equal-java-19</id>
+      <activation>
+        <jdk>[19,)</jdk>
+      </activation>
+      <modules>
+        <module>ui</module>
+      </modules>
+    </profile>
+  </profiles>
+
 </project>
\ No newline at end of file
diff --git a/plc4j/tools/ui/backend/pom.xml b/plc4j/tools/ui/backend/pom.xml
index 78cce151c8..9236cf0b06 100644
--- a/plc4j/tools/ui/backend/pom.xml
+++ b/plc4j/tools/ui/backend/pom.xml
@@ -45,6 +45,25 @@
           </usedDependencies>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.rat</groupId>
+        <artifactId>apache-rat-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>license-check</id>
+            <phase>verify</phase>
+            <goals>
+              <goal>check</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <excludes combine.children="append">
+            <exclude>storage/**</exclude>
+            <exclude>derby.log</exclude>
+          </excludes>
+        </configuration>
+      </plugin>
     </plugins>
   </build>
 
diff --git a/plc4j/tools/ui/frontend/frontend/src/App.tsx b/plc4j/tools/ui/frontend/frontend/src/App.tsx
index 8143ccea47..b524cafc5b 100644
--- a/plc4j/tools/ui/frontend/frontend/src/App.tsx
+++ b/plc4j/tools/ui/frontend/frontend/src/App.tsx
@@ -27,7 +27,7 @@ import Mqtt from "./pages/Mqtt.tsx";
 import Settings from "./pages/Settings.tsx";
 import About from "./pages/About.tsx";
 import useWebSocket from 'react-use-websocket';
-import {useEffect} from "react";
+import {useState} from "react";
 import {RestApplicationClient} from "./generated/plc4j-tools-ui-frontend.ts";
 import store from "./store";
 
@@ -50,6 +50,8 @@ const router = createBrowserRouter([
 ])
 
 function App() {
+    const [initialized, setInitialized] = useState(false)
+
     useWebSocket( 'ws://localhost:8080/ws', {
         onOpen: () => {
             console.log('WebSocket connection established.');
@@ -60,7 +62,9 @@ function App() {
     });
 
     // Load the initial list of drivers and connections and initialize the store with that.
-    useEffect(() => {
+    if(!initialized) {
+        setInitialized(true);
+
         restClient.getAllDrivers().then(driverList => {
             restClient.getAllDevices().then(deviceList => {
                 store.dispatch({
@@ -70,7 +74,7 @@ function App() {
                 })
             })
         })
-    })
+    }
 
     return (
         <RouterProvider router={router}/>
diff --git a/plc4j/tools/ui/frontend/frontend/src/generated/plc4j-tools-ui-frontend.ts b/plc4j/tools/ui/frontend/frontend/src/generated/plc4j-tools-ui-frontend.ts
index f839745a3a..9f1969aa07 100644
--- a/plc4j/tools/ui/frontend/frontend/src/generated/plc4j-tools-ui-frontend.ts
+++ b/plc4j/tools/ui/frontend/frontend/src/generated/plc4j-tools-ui-frontend.ts
@@ -2,7 +2,7 @@
  * #%L
  * plc4j-tools-ui-frontend
  * %%
- * Copyright (C) 2017 - 2023 The Apache Software Foundation
+ * Copyright (C) 2017 - 2024 The Apache Software Foundation
  * %%
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -19,7 +19,7 @@
  */
 /* tslint:disable */
 /* eslint-disable */
-// Generated using typescript-generator version 3.2.1263 on 2023-12-31 13:36:32.
+// Generated using typescript-generator version 3.2.1263 on 2024-01-05 15:50:57.
 
 export interface Device {
     id: number;
diff --git a/plc4j/tools/ui/frontend/frontend/src/pages/Inspect.tsx b/plc4j/tools/ui/frontend/frontend/src/pages/Inspect.tsx
index 3de165c7ea..f94959d29d 100644
--- a/plc4j/tools/ui/frontend/frontend/src/pages/Inspect.tsx
+++ b/plc4j/tools/ui/frontend/frontend/src/pages/Inspect.tsx
@@ -28,6 +28,7 @@ import {TreeItemData} from "../model/TreeItemData.ts";
 
 
 function getByDriverTree(driverList: Driver[] | undefined, deviceList: Device[] | undefined):TreeItemData[] {
+    console.log('getByDriverTree')
     if(driverList && deviceList) {
         console.log(driverList)
         console.log(deviceList)
@@ -36,6 +37,7 @@ function getByDriverTree(driverList: Driver[] | undefined, deviceList: Device[]
 }
 
 function getByDeviceTree(driverList: Driver[] | undefined, deviceList: Device[] | undefined):TreeItemData[] {
+    console.log('getByDeviceTree')
     if(driverList && deviceList) {
         console.log(driverList)
         console.log(deviceList)
@@ -48,6 +50,7 @@ export default function Inspect() {
         state.driverList
         state.deviceList
     }) as ApplicationState
+    console.log("Test" + lists);
 
     return (
         <Splitter className="h-full">
diff --git a/plc4j/tools/ui/frontend/frontend/src/store/index.ts b/plc4j/tools/ui/frontend/frontend/src/store/index.ts
index e5c8a0e728..bf095fce72 100644
--- a/plc4j/tools/ui/frontend/frontend/src/store/index.ts
+++ b/plc4j/tools/ui/frontend/frontend/src/store/index.ts
@@ -1,3 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
 import {Action, createStore} from "redux";
 import {Device, Driver} from "../generated/plc4j-tools-ui-frontend.ts";
 
diff --git a/plc4j/tools/ui/pom.xml b/plc4j/tools/ui/pom.xml
index e405026f86..654ebd0d7d 100644
--- a/plc4j/tools/ui/pom.xml
+++ b/plc4j/tools/ui/pom.xml
@@ -44,6 +44,34 @@
     <module>frontend</module>
   </modules>
 
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-enforcer-plugin</artifactId>
+        <executions>
+          <!--
+            Increase the minimum Java version to Java 19, as this is a UI tool and made to run on its own
+            It therefore doesn't make much sense to stick to old version of libraries.
+          -->
+          <execution>
+            <id>enforce-java-compatability</id>
+            <goals>
+              <goal>enforce</goal>
+            </goals>
+            <configuration>
+              <rules>
+                <enforceBytecodeVersion>
+                  <maxJdkVersion>19</maxJdkVersion>
+                </enforceBytecodeVersion>
+              </rules>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
   <dependencyManagement>
     <dependencies>
       <dependency>
diff --git a/pom.xml b/pom.xml
index 0f512edc83..21209b8ff3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -137,7 +137,8 @@
     <woodstox-core.version>6.5.1</woodstox-core.version>
     <!-- When updating this to the latest version, we're getting errors in the opcua server tests -->
     <jaxb.version>4.0.4</jaxb.version>
-    <jetty-util.version>12.0.5</jetty-util.version>
+    <!-- Starting with Jetty 12 Java 17 is required -->
+    <jetty-util.version>11.0.19</jetty-util.version>
     <jna.version>5.14.0</jna.version>
     <joda-time.version>2.12.5</joda-time.version>
     <jserialcom.version>2.10.4</jserialcom.version>
@@ -905,6 +906,20 @@
               <fail>true</fail>
             </configuration>
           </execution>
+          <!-- Ensure dependencies are compatible with Java 11 -->
+          <execution>
+            <id>enforce-java-compatability</id>
+            <goals>
+              <goal>enforce</goal>
+            </goals>
+            <configuration>
+              <rules>
+                <enforceBytecodeVersion>
+                  <maxJdkVersion>11</maxJdkVersion>
+                </enforceBytecodeVersion>
+              </rules>
+            </configuration>
+          </execution>
           <!-- Ensure we're not mixing dependency versions -->
           <execution>
             <id>enforce-version-convergence</id>


(plc4x) 01/02: Merge remote-tracking branch 'origin/develop' into feature/new-ui-tool

Posted by cd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch feature/new-ui-tool
in repository https://gitbox.apache.org/repos/asf/plc4x.git

commit 690356d2a55a9dbb363cc4dc53b7c43f2f7a6db5
Merge: 987f032011 05a326392f
Author: Christofer Dutz <cd...@apache.org>
AuthorDate: Fri Jan 5 14:33:13 2024 +0100

    Merge remote-tracking branch 'origin/develop' into feature/new-ui-tool

 plc4j/drivers/ctrlx/pom.xml               |  2 +-
 plc4j/examples/hello-world-kotlin/pom.xml |  2 +-
 plc4j/integrations/apache-calcite/pom.xml |  2 +-
 pom.xml                                   | 16 ++++++++--------
 protocols/bacnetip/pom.xml                |  2 +-
 5 files changed, 12 insertions(+), 12 deletions(-)