91名师指路-头部
91名师指路

Could not transfer artifact javax.jms:jms:jar:1.1 from/to java.net (https://maven-repository.dev.jav

由于某些原因,现在不支持支付宝支付,如需要购买源码请加博主微信进行购买,微信号:13248254750

一:项目采用jenkins打包报错如下

[ERROR] Failed to execute goal on project fm-gisread: Could not resolve dependencies for project com.gaia.fm:fm-gisread:jar:1.0-SNAPSHOT: Could not transfer artifact javax.jms:jms:jar:1.1 from/to java.net (https://maven-repository.dev.java.net/nonav/repository): Cannot access https://maven-repository.dev.java.net/nonav/repository with type legacy using the available connector factories: BasicRepositoryConnectorFactory: Cannot access https://maven-repository.dev.java.net/nonav/repository with type legacy using the available layout factories: Maven2RepositoryLayoutFactory: Unsupported repository layout legacy -> [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]
[JENKINS] Archiving /var/jenkins_home/workspace/FM_1221_GISREAD-BACK_DEV_2/pom.xml to com.gaia.fm/fm-gisread/1.0-SNAPSHOT/fm-gisread-1.0-SNAPSHOT.pom
[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
channel stopped
[Checks API] No suitable checks publisher found.
Finished: FAILURE


二:原因是项目引入了 log4j 1.2.15 或间接的引入了这个jar

<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.15</version>
</dependency>

为什么引入log4j 1.2.15就会报错呢,是因为在log4j 1.2.15的源码的pom.xml中有配置如下的maven仓库地址,而这个地址现在已经不在使用了,然后没有人去log4j 1.2.15的源码所以导致了这个问题。


三:解决方法

将log4j 升级为1.2.16或更高的版本即可。我这里升级到了log4j 1.2.17

<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>



2021-11-04 08:58:03     阅读(1649)

名师出品,必属精品    https://www.91mszl.com

联系博主    
用户登录遮罩层
x

账号登录

91名师指路-底部