springboot中pom.xml文件注入test测试依赖时报错的解决

网友投稿 538 2022-08-22


springboot中pom.xml文件注入test测试依赖时报错的解决

目录pom.xml文件注入test测试依赖时报错分析原因解决方法springboot中pom.xml之间的依赖依赖关系 所用到的技术talkischeap,详见配置文件

pom.xml文件注入test测试依赖时报错

报错:Failed to read artifact descriptor for org.springframework.boot:spring-boot-starter-test:jar:2.0.4.RELEASE

分析原因

有可能是默认版本太高

解决方法

降低版本

springboot中pom.xml之间的依赖

依赖关系

parent(dependency springboot) <---- common(parent parent)

|<----admin(parent parent, dependency common)

|<----rest(parent parent, dependency common)

|<----chat(parent parent​​​​​​​, dependency common)

<----portal(parent parent)

所用到的技术

spring-boot

spring-boot-starter-thymeleaf

spring-boot-starter-data-redis

spring-boot-starter-data-jpa

spring-boot-starter-cache缓存支持

spring-boot-maven-plugin

maven-compiler-plugin

shiro-spring

shiro-web

shiro-ehcache

shiro-redis

thymeleaf-extras-shiro

httpclient

netty-all

jackson-databind

druid

mysql-connector-java

json格式化类库:

fastjson

guava

jackson-annotations

Spring RESTful接口文档化:

springfox-swagger2

springfox-swagger-ui

nekohtml

talk is cheap , 详见配置文件

parent project

xmlns:xsi="http://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">

4.0.0

com.yourproject

yourproject-parent

1.0-SNAPSHOT

pom

UTF-8

UTF-8

1.8

1.0.29

1.2.16

19.0

1.3.2

1.2.1

2.4.2.1-RELEASE

1.9.22

2.8.0

2.2.2

org.springframework.boot

spring-boot-dependencies

2.0.5.RELEASE

pom

import

com.alibaba

druid

${druid.version}

org.apache.shiro

shiro-spring

${shiro.version}

org.apache.shiro

shiro-web

${shiro.version}

com.github.theborakompanioni

thymeleaf-extras-shiro

${shiro.th.version}

org.apache.shiro

shiro-ehcachexmMpshcFr

${shiro.th.version}

org.crazycake

shiro-redis

${shiro.redis.version}

net.sourceforge.nekohtml

nekohtml

${nekohtml.version}

com.alibaba

fastjson

${fastjson.version}

com.google.guava

guava

${guava.version}

com.fasterxml.jackson.core

jackson-annotations

${fasterxml.version}

io.springfox

springfox-swagger2

${springfox.version}

io.springfox

springfox-swagger-ui

${springfox.version}

xmlns:xsi="http://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">

4.0.0

com.yourproject

yourproject-parent

1.0-SNAPSHOT

pom

UTF-8

UTF-8

1.8

1.0.29

1.2.16

19.0

1.3.2

1.2.1

2.4.2.1-RELEASE

1.9.22

2.8.0

2.2.2

org.springframework.boot

spring-boot-dependencies

2.0.5.RELEASE

pom

import

com.alibaba

druid

${druid.version}

org.apache.shiro

shiro-spring

${shiro.version}

org.apache.shiro

shiro-web

${shiro.version}

com.github.theborakompanioni

thymeleaf-extras-shiro

${shiro.th.version}

org.apache.shiro

shiro-ehcachexmMpshcFr

${shiro.th.version}

org.crazycake

shiro-redis

${shiro.redis.version}

net.sourceforge.nekohtml

nekohtml

${nekohtml.version}

com.alibaba

fastjson

${fastjson.version}

com.google.guava

guava

${guava.version}

com.fasterxml.jackson.core

jackson-annotations

${fasterxml.version}

io.springfox

springfox-swagger2

${springfox.version}

io.springfox

springfox-swagger-ui

${springfox.version}

common项目pom.xml

xmlns:xsi="http://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">

yourproject-parent

com.yourproject

1.0-SNAPSHOT

../yourproject-parent/pom.xml

4.0.0

com.yourproject

yourproject-common

org.springframework.boot

spring-boot-starter-data-jpa

org.springframework.boot

spring-boot-starter-cache

net.sf.ehcache

ehcache

mysql

mysql-connector-java

runtime

com.alibaba

druid

net.sourceforge.nekohtml

nekohtml

org.springframework.boot

spring-boot-starter-test

test

com.alibaba

fastjson

com.google.guava

guava

com.fasterxml.jackson.core

jackson-annotations

yourproject-common

org.springframework.boot

spring-boot-maven-plugin

org.apache.maven.plugins

maven-compiler-plugin

1.7

1.7

xmlns:xsi="http://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">

yourproject-parent

com.yourproject

1.0-SNAPSHOT

../yourproject-parent/pom.xml

4.0.0

com.yourproject

yourproject-common

org.springframework.boot

spring-boot-starter-data-jpa

org.springframework.boot

spring-boot-starter-cache

net.sf.ehcache

ehcache

mysql

mysql-connector-java

runtime

com.alibaba

druid

net.sourceforge.nekohtml

nekohtml

org.springframework.boot

spring-boot-starter-test

test

com.alibaba

fastjson

com.google.guava

guava

com.fasterxml.jackson.core

jackson-annotations

yourproject-common

org.springframework.boot

spring-boot-maven-plugin

org.apache.maven.plugins

maven-compiler-plugin

1.7

1.7

admin project

xmlns:xsi="http://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">

yourproject-parent

com.yourproject

1.0-SNAPSHOT

../yourproject-parent/pom.xml

4.0.0

com.yourproject

yourproject-admin

war

com.yourproject

yourproject-common

1.0-SNAPSHOT

org.springframework.boot

spring-boot-starter

org.springframework.boot

spring-boot-starter-web

org.springframework.boot

spring-boot-starter-thymeleaf

org.springframework.boot

spring-boot-starter-test

test

org.springframework.boot

spring-boot-devtools

true

org.apache.shiro

shiro-spring

org.apache.shiro

shiro-web

org.apache.shiro

shiro-ehcache

com.github.theborakompanioni

thymeleaf-extras-shiro

org.crazycake

shiro-redis

org.springframework.boot

spring-boot-maven-plugin

true

xmlns:xsi="http://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">

yourproject-parent

com.yourproject

1.0-SNAPSHOT

../yourproject-parent/pom.xml

4.0.0

com.yourproject

yourproject-admin

war

com.yourproject

yourproject-common

1.0-SNAPSHOT

org.springframework.boot

spring-boot-starter

org.springframework.boot

spring-boot-starter-web

org.springframework.boot

spring-boot-starter-thymeleaf

org.springframework.boot

spring-boot-starter-test

test

org.springframework.boot

spring-boot-devtools

true

org.apache.shiro

shiro-spring

org.apache.shiro

shiro-web

org.apache.shiro

shiro-ehcache

com.github.theborakompanioni

thymeleaf-extras-shiro

org.crazycake

shiro-redis

org.springframework.boot

spring-boot-maven-plugin

true

portal project

xmlns:xsi="http://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">

yourproject-parent

com.yourproject

1.0-SNAPSHOT

../yourproject-parent/pom.xml

4.0.0

com.yourproject

yourproject-portal

war

org.springframework.boot

spring-boot-starter

org.springframework.boot

spring-boot-starter-web

org.springframework.boot

spring-boot-starter-thymeleaf

org.springframework.boot

spring-boot-starter-test

test

net.sourceforge.nekohtml

nekohtml

1.9.15

org.apache.httpcomponents

httpclient

xmlns:xsi="http://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">

yourproject-parent

com.yourproject

1.0-SNAPSHOT

../yourproject-parent/pom.xml

4.0.0

com.yourproject

yourproject-portal

war

org.springframework.boot

spring-boot-starter

org.springframework.boot

spring-boot-starter-web

org.springframework.boot

spring-boot-starter-thymeleaf

org.springframework.boot

spring-boot-starter-test

test

net.sourceforge.nekohtml

nekohtml

1.9.15

org.apache.httpcomponents

httpclient

rest project

xmlns:xsi="http://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">

yourproject-parent

com.yourproject

1.0-SNAPSHOT

../yourproject-parent/pom.xml

4.0.0

com.yourproject

yourproject-rest

war

com.yourproject

yourproject-common

1.0-SNAPSHOT

org.springframework.boot

spring-boot-starter

org.springframework.boot

spring-boot-starter-web

org.springframework.boot

spring-boot-starter-test

test

org.springframework.boot

spring-boot-starter-data-redis

io.springfox

springfox-swagger2

io.springfox

springfox-swagger-ui

org.springframework.boot

spring-boot-starter-websocket

org.springframework

spring-messaging

xmlns:xsi="http://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">

yourproject-parent

com.yourproject

1.0-SNAPSHOT

../yourproject-parent/pom.xml

4.0.0

com.yourproject

yourproject-rest

war

com.yourproject

yourproject-common

1.0-SNAPSHOT

org.springframework.boot

spring-boot-starter

org.springframework.boot

spring-boot-starter-web

org.springframework.boot

spring-boot-starter-test

test

org.springframework.boot

spring-boot-starter-data-redis

io.springfox

springfox-swagger2

io.springfox

springfox-swagger-ui

org.springframework.boot

spring-boot-starter-websocket

org.springframework

spring-messaging

chat project

xmlns:xsi="http://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">

yourproject-parent

com.yourproject

1.0-SNAPSHOT

../yourproject-parent/pom.xml

4.0.0

com.yourproject

yourproject-chat

1.0-SNAPSHOT

jar

com.yourproject

yourproject-common

1.0-SNAPSHOT

org.springframework.boot

spring-boot-starter

org.springframework.boot

spring-boot-starter-test

test

org.springframework.boot

spring-boot-starter-data-redis

com.alibaba

fastjson

1.2.23

io.netty

netty-all

4.1.6.Final

com.fasterxml.jackson.core

jackson-databind

xmlns:xsi="http://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">

yourproject-parent

com.yourproject

1.0-SNAPSHOT

../yourproject-parent/pom.xml

4.0.0

com.yourproject

yourproject-chat

1.0-SNAPSHOT

jar

com.yourproject

yourproject-common

1.0-SNAPSHOT

org.springframework.boot

spring-boot-starter

org.springframework.boot

spring-boot-starter-test

test

org.springframework.boot

spring-boot-starter-data-redis

com.alibaba

fastjson

1.2.23

io.netty

netty-all

4.1.6.Final

com.fasterxml.jackson.core

jackson-databind


版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:极客编程python入门-模块与包(python开源模块)
下一篇:【Go事】一眼看穿 Go 的集合和切片
相关文章

 发表评论

暂时没有评论,来抢沙发吧~