From 681cebc3d19868b7d50337bc2fd0576a51a19951 Mon Sep 17 00:00:00 2001 From: Chris Richardson Date: Sun, 15 Oct 2023 10:29:30 -0700 Subject: [PATCH] #120 Fixed maven build --- common/build.gradle | 6 -- common/pom.xml | 43 ------------ .../common/domain/Money.java | 66 ------------------- customer-service-api-messaging/pom.xml | 10 ++- customer-service-api-web/pom.xml | 7 +- customer-service/pom.xml | 4 ++ order-service-api-messaging/pom.xml | 16 ++++- pom.xml | 7 +- 8 files changed, 33 insertions(+), 126 deletions(-) delete mode 100644 common/build.gradle delete mode 100644 common/pom.xml delete mode 100644 common/src/main/java/io/eventuate/examples/tram/ordersandcustomers/common/domain/Money.java diff --git a/common/build.gradle b/common/build.gradle deleted file mode 100644 index 72420135..00000000 --- a/common/build.gradle +++ /dev/null @@ -1,6 +0,0 @@ -dependencies { - api "io.eventuate.tram.core:eventuate-tram-spring-events" - implementation "commons-lang:commons-lang:2.6" - api "org.springframework.boot:spring-boot-starter-data-jpa" -} - diff --git a/common/pom.xml b/common/pom.xml deleted file mode 100644 index 2121fdeb..00000000 --- a/common/pom.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - io.eventuate.tram.examples.customers.and.orders - eventuate-tram-examples-customers-and-orders - 0.1.0-SNAPSHOT - ../pom.xml - - 4.0.0 - common - jar - common - - - - io.eventuate.tram.core - eventuate-tram-spring-events - - - commons-lang - commons-lang - 2.6 - - - org.springframework.boot - spring-boot-starter-data-jpa - ${springBootVersion} - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${java.version} - ${java.version} - - - - - diff --git a/common/src/main/java/io/eventuate/examples/tram/ordersandcustomers/common/domain/Money.java b/common/src/main/java/io/eventuate/examples/tram/ordersandcustomers/common/domain/Money.java deleted file mode 100644 index 7455562c..00000000 --- a/common/src/main/java/io/eventuate/examples/tram/ordersandcustomers/common/domain/Money.java +++ /dev/null @@ -1,66 +0,0 @@ -package io.eventuate.examples.tram.ordersandcustomers.common.domain; - -import org.apache.commons.lang.builder.EqualsBuilder; -import org.apache.commons.lang.builder.HashCodeBuilder; -import org.apache.commons.lang.builder.ToStringBuilder; - -import javax.persistence.Access; -import javax.persistence.AccessType; -import javax.persistence.Embeddable; -import java.math.BigDecimal; - -@Embeddable -@Access(AccessType.FIELD) -public class Money { - - public static final Money ZERO = new Money(0); - private BigDecimal amount; - - public Money() { - } - - public Money(int i) { - this.amount = new BigDecimal(i); - } - public Money(String s) { - this.amount = new BigDecimal(s); - } - - @Override - public String toString() { - return ToStringBuilder.reflectionToString(this); - } - - @Override - public boolean equals(Object obj) { - return EqualsBuilder.reflectionEquals(this, obj); - } - - @Override - public int hashCode() { - return HashCodeBuilder.reflectionHashCode(this); - } - - public Money(BigDecimal amount) { - this.amount = amount; - } - - public BigDecimal getAmount() { - return amount; - } - - public void setAmount(BigDecimal amount) { - this.amount = amount; - } - - public boolean isGreaterThanOrEqual(Money other) { - return amount.compareTo(other.amount) >= 0; - } - - public Money add(Money other) { - return new Money(amount.add(other.amount)); - } - public Money subtract(Money other) { - return new Money(amount.subtract(other.amount)); - } -} \ No newline at end of file diff --git a/customer-service-api-messaging/pom.xml b/customer-service-api-messaging/pom.xml index a9f26255..38ca4fef 100644 --- a/customer-service-api-messaging/pom.xml +++ b/customer-service-api-messaging/pom.xml @@ -12,11 +12,15 @@ - io.eventuate.tram.examples.customers.and.orders - common - 0.1.0-SNAPSHOT + io.eventuate.examples.common + eventuate-examples-common-money + + io.eventuate.tram.core + eventuate-tram-spring-events + + diff --git a/customer-service-api-web/pom.xml b/customer-service-api-web/pom.xml index bd1863c9..759756c7 100644 --- a/customer-service-api-web/pom.xml +++ b/customer-service-api-web/pom.xml @@ -11,10 +11,9 @@ customer-service-api-web - - io.eventuate.tram.examples.customers.and.orders - common - 0.1.0-SNAPSHOT + + io.eventuate.examples.common + eventuate-examples-common-money diff --git a/customer-service/pom.xml b/customer-service/pom.xml index c317b082..7354386e 100644 --- a/customer-service/pom.xml +++ b/customer-service/pom.xml @@ -11,6 +11,10 @@ customer-service + + io.eventuate.examples.common + eventuate-examples-common-money + io.eventuate.messaging.kafka diff --git a/order-service-api-messaging/pom.xml b/order-service-api-messaging/pom.xml index 52f94110..17d5b83b 100644 --- a/order-service-api-messaging/pom.xml +++ b/order-service-api-messaging/pom.xml @@ -10,11 +10,21 @@ jar + + io.eventuate.examples.common + eventuate-examples-common-money + - io.eventuate.tram.examples.customers.and.orders - common - 0.1.0-SNAPSHOT + org.springframework.boot + spring-boot-starter-data-jpa + ${springBootVersion} + + + io.eventuate.tram.core + eventuate-tram-spring-events + + diff --git a/pom.xml b/pom.xml index 8d48824d..f8c4e57c 100644 --- a/pom.xml +++ b/pom.xml @@ -20,10 +20,10 @@ 0.18.0.RELEASE 2021.0.2 1.6.6 + 0.2.0.RELEASE - common customer-service-api-web customer-service-api-messaging customer-service @@ -74,6 +74,11 @@ + + io.eventuate.examples.common + eventuate-examples-common-money + ${eventuateCommonExamplesVersion} +