从存储库中错误解析插件'org.apache.maven.plugins:maven-jar-plugin'的版本,在任何插件存储库中均未找到插件 [英] Error resolving version for plugin 'org.apache.maven.plugins:maven-jar-plugin' from the repositories ,Plugin not found in any plugin repository

查看:2502
本文介绍了从存储库中错误解析插件'org.apache.maven.plugins:maven-jar-plugin'的版本,在任何插件存储库中均未找到插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试Maven构建我的Java项目,但是它失败了,并且出现了以下错误:

I am trying to Maven build my Java project but it is getting failed and i am getting below error:

来自存储库[本地(C:\ Users \ Vinita.Gupta.m2 \ repository),中央(

Error resolving version for plugin 'org.apache.maven.plugins:maven-jar-plugin' from the repositories [local (C:\Users\Vinita.Gupta.m2\repository), central (https://repo.maven.apache.org/maven2)]: Plugin not found in any plugin repository -> [Help 1]

我正在尝试在Eclipse Neon中构建项目,并已安装并设置了Maven路径,用于Eclipse的m2connector.

I am trying to build the project in Eclipse Neon and have installed and setup Maven path,m2connector for Eclipse.

注意:我未使用任何代理连接到网络 我在网上找到的大多数解决方案都由于代理设置而出现问题,但是我直接连接到网络并且能够通过浏览器在目录下浏览,但无法通过Maven连接: https://repo.maven.apache.org/maven2

Note: I am not connected to network using any proxy Most of the solutions which i have found online were having issues due to proxy settings but i am directly connected to network and able to browse below directory via browser but couldn't connect through Maven: https://repo.maven.apache.org/maven2

请帮忙!

推荐答案

我遇到了相同的错误,但对于maven-failsafe-plugin.

I had the same error, but for the maven-failsafe-plugin.

在同事的帮助下,我们摆脱了将版本行添加到项目pom.xml中的插件声明的问题.我们添加了<version>2.20.1</version>行,从而产生了以下插件声明.

With the help of a colleague, we got rid of the problem adding the version line to the plugin declaration in the project pom.xml. We added the <version>2.20.1</version> line resulting in the following plugin declaration.

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>2.20.1</version>
                <configuration>
                    <skipTests>false</skipTests>
                    <argLine>-Djava.library.path=${project.parent.basedir}/lib/${arquitecturaMaquina}</argLine>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

这是一个长期工作的项目(超过一年),从未出现此错误.我不知道是什么触发了它,但是有关重置本地存储库,检查代理等的所有其他答案均无效.

It is a long working project (over a year) and never had this error. I do not know what triggered it, but all the other answers about resetting the local repository, checking the proxy, etc did not work.

然后,我们将该版本行添加到pom.xml中,并且项目再次正确构建.现在,我删除了该行,它仍在工作.我的猜测是,它确实与某种混乱的某种缓存有关,并且要求特定版本摆脱了混乱,现在它可以像问题出现之前一样正常工作.

Then we added that version line to the pom.xml and the project built correctly again. Now I removed the line and it is still working. My guess is that it indeed had something to do with some messed up cache of some kind, and that requiring the specific version got rid of the mess and now it is working as before the problem appeared.

这篇关于从存储库中错误解析插件'org.apache.maven.plugins:maven-jar-plugin'的版本,在任何插件存储库中均未找到插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆