[英]Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved
I try to create a maven web project.我尝试创建一个 Maven Web 项目。
The problem is that when I create the project, it has this error.问题是当我创建项目时,它有这个错误。 Thi is my pom.xml这是我的 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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>it.crud</groupId>
<artifactId>CRUD</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>CRUD Maven Webapp</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
</dependency>
</dependencies>
</project>
THIS IS the build error:这是构建错误:
Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from/to central ( https://repo.maven.apache.org/maven2 ): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty -> [Help 1]插件 org.apache.maven.plugins:maven-resources-plugin:2.6 或其依赖项之一无法解析:无法读取 org.apache.maven.plugins:maven-resources-plugin:jar:2.6 的工件描述符:无法传输工件 org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from/to central ( https://repo.maven.apache.org/maven2 ): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException:trustAnchors 参数必须非空 -> [帮助 1]
Anyone can help me to resolve this?任何人都可以帮我解决这个问题吗?
I assume you are using JDK 7...if so you have to check your JDK 7 options cause a month ago Maven Central does not support anymore TLS v1.X you have to configure your build by using:我假设您使用的是 JDK 7...如果是这样,您必须检查 JDK 7 选项,因为一个月前 Maven Central 不再支持 TLS v1.X,您必须使用以下命令配置构建:
mvn -Dhttps.protocols=TLSv1.2 <goals>
More details can be found on the documentation .可以在文档中找到更多详细信息。
Apart from the above I recommend to try the build on plain command line and not inside Eclipse...除了上面的内容,我建议尝试在普通命令行上构建而不是在 Eclipse 中...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.