From da19af824fc8df6b476500228754302d73cf919c Mon Sep 17 00:00:00 2001 From: Robert Schlabbach Date: Fri, 5 Dec 2025 20:41:02 +0100 Subject: [PATCH 1/7] Separate OCPP 1.6 SOAP support into a subproject --- ocpp-v1_6-soap/build.gradle | 20 +++ .../ocpp/OCPP_CentralSystemService_1.6.wsdl | 0 .../ocpp/OCPP_ChargePointService_1.6.wsdl | 0 ocpp-v1_6-soap/pom.xml | 152 ++++++++++++++++++ .../java/eu/chargetime/ocpp/SOAPClient.java | 0 .../eu/chargetime/ocpp/SOAPCommunicator.java | 0 .../eu/chargetime/ocpp/SOAPMessageInfo.java | 0 .../java/eu/chargetime/ocpp/SOAPServer.java | 0 .../eu/chargetime/ocpp/SOAPSyncHelper.java | 0 .../ocpp/TimeoutSessionDecorator.java | 0 .../eu/chargetime/ocpp/WSHttpHandler.java | 0 .../chargetime/ocpp/WSHttpHandlerEvents.java | 0 .../chargetime/ocpp/WebServiceListener.java | 0 .../chargetime/ocpp/WebServiceReceiver.java | 0 .../ocpp/WebServiceReceiverEvents.java | 0 .../ocpp/WebServiceTransmitter.java | 0 .../chargetime/ocpp/model/SOAPHostInfo.java | 0 .../ocpp/OCPP_CentralSystemService_1.6.wsdl | 0 .../ocpp/OCPP_ChargePointService_1.6.wsdl | 0 .../ocpp/test/SOAPCommunicatorTest.java | 0 .../ocpp/test/TimeoutSessionTest.java | 0 ocpp-v1_6-test/build.gradle | 2 +- pom.xml | 1 + settings.gradle | 2 + 24 files changed, 176 insertions(+), 1 deletion(-) create mode 100644 ocpp-v1_6-soap/build.gradle rename {ocpp-v1_6 => ocpp-v1_6-soap}/out/production/resources/eu/chargetime/ocpp/OCPP_CentralSystemService_1.6.wsdl (100%) rename {ocpp-v1_6 => ocpp-v1_6-soap}/out/production/resources/eu/chargetime/ocpp/OCPP_ChargePointService_1.6.wsdl (100%) create mode 100644 ocpp-v1_6-soap/pom.xml rename {ocpp-v1_6 => ocpp-v1_6-soap}/src/main/java/eu/chargetime/ocpp/SOAPClient.java (100%) rename {ocpp-v1_6 => ocpp-v1_6-soap}/src/main/java/eu/chargetime/ocpp/SOAPCommunicator.java (100%) rename {ocpp-v1_6 => ocpp-v1_6-soap}/src/main/java/eu/chargetime/ocpp/SOAPMessageInfo.java (100%) rename {ocpp-v1_6 => ocpp-v1_6-soap}/src/main/java/eu/chargetime/ocpp/SOAPServer.java (100%) rename {ocpp-v1_6 => ocpp-v1_6-soap}/src/main/java/eu/chargetime/ocpp/SOAPSyncHelper.java (100%) rename {ocpp-v1_6 => ocpp-v1_6-soap}/src/main/java/eu/chargetime/ocpp/TimeoutSessionDecorator.java (100%) rename {ocpp-v1_6 => ocpp-v1_6-soap}/src/main/java/eu/chargetime/ocpp/WSHttpHandler.java (100%) rename {ocpp-v1_6 => ocpp-v1_6-soap}/src/main/java/eu/chargetime/ocpp/WSHttpHandlerEvents.java (100%) rename {ocpp-v1_6 => ocpp-v1_6-soap}/src/main/java/eu/chargetime/ocpp/WebServiceListener.java (100%) rename {ocpp-v1_6 => ocpp-v1_6-soap}/src/main/java/eu/chargetime/ocpp/WebServiceReceiver.java (100%) rename {ocpp-v1_6 => ocpp-v1_6-soap}/src/main/java/eu/chargetime/ocpp/WebServiceReceiverEvents.java (100%) rename {ocpp-v1_6 => ocpp-v1_6-soap}/src/main/java/eu/chargetime/ocpp/WebServiceTransmitter.java (100%) rename {ocpp-v1_6 => ocpp-v1_6-soap}/src/main/java/eu/chargetime/ocpp/model/SOAPHostInfo.java (100%) rename {ocpp-v1_6 => ocpp-v1_6-soap}/src/main/resources/eu/chargetime/ocpp/OCPP_CentralSystemService_1.6.wsdl (100%) rename {ocpp-v1_6 => ocpp-v1_6-soap}/src/main/resources/eu/chargetime/ocpp/OCPP_ChargePointService_1.6.wsdl (100%) rename {ocpp-v1_6 => ocpp-v1_6-soap}/src/test/java/eu/chargetime/ocpp/test/SOAPCommunicatorTest.java (100%) rename {ocpp-v1_6 => ocpp-v1_6-soap}/src/test/java/eu/chargetime/ocpp/test/TimeoutSessionTest.java (100%) diff --git a/ocpp-v1_6-soap/build.gradle b/ocpp-v1_6-soap/build.gradle new file mode 100644 index 000000000..d1984419d --- /dev/null +++ b/ocpp-v1_6-soap/build.gradle @@ -0,0 +1,20 @@ +/* + * Java-OCA-OCPP ocpp-v1_6-soap gradle build configuration + */ + +dependencies { + compile project(':v1_6') + compile group: 'javax.xml.soap', name: 'javax.xml.soap-api', version: '1.4.0' + + testCompile 'junit:junit:4.13.2' + testCompile 'org.mockito:mockito-core:4.11.0' + testCompile 'org.hamcrest:hamcrest-core:3.0' +} + +task javadocJar(type: Jar) { + classifier = 'javadoc' + from(javadoc.destinationDir) +} + +description = 'Java-OCA-OCPP OCPP 1.6S' +publishing.publications.maven.artifact(javadocJar) diff --git a/ocpp-v1_6/out/production/resources/eu/chargetime/ocpp/OCPP_CentralSystemService_1.6.wsdl b/ocpp-v1_6-soap/out/production/resources/eu/chargetime/ocpp/OCPP_CentralSystemService_1.6.wsdl similarity index 100% rename from ocpp-v1_6/out/production/resources/eu/chargetime/ocpp/OCPP_CentralSystemService_1.6.wsdl rename to ocpp-v1_6-soap/out/production/resources/eu/chargetime/ocpp/OCPP_CentralSystemService_1.6.wsdl diff --git a/ocpp-v1_6/out/production/resources/eu/chargetime/ocpp/OCPP_ChargePointService_1.6.wsdl b/ocpp-v1_6-soap/out/production/resources/eu/chargetime/ocpp/OCPP_ChargePointService_1.6.wsdl similarity index 100% rename from ocpp-v1_6/out/production/resources/eu/chargetime/ocpp/OCPP_ChargePointService_1.6.wsdl rename to ocpp-v1_6-soap/out/production/resources/eu/chargetime/ocpp/OCPP_ChargePointService_1.6.wsdl diff --git a/ocpp-v1_6-soap/pom.xml b/ocpp-v1_6-soap/pom.xml new file mode 100644 index 000000000..7b3368bad --- /dev/null +++ b/ocpp-v1_6-soap/pom.xml @@ -0,0 +1,152 @@ + + + 4.0.0 + + eu.chargetime.ocpp + v1_6s + 1.2.0 + jar + + Java-OCA-OCPP OCPP 1.6S + OCPP 1.6 with SOAP transport + https://github.com/ChargeTimeEU/Java-OCA-OCPP + + + + MIT License + http://www.opensource.org/licenses/mit-license.php + + + + + + Thomas Volden + tv@chargetime.eu + chargetime.eu + http://www.chargetime.eu + + + + + scm:git:git://github.com/ChargeTimeEU/Java-OCA-OCPP.git + scm:git:ssh://github.com:ChargeTimeEU/Java-OCA-OCPP.git + https://github.com/ChargeTimeEU/Java-OCA-OCPP.git + + + + + ossrh + https://oss.sonatype.org/content/repositories/snapshots + + + ossrh + https://oss.sonatype.org/service/local/staging/deploy/maven2 + + + + + + eu.chargetime.ocpp + v1_6 + 1.2.0 + + + javax.xml.soap + javax.xml.soap-api + 1.4.0 + + + junit + junit + 4.13.2 + test + + + org.mockito + mockito-core + 4.11.0 + test + + + org.hamcrest + hamcrest-core + 3.0 + test + + + ch.qos.logback + logback-classic + 1.3.16 + test + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.8 + 1.8 + + 3.14.1 + + + org.apache.maven.plugins + maven-source-plugin + 3.4.0 + + + attach-sources + verify + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.12.0 + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.2.8 + + + sign-artifacts + verify + + sign + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.7.0 + true + + ossrh + https://oss.sonatype.org/ + true + + + + + + diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/SOAPClient.java b/ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp/SOAPClient.java similarity index 100% rename from ocpp-v1_6/src/main/java/eu/chargetime/ocpp/SOAPClient.java rename to ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp/SOAPClient.java diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/SOAPCommunicator.java b/ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp/SOAPCommunicator.java similarity index 100% rename from ocpp-v1_6/src/main/java/eu/chargetime/ocpp/SOAPCommunicator.java rename to ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp/SOAPCommunicator.java diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/SOAPMessageInfo.java b/ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp/SOAPMessageInfo.java similarity index 100% rename from ocpp-v1_6/src/main/java/eu/chargetime/ocpp/SOAPMessageInfo.java rename to ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp/SOAPMessageInfo.java diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/SOAPServer.java b/ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp/SOAPServer.java similarity index 100% rename from ocpp-v1_6/src/main/java/eu/chargetime/ocpp/SOAPServer.java rename to ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp/SOAPServer.java diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/SOAPSyncHelper.java b/ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp/SOAPSyncHelper.java similarity index 100% rename from ocpp-v1_6/src/main/java/eu/chargetime/ocpp/SOAPSyncHelper.java rename to ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp/SOAPSyncHelper.java diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/TimeoutSessionDecorator.java b/ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp/TimeoutSessionDecorator.java similarity index 100% rename from ocpp-v1_6/src/main/java/eu/chargetime/ocpp/TimeoutSessionDecorator.java rename to ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp/TimeoutSessionDecorator.java diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/WSHttpHandler.java b/ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp/WSHttpHandler.java similarity index 100% rename from ocpp-v1_6/src/main/java/eu/chargetime/ocpp/WSHttpHandler.java rename to ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp/WSHttpHandler.java diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/WSHttpHandlerEvents.java b/ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp/WSHttpHandlerEvents.java similarity index 100% rename from ocpp-v1_6/src/main/java/eu/chargetime/ocpp/WSHttpHandlerEvents.java rename to ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp/WSHttpHandlerEvents.java diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/WebServiceListener.java b/ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp/WebServiceListener.java similarity index 100% rename from ocpp-v1_6/src/main/java/eu/chargetime/ocpp/WebServiceListener.java rename to ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp/WebServiceListener.java diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/WebServiceReceiver.java b/ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp/WebServiceReceiver.java similarity index 100% rename from ocpp-v1_6/src/main/java/eu/chargetime/ocpp/WebServiceReceiver.java rename to ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp/WebServiceReceiver.java diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/WebServiceReceiverEvents.java b/ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp/WebServiceReceiverEvents.java similarity index 100% rename from ocpp-v1_6/src/main/java/eu/chargetime/ocpp/WebServiceReceiverEvents.java rename to ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp/WebServiceReceiverEvents.java diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/WebServiceTransmitter.java b/ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp/WebServiceTransmitter.java similarity index 100% rename from ocpp-v1_6/src/main/java/eu/chargetime/ocpp/WebServiceTransmitter.java rename to ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp/WebServiceTransmitter.java diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/SOAPHostInfo.java b/ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp/model/SOAPHostInfo.java similarity index 100% rename from ocpp-v1_6/src/main/java/eu/chargetime/ocpp/model/SOAPHostInfo.java rename to ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp/model/SOAPHostInfo.java diff --git a/ocpp-v1_6/src/main/resources/eu/chargetime/ocpp/OCPP_CentralSystemService_1.6.wsdl b/ocpp-v1_6-soap/src/main/resources/eu/chargetime/ocpp/OCPP_CentralSystemService_1.6.wsdl similarity index 100% rename from ocpp-v1_6/src/main/resources/eu/chargetime/ocpp/OCPP_CentralSystemService_1.6.wsdl rename to ocpp-v1_6-soap/src/main/resources/eu/chargetime/ocpp/OCPP_CentralSystemService_1.6.wsdl diff --git a/ocpp-v1_6/src/main/resources/eu/chargetime/ocpp/OCPP_ChargePointService_1.6.wsdl b/ocpp-v1_6-soap/src/main/resources/eu/chargetime/ocpp/OCPP_ChargePointService_1.6.wsdl similarity index 100% rename from ocpp-v1_6/src/main/resources/eu/chargetime/ocpp/OCPP_ChargePointService_1.6.wsdl rename to ocpp-v1_6-soap/src/main/resources/eu/chargetime/ocpp/OCPP_ChargePointService_1.6.wsdl diff --git a/ocpp-v1_6/src/test/java/eu/chargetime/ocpp/test/SOAPCommunicatorTest.java b/ocpp-v1_6-soap/src/test/java/eu/chargetime/ocpp/test/SOAPCommunicatorTest.java similarity index 100% rename from ocpp-v1_6/src/test/java/eu/chargetime/ocpp/test/SOAPCommunicatorTest.java rename to ocpp-v1_6-soap/src/test/java/eu/chargetime/ocpp/test/SOAPCommunicatorTest.java diff --git a/ocpp-v1_6/src/test/java/eu/chargetime/ocpp/test/TimeoutSessionTest.java b/ocpp-v1_6-soap/src/test/java/eu/chargetime/ocpp/test/TimeoutSessionTest.java similarity index 100% rename from ocpp-v1_6/src/test/java/eu/chargetime/ocpp/test/TimeoutSessionTest.java rename to ocpp-v1_6-soap/src/test/java/eu/chargetime/ocpp/test/TimeoutSessionTest.java diff --git a/ocpp-v1_6-test/build.gradle b/ocpp-v1_6-test/build.gradle index 8987ae75b..af487db4f 100644 --- a/ocpp-v1_6-test/build.gradle +++ b/ocpp-v1_6-test/build.gradle @@ -8,7 +8,7 @@ plugins { dependencies { compile project(':common') - compile project(':v1_6') + compile project(':v1_6s') testCompile 'junit:junit:4.13.2' testCompile 'org.codehaus.groovy:groovy-all:2.4.11' testCompile 'org.spockframework:spock-core:1.0-groovy-2.4' diff --git a/pom.xml b/pom.xml index a98a7a295..e5a86d70a 100644 --- a/pom.xml +++ b/pom.xml @@ -39,6 +39,7 @@ ocpp-common OCPP-J ocpp-v1_6 + ocpp-v1_6-soap ocpp-v1_6-test ocpp-v2 ocpp-v2-test diff --git a/settings.gradle b/settings.gradle index 8cc617507..a6e646945 100644 --- a/settings.gradle +++ b/settings.gradle @@ -9,6 +9,8 @@ include(':OCPP-J') include(':ocpp-v2') include(':ocpp-v2-test') include(':v1_6') +include(':v1_6s') include(':v1_6-test') project(':v1_6').projectDir = file('ocpp-v1_6') +project(':v1_6s').projectDir = file('ocpp-v1_6-soap') project(':v1_6-test').projectDir = file('ocpp-v1_6-test') \ No newline at end of file From cb98b5ca21bd01e9c04b1ea405dfda8970bc0142 Mon Sep 17 00:00:00 2001 From: Robert Schlabbach Date: Fri, 5 Dec 2025 21:04:40 +0100 Subject: [PATCH 2/7] Remove SOAP dependency from ocpp-common --- .../eu/chargetime/ocpp/JSONCommunicator.java | 5 ++++- ocpp-common/build.gradle | 3 +-- ocpp-common/pom.xml | 5 ----- .../java/eu/chargetime/ocpp/Communicator.java | 19 ------------------- .../ocpp/utilities/MoreObjects.java | 7 ++++++- .../eu/chargetime/ocpp/SOAPCommunicator.java | 18 ++++++++++++++++-- .../chargetime/ocpp/utilities/SugarUtil.java | 6 ------ ocpp-v1_6/build.gradle | 2 -- 8 files changed, 27 insertions(+), 38 deletions(-) rename {ocpp-common => ocpp-v1_6-soap}/src/main/java/eu/chargetime/ocpp/utilities/SugarUtil.java (93%) diff --git a/OCPP-J/src/main/java/eu/chargetime/ocpp/JSONCommunicator.java b/OCPP-J/src/main/java/eu/chargetime/ocpp/JSONCommunicator.java index da2f5a614..5c068d40f 100644 --- a/OCPP-J/src/main/java/eu/chargetime/ocpp/JSONCommunicator.java +++ b/OCPP-J/src/main/java/eu/chargetime/ocpp/JSONCommunicator.java @@ -155,7 +155,9 @@ protected Object makeCallResult(String uniqueId, String action, Object payload) @Override protected Object makeCall(String uniqueId, String action, Object payload) { - return String.format(CALL_FORMAT, uniqueId, action, payload); + String message = String.format(CALL_FORMAT, uniqueId, action, payload); + logger.trace("Send a message: {}", message); + return message; } @Override @@ -200,6 +202,7 @@ protected Message parse(Object json) { message.setId(messageId); + logger.trace("Receive a message: {}", message); return message; } } diff --git a/ocpp-common/build.gradle b/ocpp-common/build.gradle index eb545377f..b679d3139 100644 --- a/ocpp-common/build.gradle +++ b/ocpp-common/build.gradle @@ -2,8 +2,7 @@ dependencies { compile 'org.slf4j:slf4j-api:2.0.17' compile 'ch.qos.logback:logback-classic:1.3.16' - compile group: 'javax.xml.soap', name: 'javax.xml.soap-api', version: '1.4.0' - compile group: 'javax.xml.bind', name: 'jaxb-api', version: '2.1' + compile group: 'javax.xml.bind', name: 'jaxb-api', version: '2.3.1' testCompile 'junit:junit:4.13.2' testCompile 'org.mockito:mockito-core:4.11.0' diff --git a/ocpp-common/pom.xml b/ocpp-common/pom.xml index ecb6f5ce6..ea6099acf 100644 --- a/ocpp-common/pom.xml +++ b/ocpp-common/pom.xml @@ -51,11 +51,6 @@ jaxb-api 2.3.1 - - javax.xml.soap - javax.xml.soap-api - 1.4.0 - diff --git a/ocpp-common/src/main/java/eu/chargetime/ocpp/Communicator.java b/ocpp-common/src/main/java/eu/chargetime/ocpp/Communicator.java index ad9995cae..e667e32f8 100644 --- a/ocpp-common/src/main/java/eu/chargetime/ocpp/Communicator.java +++ b/ocpp-common/src/main/java/eu/chargetime/ocpp/Communicator.java @@ -28,12 +28,9 @@ of this software and associated documentation files (the "Software"), to deal */ import eu.chargetime.ocpp.model.*; -import eu.chargetime.ocpp.utilities.SugarUtil; import java.util.ArrayDeque; -import javax.xml.soap.SOAPMessage; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.w3c.dom.Document; /** * Abstract class. Handles basic communication: Pack and send messages. Receive and unpack messages. @@ -165,14 +162,6 @@ public void accept(CommunicatorEvents events) { public synchronized void sendCall(String uniqueId, String action, Request request) { Object call = makeCall(uniqueId, action, packPayload(request)); - if (call != null) { - if (call instanceof SOAPMessage) { - logger.trace("Send a message: {}", SugarUtil.soapMessageToString((SOAPMessage) call)); - } else { - logger.trace("Send a message: {}", call); - } - } - try { if (radio.isClosed()) { if (request.transactionRelated() && transactionQueue != null) { @@ -298,14 +287,6 @@ public void connected() { @Override public void receivedMessage(Object input) { Message message = parse(input); - if (message != null) { - Object payload = message.getPayload(); - if (payload instanceof Document) { - logger.trace("Receive a message: {}", SugarUtil.docToString((Document) payload)); - } else { - logger.trace("Receive a message: {}", message); - } - } if (message instanceof CallResultMessage) { events.onCallResult(message.getId(), message.getAction(), message.getPayload()); } else if (message instanceof CallErrorMessage) { diff --git a/ocpp-common/src/main/java/eu/chargetime/ocpp/utilities/MoreObjects.java b/ocpp-common/src/main/java/eu/chargetime/ocpp/utilities/MoreObjects.java index 93f57b79a..26b36c1fa 100644 --- a/ocpp-common/src/main/java/eu/chargetime/ocpp/utilities/MoreObjects.java +++ b/ocpp-common/src/main/java/eu/chargetime/ocpp/utilities/MoreObjects.java @@ -900,7 +900,7 @@ private ToStringHelperImpl addHolder(String name, Object value) { private ToStringHelperImpl addHolder(String name, ZonedDateTime value) { ValueHolder valueHolder = addHolder(); - valueHolder.value = "\"" + SugarUtil.zonedDateTimeToString(value) + "\""; + valueHolder.value = "\"" + zonedDateTimeToString(value) + "\""; valueHolder.name = name; return this; } @@ -911,4 +911,9 @@ private static final class ValueHolder { ValueHolder next; } } + + public static String zonedDateTimeToString(ZonedDateTime zonedDateTime) { + if (zonedDateTime == null) return ""; + return zonedDateTime.toString(); + } } diff --git a/ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp/SOAPCommunicator.java b/ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp/SOAPCommunicator.java index 2525a1c45..80790107f 100644 --- a/ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp/SOAPCommunicator.java +++ b/ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp/SOAPCommunicator.java @@ -27,6 +27,7 @@ of this software and associated documentation files (the "Software"), to deal */ import eu.chargetime.ocpp.model.*; +import eu.chargetime.ocpp.utilities.SugarUtil; import javax.xml.bind.*; import javax.xml.namespace.QName; import javax.xml.parsers.DocumentBuilderFactory; @@ -125,7 +126,11 @@ protected Object makeCallResult(String uniqueId, String action, Object payload) @Override protected Object makeCall(String uniqueId, String action, Object payload) { - return createMessage(uniqueId, action, (Document) payload, false); + SOAPMessage message = createMessage(uniqueId, action, (Document) payload, false); + if (message != null) { + logger.trace("Send a message: {}", SugarUtil.soapMessageToString(message)); + } + return message; } private QName blameSomeone(String errorCode) { @@ -161,7 +166,7 @@ protected Object makeCallError( return message; } - private Object createMessage( + private SOAPMessage createMessage( String uniqueId, String action, Document payload, boolean isResponse) { SOAPMessage message = null; @@ -252,6 +257,15 @@ protected Message parse(Object message) { if (soapParser.isAddressedToMe()) output = soapParser.parseMessage(); + if (output != null) { + Object payload = output.getPayload(); + if (payload instanceof Document) { + logger.trace("Receive a message: {}", SugarUtil.docToString((Document) payload)); + } else { + logger.trace("Receive a message: {}", message); + } + } + return output; } diff --git a/ocpp-common/src/main/java/eu/chargetime/ocpp/utilities/SugarUtil.java b/ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp/utilities/SugarUtil.java similarity index 93% rename from ocpp-common/src/main/java/eu/chargetime/ocpp/utilities/SugarUtil.java rename to ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp/utilities/SugarUtil.java index 9ab534175..41a4c8162 100644 --- a/ocpp-common/src/main/java/eu/chargetime/ocpp/utilities/SugarUtil.java +++ b/ocpp-v1_6-soap/src/main/java/eu/chargetime/ocpp/utilities/SugarUtil.java @@ -30,7 +30,6 @@ of this software and associated documentation files (the "Software"), to deal import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.StringWriter; -import java.time.ZonedDateTime; import javax.xml.XMLConstants; import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; @@ -42,11 +41,6 @@ of this software and associated documentation files (the "Software"), to deal public class SugarUtil { - public static String zonedDateTimeToString(ZonedDateTime zonedDateTime) { - if (zonedDateTime == null) return ""; - return zonedDateTime.toString(); - } - public static String docToString(Document doc) { try { StringWriter sw = new StringWriter(); diff --git a/ocpp-v1_6/build.gradle b/ocpp-v1_6/build.gradle index d14366841..bebd9b02d 100644 --- a/ocpp-v1_6/build.gradle +++ b/ocpp-v1_6/build.gradle @@ -5,8 +5,6 @@ dependencies { compile project(':common') compile project(':OCPP-J') - compile 'org.java-websocket:Java-WebSocket:1.6.0' - compile group: 'javax.xml.soap', name: 'javax.xml.soap-api', version: '1.4.0' testCompile 'junit:junit:4.13.2' testCompile 'org.mockito:mockito-core:4.11.0' From 763858e90a270c3dda63e262c8a64603b950d259 Mon Sep 17 00:00:00 2001 From: Robert Schlabbach Date: Sat, 6 Dec 2025 00:45:06 +0100 Subject: [PATCH 3/7] Remove ocpp-v1_6 dependency from ocpp-v2 subproject --- .../src/main/java/eu/chargetime/ocpp/IClientAPI.java | 0 .../src/main/java/eu/chargetime/ocpp/IServerAPI.java | 0 ocpp-v2/build.gradle | 3 +-- ocpp-v2/pom.xml | 9 ++------- 4 files changed, 3 insertions(+), 9 deletions(-) rename {ocpp-v1_6 => ocpp-common}/src/main/java/eu/chargetime/ocpp/IClientAPI.java (100%) rename {ocpp-v1_6 => ocpp-common}/src/main/java/eu/chargetime/ocpp/IServerAPI.java (100%) diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/IClientAPI.java b/ocpp-common/src/main/java/eu/chargetime/ocpp/IClientAPI.java similarity index 100% rename from ocpp-v1_6/src/main/java/eu/chargetime/ocpp/IClientAPI.java rename to ocpp-common/src/main/java/eu/chargetime/ocpp/IClientAPI.java diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/IServerAPI.java b/ocpp-common/src/main/java/eu/chargetime/ocpp/IServerAPI.java similarity index 100% rename from ocpp-v1_6/src/main/java/eu/chargetime/ocpp/IServerAPI.java rename to ocpp-common/src/main/java/eu/chargetime/ocpp/IServerAPI.java diff --git a/ocpp-v2/build.gradle b/ocpp-v2/build.gradle index 3e73835d9..11b4bb592 100644 --- a/ocpp-v2/build.gradle +++ b/ocpp-v2/build.gradle @@ -5,7 +5,6 @@ dependencies { compile project(':common') compile project(':OCPP-J') - compile project(':v1_6') compile 'com.google.code.findbugs:jsr305:3.0.1' compile 'org.java-websocket:Java-WebSocket:1.6.0' testCompile 'junit:junit:4.13.2' @@ -18,5 +17,5 @@ task javadocJar(type: Jar) { from(javadoc.destinationDir) } -description = 'Java-OCA-OCPP v2' +description = 'Java-OCA-OCPP OCPP 2.x' publishing.publications.maven.artifact(javadocJar) diff --git a/ocpp-v2/pom.xml b/ocpp-v2/pom.xml index 6ee011e72..4c01af421 100644 --- a/ocpp-v2/pom.xml +++ b/ocpp-v2/pom.xml @@ -9,8 +9,8 @@ 1.2.0 jar - Java-OCA-OCPP v2 - Implementation of Open Charge-Point Protocol version 2.x. + Java-OCA-OCPP OCPP 2.x + OCPP 2.x multi-protocol capable https://github.com/ChargeTimeEU/Java-OCA-OCPP @@ -57,11 +57,6 @@ OCPP-J 1.2.0 - - eu.chargetime.ocpp - v1_6 - 1.2.0 - com.google.code.findbugs jsr305 From 0240d3b7d5745c9100bf99e67e4bb029f2718c02 Mon Sep 17 00:00:00 2001 From: Robert Schlabbach Date: Sat, 6 Dec 2025 01:05:08 +0100 Subject: [PATCH 4/7] Separate ocpp-v1_6-json from ocpp-v1_6 subproject --- ocpp-v1_6-json/build.gradle | 20 +++ ocpp-v1_6-json/pom.xml | 152 ++++++++++++++++++ .../java/eu/chargetime/ocpp/JSONClient.java | 0 .../java/eu/chargetime/ocpp/JSONServer.java | 0 .../ocpp/test/JSONCommunicatorTest.java | 0 ocpp-v1_6-test/build.gradle | 1 + ocpp-v1_6/build.gradle | 3 +- ocpp-v1_6/pom.xml | 14 +- pom.xml | 1 + settings.gradle | 2 + 10 files changed, 179 insertions(+), 14 deletions(-) create mode 100644 ocpp-v1_6-json/build.gradle create mode 100644 ocpp-v1_6-json/pom.xml rename {ocpp-v1_6 => ocpp-v1_6-json}/src/main/java/eu/chargetime/ocpp/JSONClient.java (100%) rename {ocpp-v1_6 => ocpp-v1_6-json}/src/main/java/eu/chargetime/ocpp/JSONServer.java (100%) rename {ocpp-v1_6 => ocpp-v1_6-json}/src/test/java/eu/chargetime/ocpp/test/JSONCommunicatorTest.java (100%) diff --git a/ocpp-v1_6-json/build.gradle b/ocpp-v1_6-json/build.gradle new file mode 100644 index 000000000..0314a0839 --- /dev/null +++ b/ocpp-v1_6-json/build.gradle @@ -0,0 +1,20 @@ +/* + * Java-OCA-OCPP ocpp-v1_6-json gradle build configuration + */ + +dependencies { + compile project(':v1_6') + compile project(':OCPP-J') + + testCompile 'junit:junit:4.13.2' + testCompile 'org.mockito:mockito-core:4.11.0' + testCompile 'org.hamcrest:hamcrest-core:3.0' +} + +task javadocJar(type: Jar) { + classifier = 'javadoc' + from(javadoc.destinationDir) +} + +description = 'Java-OCA-OCPP OCPP 1.6J' +publishing.publications.maven.artifact(javadocJar) diff --git a/ocpp-v1_6-json/pom.xml b/ocpp-v1_6-json/pom.xml new file mode 100644 index 000000000..f877a3146 --- /dev/null +++ b/ocpp-v1_6-json/pom.xml @@ -0,0 +1,152 @@ + + + 4.0.0 + + eu.chargetime.ocpp + v1_6j + 1.2.0 + jar + + Java-OCA-OCPP OCPP 1.6J + OCPP 1.6 with JSON transport + https://github.com/ChargeTimeEU/Java-OCA-OCPP + + + + MIT License + http://www.opensource.org/licenses/mit-license.php + + + + + + Thomas Volden + tv@chargetime.eu + chargetime.eu + http://www.chargetime.eu + + + + + scm:git:git://github.com/ChargeTimeEU/Java-OCA-OCPP.git + scm:git:ssh://github.com:ChargeTimeEU/Java-OCA-OCPP.git + https://github.com/ChargeTimeEU/Java-OCA-OCPP.git + + + + + ossrh + https://oss.sonatype.org/content/repositories/snapshots + + + ossrh + https://oss.sonatype.org/service/local/staging/deploy/maven2 + + + + + + eu.chargetime.ocpp + v1_6 + 1.2.0 + + + eu.chargetime.ocpp + OCPP-J + 1.2.0 + + + junit + junit + 4.13.2 + test + + + org.mockito + mockito-core + 4.11.0 + test + + + org.hamcrest + hamcrest-core + 3.0 + test + + + ch.qos.logback + logback-classic + 1.3.16 + test + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.8 + 1.8 + + 3.14.1 + + + org.apache.maven.plugins + maven-source-plugin + 3.4.0 + + + attach-sources + verify + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.12.0 + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.2.8 + + + sign-artifacts + verify + + sign + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.7.0 + true + + ossrh + https://oss.sonatype.org/ + true + + + + + + diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/JSONClient.java b/ocpp-v1_6-json/src/main/java/eu/chargetime/ocpp/JSONClient.java similarity index 100% rename from ocpp-v1_6/src/main/java/eu/chargetime/ocpp/JSONClient.java rename to ocpp-v1_6-json/src/main/java/eu/chargetime/ocpp/JSONClient.java diff --git a/ocpp-v1_6/src/main/java/eu/chargetime/ocpp/JSONServer.java b/ocpp-v1_6-json/src/main/java/eu/chargetime/ocpp/JSONServer.java similarity index 100% rename from ocpp-v1_6/src/main/java/eu/chargetime/ocpp/JSONServer.java rename to ocpp-v1_6-json/src/main/java/eu/chargetime/ocpp/JSONServer.java diff --git a/ocpp-v1_6/src/test/java/eu/chargetime/ocpp/test/JSONCommunicatorTest.java b/ocpp-v1_6-json/src/test/java/eu/chargetime/ocpp/test/JSONCommunicatorTest.java similarity index 100% rename from ocpp-v1_6/src/test/java/eu/chargetime/ocpp/test/JSONCommunicatorTest.java rename to ocpp-v1_6-json/src/test/java/eu/chargetime/ocpp/test/JSONCommunicatorTest.java diff --git a/ocpp-v1_6-test/build.gradle b/ocpp-v1_6-test/build.gradle index af487db4f..aca71021c 100644 --- a/ocpp-v1_6-test/build.gradle +++ b/ocpp-v1_6-test/build.gradle @@ -8,6 +8,7 @@ plugins { dependencies { compile project(':common') + compile project(':v1_6j') compile project(':v1_6s') testCompile 'junit:junit:4.13.2' testCompile 'org.codehaus.groovy:groovy-all:2.4.11' diff --git a/ocpp-v1_6/build.gradle b/ocpp-v1_6/build.gradle index bebd9b02d..502be655d 100644 --- a/ocpp-v1_6/build.gradle +++ b/ocpp-v1_6/build.gradle @@ -4,7 +4,6 @@ dependencies { compile project(':common') - compile project(':OCPP-J') testCompile 'junit:junit:4.13.2' testCompile 'org.mockito:mockito-core:4.11.0' @@ -16,5 +15,5 @@ task javadocJar(type: Jar) { from(javadoc.destinationDir) } -description = 'Java-OCA-OCPP v1.6' +description = 'Java-OCA-OCPP OCPP 1.6 (no transport)' publishing.publications.maven.artifact(javadocJar) diff --git a/ocpp-v1_6/pom.xml b/ocpp-v1_6/pom.xml index 1fab4031a..9f95992fb 100644 --- a/ocpp-v1_6/pom.xml +++ b/ocpp-v1_6/pom.xml @@ -9,8 +9,8 @@ 1.2.0 jar - Java-OCA-OCPP v1.6 - Implementation of Open Charge-Point Protocol version 1.6. + Java-OCA-OCPP OCPP 1.6 (no transport) + OCPP 1.6 base dependency package https://github.com/ChargeTimeEU/Java-OCA-OCPP @@ -52,16 +52,6 @@ common 1.2.0 - - eu.chargetime.ocpp - OCPP-J - 1.2.0 - - - org.java-websocket - Java-WebSocket - 1.6.0 - junit junit diff --git a/pom.xml b/pom.xml index e5a86d70a..8e04a9391 100644 --- a/pom.xml +++ b/pom.xml @@ -39,6 +39,7 @@ ocpp-common OCPP-J ocpp-v1_6 + ocpp-v1_6-json ocpp-v1_6-soap ocpp-v1_6-test ocpp-v2 diff --git a/settings.gradle b/settings.gradle index a6e646945..69b3500aa 100644 --- a/settings.gradle +++ b/settings.gradle @@ -9,8 +9,10 @@ include(':OCPP-J') include(':ocpp-v2') include(':ocpp-v2-test') include(':v1_6') +include(':v1_6j') include(':v1_6s') include(':v1_6-test') project(':v1_6').projectDir = file('ocpp-v1_6') +project(':v1_6j').projectDir = file('ocpp-v1_6-json') project(':v1_6s').projectDir = file('ocpp-v1_6-soap') project(':v1_6-test').projectDir = file('ocpp-v1_6-test') \ No newline at end of file From f3e832fe4046ad818d7fb58f638846000ff90037 Mon Sep 17 00:00:00 2001 From: Robert Schlabbach Date: Sat, 6 Dec 2025 08:33:45 +0100 Subject: [PATCH 5/7] Rename OCPP-J to ocpp-json --- {OCPP-J => ocpp-json}/build.gradle | 0 {OCPP-J => ocpp-json}/pom.xml | 0 .../src/main/java/eu/chargetime/ocpp/Draft_HttpHealthCheck.java | 0 .../src/main/java/eu/chargetime/ocpp/JSONCommunicator.java | 0 .../src/main/java/eu/chargetime/ocpp/JSONConfiguration.java | 0 .../src/main/java/eu/chargetime/ocpp/WebSocketListener.java | 0 .../src/main/java/eu/chargetime/ocpp/WebSocketReceiver.java | 0 .../main/java/eu/chargetime/ocpp/WebSocketReceiverEvents.java | 0 .../src/main/java/eu/chargetime/ocpp/WebSocketTransmitter.java | 0 .../main/java/eu/chargetime/ocpp/wss/BaseWssFactoryBuilder.java | 0 .../main/java/eu/chargetime/ocpp/wss/BaseWssSocketBuilder.java | 0 .../eu/chargetime/ocpp/wss/CustomSSLWebSocketServerFactory.java | 0 .../src/main/java/eu/chargetime/ocpp/wss/WssFactoryBuilder.java | 0 .../src/main/java/eu/chargetime/ocpp/wss/WssSocketBuilder.java | 0 .../eu/chargetime/ocpp/wss/test/BaseWssFactoryBuilderTest.java | 0 .../eu/chargetime/ocpp/wss/test/BaseWssSocketBuilderTest.java | 0 .../ocpp/wss/test/CustomSSLWebSocketServerFactoryTest.java | 0 ocpp-v1_6-json/build.gradle | 2 +- ocpp-v2/build.gradle | 2 +- pom.xml | 2 +- settings.gradle | 2 +- 21 files changed, 4 insertions(+), 4 deletions(-) rename {OCPP-J => ocpp-json}/build.gradle (100%) rename {OCPP-J => ocpp-json}/pom.xml (100%) rename {OCPP-J => ocpp-json}/src/main/java/eu/chargetime/ocpp/Draft_HttpHealthCheck.java (100%) rename {OCPP-J => ocpp-json}/src/main/java/eu/chargetime/ocpp/JSONCommunicator.java (100%) rename {OCPP-J => ocpp-json}/src/main/java/eu/chargetime/ocpp/JSONConfiguration.java (100%) rename {OCPP-J => ocpp-json}/src/main/java/eu/chargetime/ocpp/WebSocketListener.java (100%) rename {OCPP-J => ocpp-json}/src/main/java/eu/chargetime/ocpp/WebSocketReceiver.java (100%) rename {OCPP-J => ocpp-json}/src/main/java/eu/chargetime/ocpp/WebSocketReceiverEvents.java (100%) rename {OCPP-J => ocpp-json}/src/main/java/eu/chargetime/ocpp/WebSocketTransmitter.java (100%) rename {OCPP-J => ocpp-json}/src/main/java/eu/chargetime/ocpp/wss/BaseWssFactoryBuilder.java (100%) rename {OCPP-J => ocpp-json}/src/main/java/eu/chargetime/ocpp/wss/BaseWssSocketBuilder.java (100%) rename {OCPP-J => ocpp-json}/src/main/java/eu/chargetime/ocpp/wss/CustomSSLWebSocketServerFactory.java (100%) rename {OCPP-J => ocpp-json}/src/main/java/eu/chargetime/ocpp/wss/WssFactoryBuilder.java (100%) rename {OCPP-J => ocpp-json}/src/main/java/eu/chargetime/ocpp/wss/WssSocketBuilder.java (100%) rename {OCPP-J => ocpp-json}/src/test/java/eu/chargetime/ocpp/wss/test/BaseWssFactoryBuilderTest.java (100%) rename {OCPP-J => ocpp-json}/src/test/java/eu/chargetime/ocpp/wss/test/BaseWssSocketBuilderTest.java (100%) rename {OCPP-J => ocpp-json}/src/test/java/eu/chargetime/ocpp/wss/test/CustomSSLWebSocketServerFactoryTest.java (100%) diff --git a/OCPP-J/build.gradle b/ocpp-json/build.gradle similarity index 100% rename from OCPP-J/build.gradle rename to ocpp-json/build.gradle diff --git a/OCPP-J/pom.xml b/ocpp-json/pom.xml similarity index 100% rename from OCPP-J/pom.xml rename to ocpp-json/pom.xml diff --git a/OCPP-J/src/main/java/eu/chargetime/ocpp/Draft_HttpHealthCheck.java b/ocpp-json/src/main/java/eu/chargetime/ocpp/Draft_HttpHealthCheck.java similarity index 100% rename from OCPP-J/src/main/java/eu/chargetime/ocpp/Draft_HttpHealthCheck.java rename to ocpp-json/src/main/java/eu/chargetime/ocpp/Draft_HttpHealthCheck.java diff --git a/OCPP-J/src/main/java/eu/chargetime/ocpp/JSONCommunicator.java b/ocpp-json/src/main/java/eu/chargetime/ocpp/JSONCommunicator.java similarity index 100% rename from OCPP-J/src/main/java/eu/chargetime/ocpp/JSONCommunicator.java rename to ocpp-json/src/main/java/eu/chargetime/ocpp/JSONCommunicator.java diff --git a/OCPP-J/src/main/java/eu/chargetime/ocpp/JSONConfiguration.java b/ocpp-json/src/main/java/eu/chargetime/ocpp/JSONConfiguration.java similarity index 100% rename from OCPP-J/src/main/java/eu/chargetime/ocpp/JSONConfiguration.java rename to ocpp-json/src/main/java/eu/chargetime/ocpp/JSONConfiguration.java diff --git a/OCPP-J/src/main/java/eu/chargetime/ocpp/WebSocketListener.java b/ocpp-json/src/main/java/eu/chargetime/ocpp/WebSocketListener.java similarity index 100% rename from OCPP-J/src/main/java/eu/chargetime/ocpp/WebSocketListener.java rename to ocpp-json/src/main/java/eu/chargetime/ocpp/WebSocketListener.java diff --git a/OCPP-J/src/main/java/eu/chargetime/ocpp/WebSocketReceiver.java b/ocpp-json/src/main/java/eu/chargetime/ocpp/WebSocketReceiver.java similarity index 100% rename from OCPP-J/src/main/java/eu/chargetime/ocpp/WebSocketReceiver.java rename to ocpp-json/src/main/java/eu/chargetime/ocpp/WebSocketReceiver.java diff --git a/OCPP-J/src/main/java/eu/chargetime/ocpp/WebSocketReceiverEvents.java b/ocpp-json/src/main/java/eu/chargetime/ocpp/WebSocketReceiverEvents.java similarity index 100% rename from OCPP-J/src/main/java/eu/chargetime/ocpp/WebSocketReceiverEvents.java rename to ocpp-json/src/main/java/eu/chargetime/ocpp/WebSocketReceiverEvents.java diff --git a/OCPP-J/src/main/java/eu/chargetime/ocpp/WebSocketTransmitter.java b/ocpp-json/src/main/java/eu/chargetime/ocpp/WebSocketTransmitter.java similarity index 100% rename from OCPP-J/src/main/java/eu/chargetime/ocpp/WebSocketTransmitter.java rename to ocpp-json/src/main/java/eu/chargetime/ocpp/WebSocketTransmitter.java diff --git a/OCPP-J/src/main/java/eu/chargetime/ocpp/wss/BaseWssFactoryBuilder.java b/ocpp-json/src/main/java/eu/chargetime/ocpp/wss/BaseWssFactoryBuilder.java similarity index 100% rename from OCPP-J/src/main/java/eu/chargetime/ocpp/wss/BaseWssFactoryBuilder.java rename to ocpp-json/src/main/java/eu/chargetime/ocpp/wss/BaseWssFactoryBuilder.java diff --git a/OCPP-J/src/main/java/eu/chargetime/ocpp/wss/BaseWssSocketBuilder.java b/ocpp-json/src/main/java/eu/chargetime/ocpp/wss/BaseWssSocketBuilder.java similarity index 100% rename from OCPP-J/src/main/java/eu/chargetime/ocpp/wss/BaseWssSocketBuilder.java rename to ocpp-json/src/main/java/eu/chargetime/ocpp/wss/BaseWssSocketBuilder.java diff --git a/OCPP-J/src/main/java/eu/chargetime/ocpp/wss/CustomSSLWebSocketServerFactory.java b/ocpp-json/src/main/java/eu/chargetime/ocpp/wss/CustomSSLWebSocketServerFactory.java similarity index 100% rename from OCPP-J/src/main/java/eu/chargetime/ocpp/wss/CustomSSLWebSocketServerFactory.java rename to ocpp-json/src/main/java/eu/chargetime/ocpp/wss/CustomSSLWebSocketServerFactory.java diff --git a/OCPP-J/src/main/java/eu/chargetime/ocpp/wss/WssFactoryBuilder.java b/ocpp-json/src/main/java/eu/chargetime/ocpp/wss/WssFactoryBuilder.java similarity index 100% rename from OCPP-J/src/main/java/eu/chargetime/ocpp/wss/WssFactoryBuilder.java rename to ocpp-json/src/main/java/eu/chargetime/ocpp/wss/WssFactoryBuilder.java diff --git a/OCPP-J/src/main/java/eu/chargetime/ocpp/wss/WssSocketBuilder.java b/ocpp-json/src/main/java/eu/chargetime/ocpp/wss/WssSocketBuilder.java similarity index 100% rename from OCPP-J/src/main/java/eu/chargetime/ocpp/wss/WssSocketBuilder.java rename to ocpp-json/src/main/java/eu/chargetime/ocpp/wss/WssSocketBuilder.java diff --git a/OCPP-J/src/test/java/eu/chargetime/ocpp/wss/test/BaseWssFactoryBuilderTest.java b/ocpp-json/src/test/java/eu/chargetime/ocpp/wss/test/BaseWssFactoryBuilderTest.java similarity index 100% rename from OCPP-J/src/test/java/eu/chargetime/ocpp/wss/test/BaseWssFactoryBuilderTest.java rename to ocpp-json/src/test/java/eu/chargetime/ocpp/wss/test/BaseWssFactoryBuilderTest.java diff --git a/OCPP-J/src/test/java/eu/chargetime/ocpp/wss/test/BaseWssSocketBuilderTest.java b/ocpp-json/src/test/java/eu/chargetime/ocpp/wss/test/BaseWssSocketBuilderTest.java similarity index 100% rename from OCPP-J/src/test/java/eu/chargetime/ocpp/wss/test/BaseWssSocketBuilderTest.java rename to ocpp-json/src/test/java/eu/chargetime/ocpp/wss/test/BaseWssSocketBuilderTest.java diff --git a/OCPP-J/src/test/java/eu/chargetime/ocpp/wss/test/CustomSSLWebSocketServerFactoryTest.java b/ocpp-json/src/test/java/eu/chargetime/ocpp/wss/test/CustomSSLWebSocketServerFactoryTest.java similarity index 100% rename from OCPP-J/src/test/java/eu/chargetime/ocpp/wss/test/CustomSSLWebSocketServerFactoryTest.java rename to ocpp-json/src/test/java/eu/chargetime/ocpp/wss/test/CustomSSLWebSocketServerFactoryTest.java diff --git a/ocpp-v1_6-json/build.gradle b/ocpp-v1_6-json/build.gradle index 0314a0839..aa5290f1e 100644 --- a/ocpp-v1_6-json/build.gradle +++ b/ocpp-v1_6-json/build.gradle @@ -4,7 +4,7 @@ dependencies { compile project(':v1_6') - compile project(':OCPP-J') + compile project(':ocpp-json') testCompile 'junit:junit:4.13.2' testCompile 'org.mockito:mockito-core:4.11.0' diff --git a/ocpp-v2/build.gradle b/ocpp-v2/build.gradle index 11b4bb592..346bc5fc2 100644 --- a/ocpp-v2/build.gradle +++ b/ocpp-v2/build.gradle @@ -4,7 +4,7 @@ dependencies { compile project(':common') - compile project(':OCPP-J') + compile project(':ocpp-json') compile 'com.google.code.findbugs:jsr305:3.0.1' compile 'org.java-websocket:Java-WebSocket:1.6.0' testCompile 'junit:junit:4.13.2' diff --git a/pom.xml b/pom.xml index 8e04a9391..fb6b07d1e 100644 --- a/pom.xml +++ b/pom.xml @@ -37,7 +37,7 @@ ocpp-common - OCPP-J + ocpp-json ocpp-v1_6 ocpp-v1_6-json ocpp-v1_6-soap diff --git a/settings.gradle b/settings.gradle index 69b3500aa..9aa1085eb 100644 --- a/settings.gradle +++ b/settings.gradle @@ -5,7 +5,7 @@ rootProject.name = 'all' include(':common') project(':common').projectDir = file('ocpp-common') -include(':OCPP-J') +include(':ocpp-json') include(':ocpp-v2') include(':ocpp-v2-test') include(':v1_6') From 0f4311323b89dd5ae0ed694500b077a33ea7d894 Mon Sep 17 00:00:00 2001 From: Robert Schlabbach Date: Sat, 6 Dec 2025 13:08:50 +0100 Subject: [PATCH 6/7] Rename artefacts/subprojects and update README.md Also clean up dependencies and make them consistent, and unify spacing across pom.xml files. --- README.md | 17 +- build.gradle | 2 +- ocpp-common/build.gradle | 5 +- ocpp-common/pom.xml | 49 +++--- ocpp-json/build.gradle | 7 +- ocpp-json/pom.xml | 148 +++++++++--------- .../json-client-implementation/pom.xml | 20 +-- ocpp-v1_6-example/json_server_example/pom.xml | 22 +-- ocpp-v1_6-json/build.gradle | 4 +- ocpp-v1_6-json/pom.xml | 36 ++--- ocpp-v1_6-soap/build.gradle | 4 +- ocpp-v1_6-soap/pom.xml | 34 ++-- ocpp-v1_6-test/build.gradle | 14 +- ocpp-v1_6-test/pom.xml | 76 ++++----- ocpp-v1_6/build.gradle | 4 +- ocpp-v1_6/pom.xml | 34 ++-- ocpp-v2-test/build.gradle | 16 +- ocpp-v2-test/pom.xml | 75 +++------ ocpp-v2/build.gradle | 9 +- ocpp-v2/pom.xml | 137 ++++++++-------- pom.xml | 37 +++-- settings.gradle | 31 ++-- 22 files changed, 360 insertions(+), 421 deletions(-) diff --git a/README.md b/README.md index a5abddc93..60aad5575 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,22 @@ Please note, this is a library and not an application, so there is no main metho The design is driven by test, which will ensure premium software that is easy to adapt and modify to your needs. -The library supports version 2.0.1 and 1.6 SOAP and web sockets. +The library supports OCPP 1.6 with JSON and SOAP transports and OCPP 2.0.1. + +The following packages are built from the sources: + +| Package | Description | +|-------------|-------------------------------------------------------------------| +| ocpp16j | OCPP 1.6 with JSON transport (only) | +| ocpp16s | OCPP 1.6 with SOAP transport (only) | +| ocpp2 | OCPP 2.0.1 (multi-protocol capable, ocpp16j integration possible) | +| | | +| ocpp16 | OCPP 1.6 base dependency package | +| ocpp-common | common dependency package | +| ocpp-json | JSON transport dependency package | +| | | +| ocpp16-test | OCPP 1.6 integration tests | +| ocpp2-test | OCPP 1.6 and 2.0.1 integration tests | Incoming request events are split into feature profiles as described in the OCPP specification. I recommend that you download and read the specification from openchargealliance.org diff --git a/build.gradle b/build.gradle index 9309117cf..bc5af6a92 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ /* - * This file was generated by the Gradle 'init' task. + * Java-OCA-OCPP gradle build configuration */ buildscript { diff --git a/ocpp-common/build.gradle b/ocpp-common/build.gradle index b679d3139..b2b084697 100644 --- a/ocpp-common/build.gradle +++ b/ocpp-common/build.gradle @@ -1,3 +1,6 @@ +/* + * Java-OCA-OCPP ocpp-common gradle build configuration + */ dependencies { compile 'org.slf4j:slf4j-api:2.0.17' @@ -9,4 +12,4 @@ dependencies { testCompile 'org.hamcrest:hamcrest-all:1.3' } -description = 'Java-OCA-OCPP Common' +description = 'Java-OCA-OCPP OCPP Common Package' diff --git a/ocpp-common/pom.xml b/ocpp-common/pom.xml index ea6099acf..02e2c8ee8 100644 --- a/ocpp-common/pom.xml +++ b/ocpp-common/pom.xml @@ -5,11 +5,11 @@ 4.0.0 eu.chargetime.ocpp - common + ocpp-common 1.2.0 - Java-OCA-OCPP common - Implementation of Open Charge-Point Protocol common library. + Java-OCA-OCPP OCPP Common Package + Java-OCA-OCPP common dependency package https://github.com/ChargeTimeEU/Java-OCA-OCPP @@ -85,6 +85,7 @@ test + @@ -124,29 +125,29 @@ - org.apache.maven.plugins - maven-gpg-plugin - 3.2.8 - - - sign-artifacts - verify - - sign - - - + org.apache.maven.plugins + maven-gpg-plugin + 3.2.8 + + + sign-artifacts + verify + + sign + + + - org.sonatype.plugins - nexus-staging-maven-plugin - 1.7.0 - true - - ossrh - https://oss.sonatype.org/ - true - + org.sonatype.plugins + nexus-staging-maven-plugin + 1.7.0 + true + + ossrh + https://oss.sonatype.org/ + true + diff --git a/ocpp-json/build.gradle b/ocpp-json/build.gradle index 5148e2f94..6eead7e29 100644 --- a/ocpp-json/build.gradle +++ b/ocpp-json/build.gradle @@ -1,11 +1,12 @@ /* - * This file was generated by the Gradle 'init' task. + * Java-OCA-OCPP ocpp-json gradle build configuration */ dependencies { - compile project(':common') + compile project(':ocpp-common') compile 'com.google.code.gson:gson:2.13.2' compile 'org.java-websocket:Java-WebSocket:1.6.0' + testCompile 'junit:junit:4.13.2' testCompile 'org.mockito:mockito-core:4.11.0' testCompile 'org.hamcrest:hamcrest-core:3.0' @@ -16,5 +17,5 @@ task javadocJar(type: Jar) { from(javadoc.destinationDir) } -description = 'Java-OCA-OCPP OCPP-J' +description = 'Java-OCA-OCPP OCPP JSON Transport' publishing.publications.maven.artifact(javadocJar) diff --git a/ocpp-json/pom.xml b/ocpp-json/pom.xml index a85e90331..29b34e4fe 100644 --- a/ocpp-json/pom.xml +++ b/ocpp-json/pom.xml @@ -5,35 +5,35 @@ 4.0.0 eu.chargetime.ocpp - OCPP-J + ocpp-json 1.2.0 jar - Java-OCA-OCPP OCPP-J - Implementation of Open Charge-Point Protocols OCPP-J + Java-OCA-OCPP OCPP JSON Transport + JSON transport dependency package https://github.com/ChargeTimeEU/Java-OCA-OCPP - - MIT License - http://www.opensource.org/licenses/mit-license.php - + + MIT License + http://www.opensource.org/licenses/mit-license.php + - - Thomas Volden - tv@chargetime.eu - chargetime.eu - http://www.chargetime.eu - - + + Thomas Volden + tv@chargetime.eu + chargetime.eu + http://www.chargetime.eu + + - - scm:git:git://github.com/ChargeTimeEU/Java-OCA-OCPP.git - scm:git:ssh://github.com:ChargeTimeEU/Java-OCA-OCPP.git - https://github.com/ChargeTimeEU/Java-OCA-OCPP.git - + + scm:git:git://github.com/ChargeTimeEU/Java-OCA-OCPP.git + scm:git:ssh://github.com:ChargeTimeEU/Java-OCA-OCPP.git + https://github.com/ChargeTimeEU/Java-OCA-OCPP.git + @@ -49,7 +49,7 @@ eu.chargetime.ocpp - common + ocpp-common 1.2.0 @@ -81,78 +81,72 @@ 3.0 test - - ch.qos.logback - logback-classic - 1.3.16 - test - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.8 - 1.8 - - 3.14.1 - - + + org.apache.maven.plugins + maven-compiler-plugin + + 1.8 + 1.8 + + 3.14.1 + + org.apache.maven.plugins maven-source-plugin 3.4.0 - - attach-sources - verify - - jar-no-fork - - + + attach-sources + verify + + jar-no-fork + + - + - org.apache.maven.plugins - maven-javadoc-plugin - 3.12.0 - - - attach-javadocs - - jar - - - + org.apache.maven.plugins + maven-javadoc-plugin + 3.12.0 + + + attach-javadocs + + jar + + + - org.apache.maven.plugins - maven-gpg-plugin - 3.2.8 - - - sign-artifacts - verify - - sign - - - + org.apache.maven.plugins + maven-gpg-plugin + 3.2.8 + + + sign-artifacts + verify + + sign + + + - org.sonatype.plugins - nexus-staging-maven-plugin - 1.7.0 - true - - ossrh - https://oss.sonatype.org/ - true - + org.sonatype.plugins + nexus-staging-maven-plugin + 1.7.0 + true + + ossrh + https://oss.sonatype.org/ + true + - \ No newline at end of file + diff --git a/ocpp-v1_6-example/json-client-implementation/pom.xml b/ocpp-v1_6-example/json-client-implementation/pom.xml index be1ca69ef..f2729f716 100644 --- a/ocpp-v1_6-example/json-client-implementation/pom.xml +++ b/ocpp-v1_6-example/json-client-implementation/pom.xml @@ -9,10 +9,10 @@ eu.chargetime.ocpp - json-client-implementation - 0.0.1-SNAPSHOT - json-client-implementation - Demo project for a json client application, written in form of tests + ocpp16-json-client-example + 1.2.0 + Example OCPP 1.6 JSON Client Implementation + Demo project for an OCPP 1.6 JSON client application, written in form of tests 11 @@ -33,19 +33,9 @@ lombok true - - org.java-websocket - Java-WebSocket - 1.6.0 - - - com.google.code.gson - gson - 2.8.9 - eu.chargetime.ocpp - v1_6 + ocpp16j 1.2.0 diff --git a/ocpp-v1_6-example/json_server_example/pom.xml b/ocpp-v1_6-example/json_server_example/pom.xml index 5d81b4763..077c53f43 100644 --- a/ocpp-v1_6-example/json_server_example/pom.xml +++ b/ocpp-v1_6-example/json_server_example/pom.xml @@ -9,10 +9,10 @@ eu.chargetime.ocpp - json-server-implementation - 0.0.1-SNAPSHOT - json-server-implementation - Example Spring Application of a json server + ocpp16-json-server-example + 1.2.0 + Example OCPP 1.6 JSON Server Implementation + Example Spring Application of an OCPP 1.6 JSON Server 11 @@ -21,31 +21,19 @@ org.springframework.boot spring-boot-starter - org.springframework.boot spring-boot-starter-test test - org.projectlombok lombok true - - org.java-websocket - Java-WebSocket - 1.6.0 - - - com.google.code.gson - gson - 2.8.9 - eu.chargetime.ocpp - v1_6 + ocpp16j 1.2.0 diff --git a/ocpp-v1_6-json/build.gradle b/ocpp-v1_6-json/build.gradle index aa5290f1e..07bbaf892 100644 --- a/ocpp-v1_6-json/build.gradle +++ b/ocpp-v1_6-json/build.gradle @@ -1,9 +1,9 @@ /* - * Java-OCA-OCPP ocpp-v1_6-json gradle build configuration + * Java-OCA-OCPP ocpp16j gradle build configuration */ dependencies { - compile project(':v1_6') + compile project(':ocpp16') compile project(':ocpp-json') testCompile 'junit:junit:4.13.2' diff --git a/ocpp-v1_6-json/pom.xml b/ocpp-v1_6-json/pom.xml index f877a3146..94ff7f66d 100644 --- a/ocpp-v1_6-json/pom.xml +++ b/ocpp-v1_6-json/pom.xml @@ -5,7 +5,7 @@ 4.0.0 eu.chargetime.ocpp - v1_6j + ocpp16j 1.2.0 jar @@ -49,12 +49,12 @@ eu.chargetime.ocpp - v1_6 + ocpp16 1.2.0 eu.chargetime.ocpp - OCPP-J + ocpp-json 1.2.0 @@ -75,12 +75,6 @@ 3.0 test - - ch.qos.logback - logback-classic - 1.3.16 - test - @@ -134,18 +128,18 @@ - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.7.0 - true - - ossrh - https://oss.sonatype.org/ - true - - + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.7.0 + true + + ossrh + https://oss.sonatype.org/ + true + + diff --git a/ocpp-v1_6-soap/build.gradle b/ocpp-v1_6-soap/build.gradle index d1984419d..77aa8ac87 100644 --- a/ocpp-v1_6-soap/build.gradle +++ b/ocpp-v1_6-soap/build.gradle @@ -1,9 +1,9 @@ /* - * Java-OCA-OCPP ocpp-v1_6-soap gradle build configuration + * Java-OCA-OCPP ocpp16s gradle build configuration */ dependencies { - compile project(':v1_6') + compile project(':ocpp16') compile group: 'javax.xml.soap', name: 'javax.xml.soap-api', version: '1.4.0' testCompile 'junit:junit:4.13.2' diff --git a/ocpp-v1_6-soap/pom.xml b/ocpp-v1_6-soap/pom.xml index 7b3368bad..49ad0ee77 100644 --- a/ocpp-v1_6-soap/pom.xml +++ b/ocpp-v1_6-soap/pom.xml @@ -5,7 +5,7 @@ 4.0.0 eu.chargetime.ocpp - v1_6s + ocpp16s 1.2.0 jar @@ -49,7 +49,7 @@ eu.chargetime.ocpp - v1_6 + ocpp16 1.2.0 @@ -75,12 +75,6 @@ 3.0 test - - ch.qos.logback - logback-classic - 1.3.16 - test - @@ -134,18 +128,18 @@ - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.7.0 - true - - ossrh - https://oss.sonatype.org/ - true - - + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.7.0 + true + + ossrh + https://oss.sonatype.org/ + true + + diff --git a/ocpp-v1_6-test/build.gradle b/ocpp-v1_6-test/build.gradle index aca71021c..911210bd6 100644 --- a/ocpp-v1_6-test/build.gradle +++ b/ocpp-v1_6-test/build.gradle @@ -1,5 +1,5 @@ /* - * This file was generated by the Gradle 'init' task. + * Java-OCA-OCPP ocpp16-test gradle build configuration */ plugins { @@ -7,16 +7,16 @@ plugins { } dependencies { - compile project(':common') - compile project(':v1_6j') - compile project(':v1_6s') + compile project(':ocpp16j') + compile project(':ocpp16s') + testCompile 'junit:junit:4.13.2' - testCompile 'org.codehaus.groovy:groovy-all:2.4.11' - testCompile 'org.spockframework:spock-core:1.0-groovy-2.4' + testCompile 'org.codehaus.groovy:groovy-all:3.0.25' + testCompile 'org.spockframework:spock-core:2.3-groovy-3.0' testCompile 'org.hamcrest:hamcrest-core:3.0' testCompile 'ch.qos.logback:logback-core:1.3.16' testCompile 'ch.qos.logback:logback-classic:1.3.16' testCompile 'org.slf4j:jul-to-slf4j:2.0.17' } -description = 'Java-OCA-OCPP v1.6 - Integration test' +description = 'Java-OCA-OCPP OCPP 1.6 Integration Tests' diff --git a/ocpp-v1_6-test/pom.xml b/ocpp-v1_6-test/pom.xml index 14ab7c03c..53ffb3a5e 100644 --- a/ocpp-v1_6-test/pom.xml +++ b/ocpp-v1_6-test/pom.xml @@ -5,34 +5,34 @@ 4.0.0 eu.chargetime.ocpp - v1_6-test + ocpp16-test 1.2.0 - Java-OCA-OCPP v1.6 - Integration test - Integration test of OCA OCPP version 1.6 + Java-OCA-OCPP OCPP 1.6 Integration Tests + OCPP 1.6 integration tests https://github.com/ChargeTimeEU/Java-OCA-OCPP - - MIT License - http://www.opensource.org/licenses/mit-license.php - + + MIT License + http://www.opensource.org/licenses/mit-license.php + - - Thomas Volden - tv@chargetime.eu - chargetime.eu - http://www.chargetime.eu - - + + Thomas Volden + tv@chargetime.eu + chargetime.eu + http://www.chargetime.eu + + - - scm:git:git://github.com/ChargeTimeEU/Java-OCA-OCPP.git - scm:git:ssh://github.com:ChargeTimeEU/Java-OCA-OCPP.git - https://github.com/ChargeTimeEU/Java-OCA-OCPP.git - + + scm:git:git://github.com/ChargeTimeEU/Java-OCA-OCPP.git + scm:git:ssh://github.com:ChargeTimeEU/Java-OCA-OCPP.git + https://github.com/ChargeTimeEU/Java-OCA-OCPP.git + @@ -48,12 +48,12 @@ eu.chargetime.ocpp - common + ocpp16j 1.2.0 eu.chargetime.ocpp - v1_6 + ocpp16s 1.2.0 @@ -74,24 +74,24 @@ 3.0 test - - ch.qos.logback - logback-core - 1.3.16 + + ch.qos.logback + logback-core + 1.3.16 + test + + + ch.qos.logback + logback-classic + 1.3.16 test - - - ch.qos.logback - logback-classic - 1.3.16 - test - - - org.slf4j - jul-to-slf4j - 2.0.17 - test - + + + org.slf4j + jul-to-slf4j + 2.0.17 + test + diff --git a/ocpp-v1_6/build.gradle b/ocpp-v1_6/build.gradle index 502be655d..725da9ed6 100644 --- a/ocpp-v1_6/build.gradle +++ b/ocpp-v1_6/build.gradle @@ -1,9 +1,9 @@ /* - * This file was generated by the Gradle 'init' task. + * Java-OCA-OCPP ocpp16j gradle build configuration */ dependencies { - compile project(':common') + compile project(':ocpp-common') testCompile 'junit:junit:4.13.2' testCompile 'org.mockito:mockito-core:4.11.0' diff --git a/ocpp-v1_6/pom.xml b/ocpp-v1_6/pom.xml index 9f95992fb..07f78c668 100644 --- a/ocpp-v1_6/pom.xml +++ b/ocpp-v1_6/pom.xml @@ -5,7 +5,7 @@ 4.0.0 eu.chargetime.ocpp - v1_6 + ocpp16 1.2.0 jar @@ -49,7 +49,7 @@ eu.chargetime.ocpp - common + ocpp-common 1.2.0 @@ -70,12 +70,6 @@ 3.0 test - - ch.qos.logback - logback-classic - 1.3.16 - test - @@ -129,18 +123,18 @@ - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.7.0 - true - - ossrh - https://oss.sonatype.org/ - true - - + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.7.0 + true + + ossrh + https://oss.sonatype.org/ + true + + diff --git a/ocpp-v2-test/build.gradle b/ocpp-v2-test/build.gradle index 48bfb55a3..7e70f5619 100644 --- a/ocpp-v2-test/build.gradle +++ b/ocpp-v2-test/build.gradle @@ -1,16 +1,18 @@ /* - * This file was generated by the Gradle 'init' task. + * Java-OCA-OCPP ocpp2-test gradle build configuration */ dependencies { - compile project(':common') - compile project(':v1_6') - compile project(':v1_6-test') - compile project(':ocpp-v2') - compile 'com.google.code.findbugs:jsr305:3.0.1' + compile project(':ocpp16j') + compile project(':ocpp16s') + compile project(':ocpp16-test') + compile project(':ocpp2') + + compile 'com.google.code.findbugs:jsr305:3.0.2' + testCompile 'junit:junit:4.13.2' testCompile 'org.mockito:mockito-core:4.11.0' testCompile 'org.hamcrest:hamcrest-core:3.0' } -description = 'Java-OCA-OCPP v2 - Integration test' +description = 'Java-OCA-OCPP OCPP 2.x Integration Tests' diff --git a/ocpp-v2-test/pom.xml b/ocpp-v2-test/pom.xml index 895616609..e9b8dea70 100644 --- a/ocpp-v2-test/pom.xml +++ b/ocpp-v2-test/pom.xml @@ -5,34 +5,34 @@ 4.0.0 eu.chargetime.ocpp - ocpp-v2-test + ocpp2-test 1.2.0 - Java-OCA-OCPP v2 - Integration test - Integration test of OCA OCPP version 2.x + Java-OCA-OCPP OCPP 2.x Integration Tests + OCPP 1.6 and 2.0.1 integration tests https://github.com/ChargeTimeEU/Java-OCA-OCPP - - MIT License - http://www.opensource.org/licenses/mit-license.php - + + MIT License + http://www.opensource.org/licenses/mit-license.php + - - Thomas Volden - tv@chargetime.eu - chargetime.eu - http://www.chargetime.eu - - + + Thomas Volden + tv@chargetime.eu + chargetime.eu + http://www.chargetime.eu + + - - scm:git:git://github.com/ChargeTimeEU/Java-OCA-OCPP.git - scm:git:ssh://github.com:ChargeTimeEU/Java-OCA-OCPP.git - https://github.com/ChargeTimeEU/Java-OCA-OCPP.git - + + scm:git:git://github.com/ChargeTimeEU/Java-OCA-OCPP.git + scm:git:ssh://github.com:ChargeTimeEU/Java-OCA-OCPP.git + https://github.com/ChargeTimeEU/Java-OCA-OCPP.git + @@ -48,27 +48,22 @@ eu.chargetime.ocpp - common - 1.2.0 - - - eu.chargetime.ocpp - OCPP-J + ocpp16j 1.2.0 eu.chargetime.ocpp - v1_6 + ocpp16s 1.2.0 eu.chargetime.ocpp - v1_6-test + ocpp16-test 1.2.0 eu.chargetime.ocpp - ocpp-v2 + ocpp2 1.2.0 @@ -88,36 +83,12 @@ 4.11.0 test - - org.spockframework - spock-core - 2.3-groovy-4.0 - test - org.hamcrest hamcrest-core 3.0 test - - ch.qos.logback - logback-core - 1.3.16 - test - - - ch.qos.logback - logback-classic - 1.3.16 - test - - - org.slf4j - jul-to-slf4j - 2.0.17 - test - diff --git a/ocpp-v2/build.gradle b/ocpp-v2/build.gradle index 346bc5fc2..527cb4c0e 100644 --- a/ocpp-v2/build.gradle +++ b/ocpp-v2/build.gradle @@ -1,12 +1,13 @@ /* - * This file was generated by the Gradle 'init' task. + * Java-OCA-OCPP ocpp2 gradle build configuration */ dependencies { - compile project(':common') + compile project(':ocpp-common') compile project(':ocpp-json') - compile 'com.google.code.findbugs:jsr305:3.0.1' - compile 'org.java-websocket:Java-WebSocket:1.6.0' + + compile 'com.google.code.findbugs:jsr305:3.0.2' + testCompile 'junit:junit:4.13.2' testCompile 'org.mockito:mockito-core:4.11.0' testCompile 'org.hamcrest:hamcrest-core:3.0' diff --git a/ocpp-v2/pom.xml b/ocpp-v2/pom.xml index 4c01af421..2e48faf21 100644 --- a/ocpp-v2/pom.xml +++ b/ocpp-v2/pom.xml @@ -5,7 +5,7 @@ 4.0.0 eu.chargetime.ocpp - ocpp-v2 + ocpp2 1.2.0 jar @@ -14,26 +14,26 @@ https://github.com/ChargeTimeEU/Java-OCA-OCPP - - MIT License - http://www.opensource.org/licenses/mit-license.php - + + MIT License + http://www.opensource.org/licenses/mit-license.php + - - Thomas Volden - tv@chargetime.eu - chargetime.eu - http://www.chargetime.eu - - + + Thomas Volden + tv@chargetime.eu + chargetime.eu + http://www.chargetime.eu + + - - scm:git:git://github.com/ChargeTimeEU/Java-OCA-OCPP.git - scm:git:ssh://github.com:ChargeTimeEU/Java-OCA-OCPP.git - https://github.com/ChargeTimeEU/Java-OCA-OCPP.git - + + scm:git:git://github.com/ChargeTimeEU/Java-OCA-OCPP.git + scm:git:ssh://github.com:ChargeTimeEU/Java-OCA-OCPP.git + https://github.com/ChargeTimeEU/Java-OCA-OCPP.git + @@ -49,12 +49,12 @@ eu.chargetime.ocpp - common + ocpp-common 1.2.0 eu.chargetime.ocpp - OCPP-J + ocpp-json 1.2.0 @@ -62,11 +62,6 @@ jsr305 3.0.2 - - org.java-websocket - Java-WebSocket - 1.6.0 - junit junit @@ -85,12 +80,6 @@ 3.0 test - - ch.qos.logback - logback-classic - 1.3.16 - test - @@ -105,56 +94,56 @@ 3.14.1 - org.apache.maven.plugins - maven-source-plugin - 3.4.0 - - - attach-sources - verify - - jar-no-fork - - - + org.apache.maven.plugins + maven-source-plugin + 3.4.0 + + + attach-sources + verify + + jar-no-fork + + + - org.apache.maven.plugins - maven-javadoc-plugin - 3.12.0 - - - attach-javadocs - - jar - - - + org.apache.maven.plugins + maven-javadoc-plugin + 3.12.0 + + + attach-javadocs + + jar + + + - org.apache.maven.plugins - maven-gpg-plugin - 3.2.8 - - - sign-artifacts - verify - - sign - - - + org.apache.maven.plugins + maven-gpg-plugin + 3.2.8 + + + sign-artifacts + verify + + sign + + + - org.sonatype.plugins - nexus-staging-maven-plugin - 1.7.0 - true - - ossrh - https://oss.sonatype.org/ - true - + org.sonatype.plugins + nexus-staging-maven-plugin + 1.7.0 + true + + ossrh + https://oss.sonatype.org/ + true + diff --git a/pom.xml b/pom.xml index fb6b07d1e..e6153c088 100644 --- a/pom.xml +++ b/pom.xml @@ -5,35 +5,35 @@ 4.0.0 eu.chargetime.ocpp - all + java-oca-ocpp 1.2 pom Java-OCA-OCPP - Implementation of Open Charge-Point Protocol common library. + A JAVA library for the Open Charge-Point Protocol from openchargealliance.org https://github.com/ChargeTimeEU/Java-OCA-OCPP - - MIT License - http://www.opensource.org/licenses/mit-license.php - + + MIT License + http://www.opensource.org/licenses/mit-license.php + - - Thomas Volden - tv@chargetime.eu - chargetime.eu - http://www.chargetime.eu - - + + Thomas Volden + tv@chargetime.eu + chargetime.eu + http://www.chargetime.eu + + - - scm:git:git://github.com/ChargeTimeEU/Java-OCA-OCPP.git - scm:git:ssh://github.com:ChargeTimeEU/Java-OCA-OCPP.git - https://github.com/ChargeTimeEU/Java-OCA-OCPP.git - + + scm:git:git://github.com/ChargeTimeEU/Java-OCA-OCPP.git + scm:git:ssh://github.com:ChargeTimeEU/Java-OCA-OCPP.git + https://github.com/ChargeTimeEU/Java-OCA-OCPP.git + ocpp-common @@ -68,7 +68,6 @@ 3.14.1 - org.eluder.coveralls coveralls-maven-plugin diff --git a/settings.gradle b/settings.gradle index 9aa1085eb..d5b6f617f 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,18 +1,21 @@ /* - * This file was generated by the Gradle 'init' task. + * Java-OCA-OCPP gradle settings */ -rootProject.name = 'all' -include(':common') -project(':common').projectDir = file('ocpp-common') +rootProject.name = 'java-oca-ocpp' + +include(':ocpp16') +include(':ocpp16j') +include(':ocpp16s') +include(':ocpp16-test') +include(':ocpp2') +include(':ocpp2-test') +include(':ocpp-common') include(':ocpp-json') -include(':ocpp-v2') -include(':ocpp-v2-test') -include(':v1_6') -include(':v1_6j') -include(':v1_6s') -include(':v1_6-test') -project(':v1_6').projectDir = file('ocpp-v1_6') -project(':v1_6j').projectDir = file('ocpp-v1_6-json') -project(':v1_6s').projectDir = file('ocpp-v1_6-soap') -project(':v1_6-test').projectDir = file('ocpp-v1_6-test') \ No newline at end of file + +project(':ocpp16').projectDir = file('ocpp-v1_6') +project(':ocpp16j').projectDir = file('ocpp-v1_6-json') +project(':ocpp16s').projectDir = file('ocpp-v1_6-soap') +project(':ocpp16-test').projectDir = file('ocpp-v1_6-test') +project(':ocpp2').projectDir = file('ocpp-v2') +project(':ocpp2-test').projectDir = file('ocpp-v2-test') From 2711952bc3df98386aca49c69727ac9babfbdb4a Mon Sep 17 00:00:00 2001 From: Robert Schlabbach Date: Sat, 6 Dec 2025 09:23:36 +0100 Subject: [PATCH 7/7] Bump library version to 2.0 --- build.gradle | 2 +- ocpp-common/pom.xml | 2 +- ocpp-json/pom.xml | 4 ++-- ocpp-v1_6-example/json-client-implementation/pom.xml | 4 ++-- ocpp-v1_6-example/json_server_example/pom.xml | 4 ++-- ocpp-v1_6-json/pom.xml | 6 +++--- ocpp-v1_6-soap/pom.xml | 4 ++-- ocpp-v1_6-test/pom.xml | 6 +++--- ocpp-v1_6/pom.xml | 4 ++-- ocpp-v2-test/pom.xml | 10 +++++----- ocpp-v2/pom.xml | 6 +++--- pom.xml | 2 +- 12 files changed, 27 insertions(+), 27 deletions(-) diff --git a/build.gradle b/build.gradle index bc5af6a92..358bb8d63 100644 --- a/build.gradle +++ b/build.gradle @@ -15,7 +15,7 @@ buildscript { allprojects { group = 'eu.chargetime.ocpp' - version = '1.2' + version = '2.0' } subprojects { diff --git a/ocpp-common/pom.xml b/ocpp-common/pom.xml index 02e2c8ee8..5eed172a6 100644 --- a/ocpp-common/pom.xml +++ b/ocpp-common/pom.xml @@ -6,7 +6,7 @@ eu.chargetime.ocpp ocpp-common - 1.2.0 + 2.0.0 Java-OCA-OCPP OCPP Common Package Java-OCA-OCPP common dependency package diff --git a/ocpp-json/pom.xml b/ocpp-json/pom.xml index 29b34e4fe..d75a3b0f3 100644 --- a/ocpp-json/pom.xml +++ b/ocpp-json/pom.xml @@ -6,7 +6,7 @@ eu.chargetime.ocpp ocpp-json - 1.2.0 + 2.0.0 jar Java-OCA-OCPP OCPP JSON Transport @@ -50,7 +50,7 @@ eu.chargetime.ocpp ocpp-common - 1.2.0 + 2.0.0 com.google.code.gson diff --git a/ocpp-v1_6-example/json-client-implementation/pom.xml b/ocpp-v1_6-example/json-client-implementation/pom.xml index f2729f716..8732aae73 100644 --- a/ocpp-v1_6-example/json-client-implementation/pom.xml +++ b/ocpp-v1_6-example/json-client-implementation/pom.xml @@ -10,7 +10,7 @@ eu.chargetime.ocpp ocpp16-json-client-example - 1.2.0 + 2.0.0 Example OCPP 1.6 JSON Client Implementation Demo project for an OCPP 1.6 JSON client application, written in form of tests @@ -36,7 +36,7 @@ eu.chargetime.ocpp ocpp16j - 1.2.0 + 2.0.0 junit diff --git a/ocpp-v1_6-example/json_server_example/pom.xml b/ocpp-v1_6-example/json_server_example/pom.xml index 077c53f43..65c45cd53 100644 --- a/ocpp-v1_6-example/json_server_example/pom.xml +++ b/ocpp-v1_6-example/json_server_example/pom.xml @@ -10,7 +10,7 @@ eu.chargetime.ocpp ocpp16-json-server-example - 1.2.0 + 2.0.0 Example OCPP 1.6 JSON Server Implementation Example Spring Application of an OCPP 1.6 JSON Server @@ -34,7 +34,7 @@ eu.chargetime.ocpp ocpp16j - 1.2.0 + 2.0.0 junit diff --git a/ocpp-v1_6-json/pom.xml b/ocpp-v1_6-json/pom.xml index 94ff7f66d..9e62b1023 100644 --- a/ocpp-v1_6-json/pom.xml +++ b/ocpp-v1_6-json/pom.xml @@ -6,7 +6,7 @@ eu.chargetime.ocpp ocpp16j - 1.2.0 + 2.0.0 jar Java-OCA-OCPP OCPP 1.6J @@ -50,12 +50,12 @@ eu.chargetime.ocpp ocpp16 - 1.2.0 + 2.0.0 eu.chargetime.ocpp ocpp-json - 1.2.0 + 2.0.0 junit diff --git a/ocpp-v1_6-soap/pom.xml b/ocpp-v1_6-soap/pom.xml index 49ad0ee77..f6669069b 100644 --- a/ocpp-v1_6-soap/pom.xml +++ b/ocpp-v1_6-soap/pom.xml @@ -6,7 +6,7 @@ eu.chargetime.ocpp ocpp16s - 1.2.0 + 2.0.0 jar Java-OCA-OCPP OCPP 1.6S @@ -50,7 +50,7 @@ eu.chargetime.ocpp ocpp16 - 1.2.0 + 2.0.0 javax.xml.soap diff --git a/ocpp-v1_6-test/pom.xml b/ocpp-v1_6-test/pom.xml index 53ffb3a5e..4a75d63ed 100644 --- a/ocpp-v1_6-test/pom.xml +++ b/ocpp-v1_6-test/pom.xml @@ -6,7 +6,7 @@ eu.chargetime.ocpp ocpp16-test - 1.2.0 + 2.0.0 Java-OCA-OCPP OCPP 1.6 Integration Tests OCPP 1.6 integration tests @@ -49,12 +49,12 @@ eu.chargetime.ocpp ocpp16j - 1.2.0 + 2.0.0 eu.chargetime.ocpp ocpp16s - 1.2.0 + 2.0.0 junit diff --git a/ocpp-v1_6/pom.xml b/ocpp-v1_6/pom.xml index 07f78c668..7798cccdc 100644 --- a/ocpp-v1_6/pom.xml +++ b/ocpp-v1_6/pom.xml @@ -6,7 +6,7 @@ eu.chargetime.ocpp ocpp16 - 1.2.0 + 2.0.0 jar Java-OCA-OCPP OCPP 1.6 (no transport) @@ -50,7 +50,7 @@ eu.chargetime.ocpp ocpp-common - 1.2.0 + 2.0.0 junit diff --git a/ocpp-v2-test/pom.xml b/ocpp-v2-test/pom.xml index e9b8dea70..aa0c5d558 100644 --- a/ocpp-v2-test/pom.xml +++ b/ocpp-v2-test/pom.xml @@ -6,7 +6,7 @@ eu.chargetime.ocpp ocpp2-test - 1.2.0 + 2.0.0 Java-OCA-OCPP OCPP 2.x Integration Tests OCPP 1.6 and 2.0.1 integration tests @@ -49,22 +49,22 @@ eu.chargetime.ocpp ocpp16j - 1.2.0 + 2.0.0 eu.chargetime.ocpp ocpp16s - 1.2.0 + 2.0.0 eu.chargetime.ocpp ocpp16-test - 1.2.0 + 2.0.0 eu.chargetime.ocpp ocpp2 - 1.2.0 + 2.0.0 com.google.code.findbugs diff --git a/ocpp-v2/pom.xml b/ocpp-v2/pom.xml index 2e48faf21..1eecd6db7 100644 --- a/ocpp-v2/pom.xml +++ b/ocpp-v2/pom.xml @@ -6,7 +6,7 @@ eu.chargetime.ocpp ocpp2 - 1.2.0 + 2.0.0 jar Java-OCA-OCPP OCPP 2.x @@ -50,12 +50,12 @@ eu.chargetime.ocpp ocpp-common - 1.2.0 + 2.0.0 eu.chargetime.ocpp ocpp-json - 1.2.0 + 2.0.0 com.google.code.findbugs diff --git a/pom.xml b/pom.xml index e6153c088..a143be44f 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ eu.chargetime.ocpp java-oca-ocpp - 1.2 + 2.0 pom Java-OCA-OCPP