diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index d4fd06a06..74b44d809 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -14,10 +14,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Set up JDK 23 + - name: Set up JDK 17 uses: actions/setup-java@v4 with: - java-version: '23' + java-version: '17' distribution: 'temurin' cache: maven server-id: github # Value of the distributionManagement/repository/id field of the pom.xml diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index ad8cf41d5..d58dfb70b 100755 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -16,4 +16,4 @@ # under the License. wrapperVersion=3.3.2 distributionType=only-script -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip diff --git a/pom.xml b/pom.xml index d82644e17..e4292100f 100644 --- a/pom.xml +++ b/pom.xml @@ -15,16 +15,7 @@ This application shows a few key concepts of Domain Driven Design implemented in Enterprise Java. - https://github.com/aowss/dddsample-core - - - - - - - - - + http://dddsample.sourceforge.net @@ -73,17 +64,25 @@ - scm:git:https://github.com/aowss/dddsample-core - https://github.com/aowss/dddsample-core + scm:git:https://github.com/citerus/dddsample-core + https://github.com/citerus/dddsample-core - 23 + 24 ${java.version} ${java.version} UTF-8 UTF-8 2.18.0 + 3.5.3 + 3.14.0 + 3.21.0 + 3.11.2 + 3.6.0 + 3.5.3 + 0.8.13 + 3.6.0 @@ -95,17 +94,17 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.2 + ${plugin.surefire.version} org.apache.maven.plugins maven-compiler-plugin - 3.14.0 + ${plugin.compiler.version} org.apache.maven.plugins maven-site-plugin - 3.21.0 + ${plugin.site.version} @@ -185,31 +184,31 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.11.2 + ${plugin.javadoc.version} org.apache.maven.plugins maven-jxr-plugin - 3.6.0 + ${plugin.jxr.version} org.apache.maven.plugins maven-surefire-report-plugin - 3.5.2 + ${plugin.surefire-report.version} org.jacoco jacoco-maven-plugin - 0.8.12 + ${plugin.jacoco.version} org.apache.maven.plugins maven-checkstyle-plugin - 3.6.0 + ${plugin.checkstyle.version} src/main/config/checkstyle.xml diff --git a/src/main/java/se/citerus/dddsample/interfaces/tracking/ws/CargoTrackingDTOConverter.java b/src/main/java/se/citerus/dddsample/interfaces/tracking/ws/CargoTrackingDTOConverter.java index 379dd25ca..1005a3238 100644 --- a/src/main/java/se/citerus/dddsample/interfaces/tracking/ws/CargoTrackingDTOConverter.java +++ b/src/main/java/se/citerus/dddsample/interfaces/tracking/ws/CargoTrackingDTOConverter.java @@ -34,7 +34,7 @@ public static CargoTrackingDTO convert(Cargo cargo, List handling private static List convertHandlingEvents(List handlingEvents, Cargo cargo, MessageSource messageSource, Locale locale) { return handlingEvents.stream().map(he -> new HandlingEventDTO( convertLocation(he), - convertTime(he), + he.completionTime().toString(), convertType(he), convertVoyageNumber(he), convertIsExpected(he, cargo), @@ -51,7 +51,7 @@ protected static String convertDescription(HandlingEvent handlingEvent, MessageS args = new Object[]{ handlingEvent.voyage().voyageNumber().idString(), handlingEvent.location().name(), - formatter.format(handlingEvent.completionTime()) + convertTime(handlingEvent) }; break; case RECEIVE: @@ -59,7 +59,7 @@ protected static String convertDescription(HandlingEvent handlingEvent, MessageS case CLAIM: args = new Object[]{ handlingEvent.location().name(), - formatter.format(handlingEvent.completionTime()) + convertTime(handlingEvent) }; break; @@ -126,7 +126,7 @@ private static String convertDestination(Cargo cargo) { private static String convertEta(Cargo cargo) { Instant date = cargo.delivery().estimatedTimeOfArrival(); - return date == null ? "Unknown" : formatter.format(date); + return date == null ? "Unknown" : date.toString(); } protected static String convertNextExpectedActivity(Cargo cargo) { diff --git a/src/test/resources/sampleCargoTrackingResponse.json b/src/test/resources/sampleCargoTrackingResponse.json index 2dbceeeb7..4c738ee96 100644 --- a/src/test/resources/sampleCargoTrackingResponse.json +++ b/src/test/resources/sampleCargoTrackingResponse.json @@ -1 +1 @@ -{"trackingId":"ABC123","statusText":"In port New York","destination":"Helsinki","eta":"Mar 12, 2009, 12:00:00 AM","nextExpectedActivity":"Next expected activity is to load cargo onto voyage 0200T in New York","isMisdirected":false,"handlingEvents":[{"location":"Hongkong","time":"Mar 1, 2009, 12:00:00 AM","type":"RECEIVE","voyageNumber":"","isExpected":true,"description":"Received in Hongkong, at Mar 1, 2009, 12:00:00 AM."},{"location":"Hongkong","time":"Mar 2, 2009, 12:00:00 AM","type":"LOAD","voyageNumber":"0100S","isExpected":true,"description":"Loaded onto voyage 0100S in Hongkong, at Mar 2, 2009, 12:00:00 AM."},{"location":"New York","time":"Mar 5, 2009, 12:00:00 AM","type":"UNLOAD","voyageNumber":"0100S","isExpected":true,"description":"Unloaded off voyage 0100S in New York, at Mar 5, 2009, 12:00:00 AM."}]} \ No newline at end of file +{"trackingId":"ABC123","statusText":"In port New York","destination":"Helsinki","eta":"2009-03-12T00:00:00Z","nextExpectedActivity":"Next expected activity is to load cargo onto voyage 0200T in New York","isMisdirected":false,"handlingEvents":[{"location":"Hongkong","time":"2009-03-01T00:00:00Z","type":"RECEIVE","voyageNumber":"","isExpected":true,"description":"Received in Hongkong, at Mar 1, 2009, 12:00:00 AM."},{"location":"Hongkong","time":"2009-03-02T00:00:00Z","type":"LOAD","voyageNumber":"0100S","isExpected":true,"description":"Loaded onto voyage 0100S in Hongkong, at Mar 2, 2009, 12:00:00 AM."},{"location":"New York","time":"2009-03-05T00:00:00Z","type":"UNLOAD","voyageNumber":"0100S","isExpected":true,"description":"Unloaded off voyage 0100S in New York, at Mar 5, 2009, 12:00:00 AM."}]} \ No newline at end of file