I do a dependency project for my personal exercise project. Then I want to import spring-boot-starter-security
, it builds successful and dependency tree shows right, but I cannot find security jars at libraries.
Here is my exercise project pom:
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
</dependencies>
Here is my shared-pom which is parent project of above project:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
<version>${spring.boot.version}</version>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</dependencyManagement>
spring.boot.version: 2.1.6.RELEASE
my exercise project dependency tree:
[INFO] com.personal:auth:jar:1.0-SNAPSHOT
[INFO] +- org.projectlombok:lombok:jar:1.18.4:compile
[INFO] +- org.springframework.boot:spring-boot-starter-security:jar:2.1.6.RELEASE:compile
[INFO] | +- org.springframework.security:spring-security-config:jar:5.1.5.RELEASE:compile
[INFO] | | \- org.springframework.security:spring-security-core:jar:5.1.5.RELEASE:compile
[INFO] | \- org.springframework.security:spring-security-web:jar:5.1.5.RELEASE:compile
[INFO] \- junit:junit:jar:4.12:test
[INFO] \- org.hamcrest:hamcrest-core:jar:1.3:test
Make sure my local repository has those jars. My lib:
UPDATE:
Every time I changed pom then will reimport project or exec mvn clean install
, and always the same result.