lg-labs / food-ordering-system

2 stars 0 forks source link

Domain Core has access to Lombok and Spring Boot Starter Logging #3

Open lglabs opened 1 year ago

lglabs commented 1 year ago

When the DomainCore layer can access these libraries, it has a problem with the Domain definition.

It is important to remove these dependencies. Thus, the domain layer will be isolated from the framework.

In the following image you can see the unnecessary dependencies restaurant-domain-core

lglabs commented 1 year ago

Repackage-example-exclude-dependency

Checking the documentation to do exclude!! https://docs.spring.io/spring-boot/docs/2.3.x/maven-plugin/reference/html/#repackage-example-exclude-dependency

Propos: Alternative 1: Maybe, from parent pom.xml

<!--restaurant service -->
<dependency>
  <groupId>com.labs.lg.food.ordering.system</groupId>
  <artifactId>restaurant-domain-core</artifactId>
  <version>${project.version}</version>
  <exclusions>
      <exclusion>
          <groupId>org.projectlombok</groupId> 
          <artifactId>lombok</artifactId>
      </exclusion>
  </exclusions>
</dependency>

Alternative 2: From domain-core pom.xml add a plugin

<plugin>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-maven-plugin</artifactId>
  <configuration>
    <excludes>
      <exclude>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
      </exclude>
    </excludes>
  </configuration>
</plugin>

Note: These are only ideas, Continue search!

lglabs commented 2 months ago

Working to fix it soon. Using Lg5-Spring Lib