diff --git a/OCPP-J/pom.xml b/OCPP-J/pom.xml deleted file mode 100644 index a85e90331..000000000 --- a/OCPP-J/pom.xml +++ /dev/null @@ -1,158 +0,0 @@ - - - 4.0.0 - - eu.chargetime.ocpp - OCPP-J - 1.2.0 - jar - - Java-OCA-OCPP OCPP-J - Implementation of Open Charge-Point Protocols OCPP-J - 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 - common - 1.2.0 - - - com.google.code.gson - gson - 2.13.2 - compile - - - org.java-websocket - Java-WebSocket - 1.6.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 - - - - - - \ No newline at end of file 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..358bb8d63 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 { @@ -15,7 +15,7 @@ buildscript { allprojects { group = 'eu.chargetime.ocpp' - version = '1.2' + version = '2.0' } subprojects { diff --git a/ocpp-common/build.gradle b/ocpp-common/build.gradle index eb545377f..b2b084697 100644 --- a/ocpp-common/build.gradle +++ b/ocpp-common/build.gradle @@ -1,13 +1,15 @@ +/* + * Java-OCA-OCPP ocpp-common gradle build configuration + */ 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' 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 ecb6f5ce6..5eed172a6 100644 --- a/ocpp-common/pom.xml +++ b/ocpp-common/pom.xml @@ -5,11 +5,11 @@ 4.0.0 eu.chargetime.ocpp - common - 1.2.0 + ocpp-common + 2.0.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 @@ -51,11 +51,6 @@ jaxb-api 2.3.1 - - javax.xml.soap - javax.xml.soap-api - 1.4.0 - @@ -90,6 +85,7 @@ test + @@ -129,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-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-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-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-J/build.gradle b/ocpp-json/build.gradle similarity index 74% rename from OCPP-J/build.gradle rename to ocpp-json/build.gradle index 5148e2f94..6eead7e29 100644 --- a/OCPP-J/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 new file mode 100644 index 000000000..d75a3b0f3 --- /dev/null +++ b/ocpp-json/pom.xml @@ -0,0 +1,152 @@ + + + 4.0.0 + + eu.chargetime.ocpp + ocpp-json + 2.0.0 + jar + + 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 + + + + + + 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 + ocpp-common + 2.0.0 + + + com.google.code.gson + gson + 2.13.2 + compile + + + org.java-websocket + Java-WebSocket + 1.6.0 + + + junit + junit + 4.13.2 + test + + + org.mockito + mockito-core + 4.11.0 + test + + + org.hamcrest + hamcrest-core + 3.0 + 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-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 97% rename from OCPP-J/src/main/java/eu/chargetime/ocpp/JSONCommunicator.java rename to ocpp-json/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-json/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-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-example/json-client-implementation/pom.xml b/ocpp-v1_6-example/json-client-implementation/pom.xml index be1ca69ef..8732aae73 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 + 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 11 @@ -33,20 +33,10 @@ lombok true - - org.java-websocket - Java-WebSocket - 1.6.0 - - - com.google.code.gson - gson - 2.8.9 - eu.chargetime.ocpp - v1_6 - 1.2.0 + ocpp16j + 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 5d81b4763..65c45cd53 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 + 2.0.0 + Example OCPP 1.6 JSON Server Implementation + Example Spring Application of an OCPP 1.6 JSON Server 11 @@ -21,32 +21,20 @@ 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 - 1.2.0 + ocpp16j + 2.0.0 junit diff --git a/ocpp-v1_6-json/build.gradle b/ocpp-v1_6-json/build.gradle new file mode 100644 index 000000000..07bbaf892 --- /dev/null +++ b/ocpp-v1_6-json/build.gradle @@ -0,0 +1,20 @@ +/* + * Java-OCA-OCPP ocpp16j gradle build configuration + */ + +dependencies { + compile project(':ocpp16') + compile project(':ocpp-json') + + 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..9e62b1023 --- /dev/null +++ b/ocpp-v1_6-json/pom.xml @@ -0,0 +1,146 @@ + + + 4.0.0 + + eu.chargetime.ocpp + ocpp16j + 2.0.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 + ocpp16 + 2.0.0 + + + eu.chargetime.ocpp + ocpp-json + 2.0.0 + + + junit + junit + 4.13.2 + test + + + org.mockito + mockito-core + 4.11.0 + test + + + org.hamcrest + hamcrest-core + 3.0 + 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-soap/build.gradle b/ocpp-v1_6-soap/build.gradle new file mode 100644 index 000000000..77aa8ac87 --- /dev/null +++ b/ocpp-v1_6-soap/build.gradle @@ -0,0 +1,20 @@ +/* + * Java-OCA-OCPP ocpp16s gradle build configuration + */ + +dependencies { + compile project(':ocpp16') + 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..f6669069b --- /dev/null +++ b/ocpp-v1_6-soap/pom.xml @@ -0,0 +1,146 @@ + + + 4.0.0 + + eu.chargetime.ocpp + ocpp16s + 2.0.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 + ocpp16 + 2.0.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 + + + + + + + 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 95% 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 index 2525a1c45..80790107f 100644 --- 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 @@ -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-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-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/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..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,15 +7,16 @@ plugins { } dependencies { - compile project(':common') - compile project(':v1_6') + 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..4a75d63ed 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 - 1.2.0 + ocpp16-test + 2.0.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,13 +48,13 @@ eu.chargetime.ocpp - common - 1.2.0 + ocpp16j + 2.0.0 eu.chargetime.ocpp - v1_6 - 1.2.0 + ocpp16s + 2.0.0 junit @@ -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 d14366841..725da9ed6 100644 --- a/ocpp-v1_6/build.gradle +++ b/ocpp-v1_6/build.gradle @@ -1,12 +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-J') - compile 'org.java-websocket:Java-WebSocket:1.6.0' - compile group: 'javax.xml.soap', name: 'javax.xml.soap-api', version: '1.4.0' + compile project(':ocpp-common') testCompile 'junit:junit:4.13.2' testCompile 'org.mockito:mockito-core:4.11.0' @@ -18,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..7798cccdc 100644 --- a/ocpp-v1_6/pom.xml +++ b/ocpp-v1_6/pom.xml @@ -5,12 +5,12 @@ 4.0.0 eu.chargetime.ocpp - v1_6 - 1.2.0 + ocpp16 + 2.0.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 @@ -49,18 +49,8 @@ eu.chargetime.ocpp - common - 1.2.0 - - - eu.chargetime.ocpp - OCPP-J - 1.2.0 - - - org.java-websocket - Java-WebSocket - 1.6.0 + ocpp-common + 2.0.0 junit @@ -80,12 +70,6 @@ 3.0 test - - ch.qos.logback - logback-classic - 1.3.16 - test - @@ -139,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..aa0c5d558 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 - 1.2.0 + ocpp2-test + 2.0.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,28 +48,23 @@ eu.chargetime.ocpp - common - 1.2.0 - - - eu.chargetime.ocpp - OCPP-J - 1.2.0 + ocpp16j + 2.0.0 eu.chargetime.ocpp - v1_6 - 1.2.0 + ocpp16s + 2.0.0 eu.chargetime.ocpp - v1_6-test - 1.2.0 + ocpp16-test + 2.0.0 eu.chargetime.ocpp - ocpp-v2 - 1.2.0 + ocpp2 + 2.0.0 com.google.code.findbugs @@ -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 3e73835d9..527cb4c0e 100644 --- a/ocpp-v2/build.gradle +++ b/ocpp-v2/build.gradle @@ -1,13 +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-J') - compile project(':v1_6') - compile 'com.google.code.findbugs:jsr305:3.0.1' - compile 'org.java-websocket:Java-WebSocket:1.6.0' + compile project(':ocpp-common') + compile project(':ocpp-json') + + 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' @@ -18,5 +18,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..1eecd6db7 100644 --- a/ocpp-v2/pom.xml +++ b/ocpp-v2/pom.xml @@ -5,35 +5,35 @@ 4.0.0 eu.chargetime.ocpp - ocpp-v2 - 1.2.0 + ocpp2 + 2.0.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 - - 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,29 +49,19 @@ eu.chargetime.ocpp - common - 1.2.0 + ocpp-common + 2.0.0 eu.chargetime.ocpp - OCPP-J - 1.2.0 - - - eu.chargetime.ocpp - v1_6 - 1.2.0 + ocpp-json + 2.0.0 com.google.code.findbugs jsr305 3.0.2 - - org.java-websocket - Java-WebSocket - 1.6.0 - junit junit @@ -90,12 +80,6 @@ 3.0 test - - ch.qos.logback - logback-classic - 1.3.16 - test - @@ -110,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 a98a7a295..a143be44f 100644 --- a/pom.xml +++ b/pom.xml @@ -5,40 +5,42 @@ 4.0.0 eu.chargetime.ocpp - all - 1.2 + java-oca-ocpp + 2.0 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 - OCPP-J + ocpp-json ocpp-v1_6 + ocpp-v1_6-json + ocpp-v1_6-soap ocpp-v1_6-test ocpp-v2 ocpp-v2-test @@ -66,7 +68,6 @@ 3.14.1 - org.eluder.coveralls coveralls-maven-plugin diff --git a/settings.gradle b/settings.gradle index 8cc617507..d5b6f617f 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,14 +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') -include(':OCPP-J') -include(':ocpp-v2') -include(':ocpp-v2-test') -include(':v1_6') -include(':v1_6-test') -project(':v1_6').projectDir = file('ocpp-v1_6') -project(':v1_6-test').projectDir = file('ocpp-v1_6-test') \ No newline at end of file +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') + +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')