在本文中,我们将为您详细介绍Couldnottransferartifactorg.apache.maven.plugins:maven-clean-plugin:pom:2.5from/tocent
在本文中,我们将为您详细介绍Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (htt的相关知识,此外,我们还会提供一些关于build.plugins.plugin.version'' for org.apache.maven.plugins:maven-compiler-pl、clipse加载maven工程提示pom.xml无法解析org.apache.maven.plugins:maven-resources-plugin:、Could not calculate build plan: Plugin org.apache.maven.plugins:maven-war-plugin:2.1.1 or one of、Could not calculate build plan: Plugin org.apache.maven.plugins:maven-war-plugin:2.2的有用信息。
本文目录一览:- Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (htt
- build.plugins.plugin.version'' for org.apache.maven.plugins:maven-compiler-pl
- clipse加载maven工程提示pom.xml无法解析org.apache.maven.plugins:maven-resources-plugin:
- Could not calculate build plan: Plugin org.apache.maven.plugins:maven-war-plugin:2.1.1 or one of
- Could not calculate build plan: Plugin org.apache.maven.plugins:maven-war-plugin:2.2
Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (htt
一.问题
Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (https://repo.maven.apache.org/maven2): Transfer Failed for https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
二.解决方案
1.更改idea中的证书:
证书错误,访问https协议的网站,需要ssl认证才行,这里没有证书,我们可以用下面的方式忽略ssl检查导致的问题。
我们可以到IEDA->setting里,去找 Maven,在importing里加入如下的语句:
-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true
总结
以上是小编为你收集整理的Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (htt全部内容。
如果觉得小编网站内容还不错,欢迎将小编网站推荐给好友。
原文地址:https://www.cnblogs.com/dwh-horse/p/16367817.html
build.plugins.plugin.version'' for org.apache.maven.plugins:maven-compiler-pl
字面意思就是没有指定版本信息 ,警告问题:程序可以运行
增加一行
<version>2.3.2</version> 用来指定版本信息
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</build>
OK了
Using platform encoding (UTF-8 actually) to copy filtered resources
虽然并不影响项目的正常运行和install,但是不想看到这警告的发生。
加上(可加在在结尾处)
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
如下:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
clipse加载maven工程提示pom.xml无法解析org.apache.maven.plugins:maven-resources-plugin:
在别的机子上创建一个maven工程,复制到本机上导入,出现pom.xml文件错误,提示错误如下:
- Multiple annotations found at this line:
- - Execution default-testResources of goal org.apache.maven.plugins:maven-resources- plugin:2.4.3:testResources failed:
- Plugin org.apache.maven.plugins:maven-resources-plugin:2.4.3 or one of its dependencies could not be resolved: Failed to collect
- dependencies for org.apache.maven.plugins:maven-resources-plugin:jar:2.4.3 () (org.apache.maven.plugins:maven-resources-
- plugin:2.4.3:testResources:default-testResources:process-test-resources)
- - Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
- (execution: default-compile, phase: compile)
- - CoreException: Could not get the value for parameter compilerId for plugin execution default-compile:
- PluginResolutionException: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.3.2 or one of its dependencies could not be
- resolved: Failed to collect dependencies for org.apache.maven.plugins:maven-compiler-plugin:jar:2.3.2 ():
- ArtifactDescriptorException: Failed to read artifact descriptor for org.apache.maven:maven-plugin-api:jar:2.0.6:
- ArtifactResolutionException: Failure to transfer org.apache.maven:maven-plugin-api:pom:2.0.6 from http://repo1.maven.org/
- maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or
- updates are forced. Original error: Could not transfer artifact org.apache.maven:maven-plugin-api:pom:2.0.6 from/to central (http://
- repo1.maven.org/maven2): null to http://repo1.maven.org/maven2/org/apache/maven/maven-plugin-api/2.0.6/maven-plugin-
- api-2.0.6.pom
- - CoreException: Could not get the value for parameter compilerId for plugin execution default-testCompile:
- PluginResolutionException: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.3.2 or one of its dependencies could not be
- resolved: Failed to collect dependencies for org.apache.maven.plugins:maven-compiler-plugin:jar:2.3.2 ():
- ArtifactDescriptorException: Failed to read artifact descriptor for org.apache.maven:maven-plugin-api:jar:2.0.6:
- ArtifactResolutionException: Failure to transfer org.apache.maven:maven-plugin-api:pom:2.0.6 from http://repo1.maven.org/
- maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or
- updates are forced. Original error: Could not transfer artifact org.apache.maven:maven-plugin-api:pom:2.0.6 from/to central (http://
- repo1.maven.org/maven2): null to http://repo1.maven.org/maven2/org/apache/maven/maven-plugin-api/2.0.6/maven-plugin-
- api-2.0.6.pom
- - Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.4.3:resources failed: Plugin
- org.apache.maven.plugins:maven-resources-plugin:2.4.3 or one of its dependencies could not be resolved: Failed to collect
- dependencies for org.apache.maven.plugins:maven-resources-plugin:jar:2.4.3 () (org.apache.maven.plugins:maven-resources-
- plugin:2.4.3:resources:default-resources:process-resources)
- - Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:
- 2.3.2:testCompile (execution: default-testCompile, phase: test-compile)
错误信息出现在pom头的project标签,project标签内容是:
- <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/maven-v4_0_0.xsd">
原:
这是由于缺少maven-resources-plugin-2.4.3.jar文件。这个文件是在{user.home}\.m2 \repository\org\apache\maven\plugins\maven-resources-plugin\下。 {user.home}是maven的配置路径,一般是我的文档,是window-preferences-MyEclipse- Maven4MyEclipse-User Setting里面的Local Repository。
解决方案
1、在pom.xml文件中加入maven-resources-plugin配置
- <dependency>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.4.3</version>
- </dependency>
2、在命令行下运行mvn install ,如果执行正确应该会在{user.home}\.m2\repository\org\apache\maven\plugins\maven- resources-plugin\下看到maven-resources-plugin-2.4.3.jar文件
3、刷新工程(右键工程选择刷新项)
4、刷新maven配置,右键工程节点,选择Maven4MyEclipse-Update Project Configuration
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-war-plugin:2.1.1 or one of
1.导入项目时报以下错误.
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-war-plugin:2.1.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-war-plugin:2.2
maven第一次创建打包方式为war的项目报错下图的错,一般是第一次下载相关的文件时候出错,需要进入到maven的本地仓库中删除报错的文件,让它重新下载。
删除文件夹后,报错的项目右键选择maven>update project,重新下载该文件
下载完成后pom.xml文件还会有错误,如下图
解决方法:
方法一:项目右键选择java EE tools > Generate Deployment....
方法二:
项目右键properties
重新勾上后,如下图:
上面的两种解决方法的目录结构会不一样
第一种的目录结构: 第二种的目录结构:
不知道有没有一次性解决的方法,上面这两种都是要创建项目后,操作一次。
如果还有另外的解决方法,欢迎在评论区讨论。
关于Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (htt的介绍现已完结,谢谢您的耐心阅读,如果想了解更多关于build.plugins.plugin.version'' for org.apache.maven.plugins:maven-compiler-pl、clipse加载maven工程提示pom.xml无法解析org.apache.maven.plugins:maven-resources-plugin:、Could not calculate build plan: Plugin org.apache.maven.plugins:maven-war-plugin:2.1.1 or one of、Could not calculate build plan: Plugin org.apache.maven.plugins:maven-war-plugin:2.2的相关知识,请在本站寻找。
本文标签: