79509600

Date: 2025-03-14 16:03:33
Score: 0.5
Natty:
Report link

I'm using in Eclipse 2025-03:

Architecture Hexagonal but not reactor multimodule a single module structuring packages and use git branch for different base package of modules (package base as adater port domain service with its subpackages).

With below pom.xml in our project not work:

I don't know the reason.

It's very strange thing this.

Thanks a lot for support.

POM.XML

<?xml version="1.0" encoding="UTF-8"?>
<project    xmlns="http://maven.apache.org/POM/4.0.0"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <!-- Parent project -->
    <parent>
        <groupId>com.xxx</groupId>
        <artifactId>yyyy</artifactId>
        <version>0.0.1</version>
    </parent>
    <!-- Maven project child -->
    <groupId>com.aaa</groupId>
    <artifactId>bbb</artifactId>
    <version>0.0.1</version>
    <name>bbb</name>
    <description>Carpe diem</description>
    <url>/bbb/api/</url>
    <properties>
        <!-- Java source encoding -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <!-- Java for reports encoding -->
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <java.version>21</java.version>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
        <maven.compiler.release>${java.version}</maven.compiler.release>

        <spring.boot.version>3.4.3</spring.boot.version>
        <maven-compiler-plugin.version>3.14.0</maven-compiler-plugin.version>

        <!-- To configure Redis -->
        <lettuce-core.version>6.5.4.RELEASE</lettuce-core.version>

        <lombok.version>1.18.36</lombok.version>
        <guava.version>33.4.0-jre</guava.version>
        <de.flapdoodle.embed.mongo.version>4.18.1</de.flapdoodle.embed.mongo.version>

        <!-- Swagger -->
        <springdoc.version>1.8.0</springdoc.version>
        <springdoc.openapi.version>2.8.5</springdoc.openapi.version>

        <!-- Main class -->
        <main.class>com.aaa.bbb.MyApp</main.class>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>${spring.boot.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    
    <dependencies>
        <dependency>
            <groupId><groupId>com.xxx</groupId></groupId>
            <artifactId>ddd</artifactId>
            <version>0.0.1</version>
        </dependency>
        <!-- Webflux -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-webflux</artifactId>
            <exclusions>
                <!-- Exclude the Tomcat web server dependency (use jetty for best performance no blocking and multi thread)-->
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-tomcat</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <!-- Default Jetty page http://localhost:8080/jetty-demo -->
            <groupId>org.springframework.boot</groupId> 
            <artifactId>spring-boot-starter-jetty</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- MongoDB Reactive -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-mongodb-reactive</artifactId>
        </dependency>

        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
        </dependency>

        <!-- Redis Reactive -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-redis-reactive</artifactId>
        </dependency>
        <!-- Libraries for connection and other left jedis and use lettuce -->
<!-- 
        <dependency>
            <groupId>redis.clients</groupId>
            <artifactId>jedis</artifactId>
            <version>5.2.0</version>
        </dependency>
 -->
        <dependency>
            <groupId>io.lettuce</groupId>
            <artifactId>lettuce-core</artifactId>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.springdoc</groupId> 
            <artifactId>springdoc-openapi-webflux-core</artifactId>
            <version>${springdoc.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springdoc</groupId> 
            <artifactId>springdoc-openapi-webflux-ui</artifactId>
            <version>${springdoc.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springdoc</groupId>
            <artifactId>springdoc-openapi-starter-webflux-api</artifactId>
            <version>${springdoc.openapi.version}</version>
        </dependency>
<!--    Add this dependency if in same cases can't use webflux for example get token of APIM, APIGEE

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <exclusions>
                ### Exclude the Tomcat dependency ###
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-tomcat</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
 -->

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.junit.vintage</groupId>
                    <artifactId>junit-vintage-engine</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- Test -->
        <dependency>
            <groupId>io.projectreactor</groupId>
            <artifactId>reactor-test</artifactId>
            <scope>test</scope>
        </dependency>
<!--    TestContainer allow when application is disconnected from internet
            for system integration by test container for example when we will
            have sonar to verify inconsistent pattern, password not crypted, ...
 -->
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>testcontainers</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>mongodb</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <annotationProcessorPaths>
                        <path>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                            <version>${lombok.version}</version>
                        </path>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>${spring.boot.version}</version>
                <configuration>
                    <excludes>
                        <exclude>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                        </exclude>
                    </excludes>
                </configuration>
            </plugin>
            <!-- mvn clean package spring-boot:repackage -->
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <mainClass>${main.class}</mainClass>
                        </manifest>
                    </archive>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                </configuration>
            </plugin>
            <!-- maven-dependency-plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <!-- Configure the output directory for thedependencies -->
                            <outputDirectory>${project.build.directory}/libs</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Long answer (-1):
  • Has code block (-0.5):
  • User mentioned (1): @RestController
  • User mentioned (0): @Service
  • User mentioned (0): @Repository
  • User mentioned (0): @Super
  • User mentioned (0): @RestController
  • User mentioned (0): @Autowire
  • User mentioned (0): @Value
  • Low reputation (0.5):
Posted by: SkyBlackHawk