Here is my file structure in Eclipse
What I want to do ?
I want include sibling modules into my spring boot project which called AccountManagementSystem
I do not have setting.xml in my .m2
directory
What I have tried
1.Delete .m2
directory but do not work for me
- run
mvn clean install -U
still do not work for me
Here is my error message
[INFO] Scanning for projects...
[INFO]
[INFO] --------< com.AccountManagementSystem:AccountManagementSystem >---------
[INFO] Building AccountManagementSystem 0.0.1
[INFO] --------------------------------[ war ]---------------------------------
[INFO] Downloading from : https://repo.maven.apache.org/maven2/com/EncapsulationSystem/EncapsulationSystem/1.0/EncapsulationSystem-1.0.pom
[WARNING] The POM for com.EncapsulationSystem:EncapsulationSystem:jar:1.0 is missing, no dependency information available
[INFO] Downloading from : https://repo.maven.apache.org/maven2/jc/adwords-encapsulation/1.0/adwords-encapsulation-1.0.pom
[WARNING] The POM for jc:adwords-encapsulation:jar:1.0 is missing, no dependency information available
[INFO] Downloading from : https://repo.maven.apache.org/maven2/com/PermissionSystemApiTool/PermissionSystemApiTool/0.0.1/PermissionSystemApiTool-0.0.1.pom
[WARNING] The POM for com.PermissionSystemApiTool:PermissionSystemApiTool:jar:0.0.1 is missing, no dependency information available
[INFO] Downloading from : https://repo.maven.apache.org/maven2/com/EncapsulationSystem/EncapsulationSystem/1.0/EncapsulationSystem-1.0.jar
[INFO] Downloading from : https://repo.maven.apache.org/maven2/com/PermissionSystemApiTool/PermissionSystemApiTool/0.0.1/PermissionSystemApiTool-0.0.1.jar
[INFO] Downloading from : https://repo.maven.apache.org/maven2/jc/adwords-encapsulation/1.0/adwords-encapsulation-1.0.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.800 s
[INFO] Finished at: 2021-11-15T16:47:06+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project AccountManagementSystem: Could not resolve dependencies for project com.AccountManagementSystem:AccountManagementSystem:war:0.0.1: The following artifacts could not be resolved: com.EncapsulationSystem:EncapsulationSystem:jar:1.0, jc:adwords-encapsulation:jar:1.0, com.PermissionSystemApiTool:PermissionSystemApiTool:jar:0.0.1: Could not find artifact com.EncapsulationSystem:EncapsulationSystem:jar:1.0 in central (https://repo.maven.apache.org/maven2) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
Here is my 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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>war</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.4</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>com.AccountManagementSystem</groupId>
<artifactId>AccountManagementSystem</artifactId>
<version>0.0.1</version>
<name>AccountManagementSystem</name>
<description>Account Management System</description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>com.EncapsulationSystem</groupId>
<artifactId>EncapsulationSystem</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>jc</groupId>
<artifactId>adwords-encapsulation</artifactId>
<version>1.0</version>
<exclusions>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<exclusions>
<exclusion>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-jdbc</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j</artifactId>
<version>1.2.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-cache</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.google.oauth-client</groupId>
<artifactId>google-oauth-client-jetty</artifactId>
<version>1.32.1</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>com.PermissionSystemApiTool</groupId>
<artifactId>PermissionSystemApiTool</artifactId>
<version>0.0.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.amven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
I have find some solution
Maven multi module project cannot find sibling module
Maven Could not resolve dependencies, artifacts could not be resolved
but when i run mvn clean install
I got error message
[INFO] Scanning for projects...
[INFO]
[INFO] --------< com.AccountManagementSystem:AccountManagementSystem >---------
[INFO] Building AccountManagementSystem 0.0.1
[INFO] --------------------------------[ war ]---------------------------------
[WARNING] The POM for com.EncapsulationSystem:EncapsulationSystem:jar:1.0 is missing, no dependency information available
[WARNING] The POM for jc:adwords-encapsulation:jar:1.0 is missing, no dependency information available
[WARNING] The POM for com.PermissionSystemApiTool:PermissionSystemApiTool:jar:0.0.1 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.912 s
[INFO] Finished at: 2021-11-15T16:58:46+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project AccountManagementSystem: Could not resolve dependencies for project com.AccountManagementSystem:AccountManagementSystem:war:0.0.1: The following artifacts could not be resolved: com.EncapsulationSystem:EncapsulationSystem:jar:1.0, jc:adwords-encapsulation:jar:1.0, com.PermissionSystemApiTool:PermissionSystemApiTool:jar:0.0.1: com.EncapsulationSystem:EncapsulationSystem:jar:1.0 was not found in https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException