when i use this maven project,mvn install
.
[ERROR] hint
Package org.apache.commons.pool2.impl does not exist
pom.xml about redis
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
<version>1.8.23.RELEASE</version>
</dependency>
<dependency>
<groupId>org.crazycake</groupId>
<artifactId>shiro-redis</artifactId>
<version>2.8.20</version>
</dependency>
i saw org.apache.commons.pool2 has been downloaded in maven repo.
but external libraries in idea does not have this package
but not in dependency and libraries
i try to put package commons.pool2
into project structure
->libraries
,then when i reload maven project ,the package org.apache.commons.pool2
is missing from libraries and modules
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-pool2</artifactId>
<version>2.6.0</version>
</dependency>
is useless,some new error will be happened in project.
As I see that you are excluding
spring-data-redis
fromspring-boot-starter-data-redis
.Why are adding it back again with defined version
The
spring-data-redis
containsorg.apache.commons » commons-pool2
Remove both the
<exclusion>
and thespring-data-redis
dependencyYou can also try below commands to get the dependency structure
and look for
commons-pool2
,maybe something will draw your attention like excludes or dependency overrides