简体   繁体   English

插件 org.apache.maven.plugins:maven-resources-plugin:2.6 或其依赖项之一无法解析

[英]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 项目。

I follow this guide我遵循本指南

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.

相关问题 无法计算构建计划:插件 org.apache.maven.plugins:maven-resources-plugin:2.6 或其依赖项之一无法解析 - Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved 无法计算构建计划:插件 org.apache.maven.plugins:maven-resources-plugin:2.5 或其依赖项之一无法解析 - Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved 插件 org.apache.maven.plugins:maven-compiler-plugin 或其依赖项之一无法解析 - Plugin org.apache.maven.plugins:maven-compiler-plugin or one of its dependencies could not be resolved 插件 org.apache.maven.plugins:maven-install-plugin:2.4 或其依赖项之一无法解析 - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved 在新的 Maven 项目上:无法计算构建计划:插件 org.apache.maven.plugins:maven-resources-plugin:2.6? - on new Maven Project: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6? Maven:插件 org.apache.maven.plugins:maven-clean-plugin:2.5 或其依赖项之一无法解析 - Maven : Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved 找不到工件 org.apache.maven.plugins:maven-resources-plugin - Could not find artifact org.apache.maven.plugins:maven-resources-plugin 目标org.apache.maven.plugins的执行默认资源:maven-resources-plugin:2.6:resources失败 - Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.6:resources failed 获取org.apache.maven.plugins:maven-jar-plugin:2.3.2或其依赖项之一无法解析错误 - getting org.apache.maven.plugins:maven-jar-plugin:2.3.2 or one of its dependencies could not be resolved error 无法更新 Maven 配置无法计算构建计划:插件 org.apache.maven.plugins:maven-resources-plugin:2.5 - Unable to update Maven configuration Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.5
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM