Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
41 changes: 20 additions & 21 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,7 @@
<description>This application shows a few key concepts of
Domain Driven Design implemented in Enterprise Java.
</description>
<url>https://github.com/aowss/dddsample-core</url>

<!-- <distributionManagement>-->
<!-- <site>-->
<!-- <id>sf</id>-->
<!-- <url>scp://shell.sf.net/home/groups/d/dd/dddsample/htdocs/preview</url>-->
<!-- </site>-->
<!-- </distributionManagement>-->

<ciManagement/>
<url>http://dddsample.sourceforge.net</url>

<developers>
<developer>
Expand Down Expand Up @@ -73,17 +64,25 @@
</licenses>

<scm>
<developerConnection>scm:git:https://github.com/aowss/dddsample-core</developerConnection>
<url>https://github.com/aowss/dddsample-core</url>
<developerConnection>scm:git:https://github.com/citerus/dddsample-core</developerConnection>
<url>https://github.com/citerus/dddsample-core</url>
</scm>

<properties>
<java.version>23</java.version>
<java.version>24</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<commons-io.version>2.18.0</commons-io.version>
<plugin.surefire.version>3.5.3</plugin.surefire.version>
<plugin.compiler.version>3.14.0</plugin.compiler.version>
<plugin.site.version>3.21.0</plugin.site.version>
<plugin.javadoc.version>3.11.2</plugin.javadoc.version>
<plugin.jxr.version>3.6.0</plugin.jxr.version>
<plugin.surefire-report.version>3.5.3</plugin.surefire-report.version>
<plugin.jacoco.version>0.8.13</plugin.jacoco.version>
<plugin.checkstyle.version>3.6.0</plugin.checkstyle.version>
</properties>

<build>
Expand All @@ -95,17 +94,17 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.2</version>
<version>${plugin.surefire.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.14.0</version>
<version>${plugin.compiler.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.21.0</version>
<version>${plugin.site.version}</version>
</plugin>
</plugins>
</build>
Expand Down Expand Up @@ -185,31 +184,31 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.11.2</version>
<version>${plugin.javadoc.version}</version>
</plugin>
<!-- Source code cross reference -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>3.6.0</version>
<version>${plugin.jxr.version}</version>
</plugin>
<!-- Test report -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>3.5.2</version>
<version>${plugin.surefire-report.version}</version>
</plugin>
<!-- Test coverage -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.12</version>
<version>${plugin.jacoco.version}</version>
</plugin>
<!-- CheckStyle report -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.6.0</version>
<version>${plugin.checkstyle.version}</version>
<configuration>
<configLocation>src/main/config/checkstyle.xml</configLocation>
<!-- Java source code generated from WSDL -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static CargoTrackingDTO convert(Cargo cargo, List<HandlingEvent> handling
private static List<HandlingEventDTO> convertHandlingEvents(List<HandlingEvent> 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),
Expand All @@ -51,15 +51,15 @@ 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:
case CUSTOMS:
case CLAIM:
args = new Object[]{
handlingEvent.location().name(),
formatter.format(handlingEvent.completionTime())
convertTime(handlingEvent)
};
break;

Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/sampleCargoTrackingResponse.json
Original file line number Diff line number Diff line change
@@ -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."}]}
{"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."}]}