【问题标题】:Maven unable to run on my vm using vmwareMaven 无法使用 vmware 在我的虚拟机上运行
【发布时间】:2018-06-27 03:39:12
【问题描述】:

我最近重新安装了 maven。我一直在尝试运行mvn clean install,但我不断收到未通过身份验证的对等错误。我可以使用我在 settings.xml 文件中使用的凭据访问该网站,但我无法完成执行我的目标。

  1. 我已尝试显式设置 settings.xml 的路径: mvn clean install -s ~/.m2/settings.xml 本地和全球 mvn clean install -gs /home/myuser/app/maven/conf/settings.xml
  2. 仔细检查每个文件是否使用了正确的凭据,而且确实如此。

有没有人可以尝试其他解决方案?因为这些凭据 100% 有效,所以我只是不知道为什么它们在这种情况下不起作用。我有什么明确的方法可以在命令行中设置用户名和密码吗?因为我对此束手无策。已经为此工作了大约 2 天,但没有解决方案。

我在 6 个月前使用了同一个 maven 项目,但我不记得曾经遇到过这个问题。与我的同事交谈,他能够使用与我相同的设置运行它,但不在虚拟机上。是VM的错吗?是否有一些代理设置或我必须为虚拟机设置的东西?我正在使用 VMWare 运行我的虚拟机,即 Ubuntu 16。

感谢大家的帮助!

错误信息:

[ERROR] Failed to execute goal on project company-pojo-services: Could not resolve dependencies for project org.company:company-pojo-services:jar:3.6.1.RELEASE: The following artifacts could not be resolved: javax.jms:jms:jar:1.1, com.oracle:ojdbc6:jar:11.2.0.1.0: Could not transfer artifact javax.jms:jms:jar:1.1 from/to artifactory-online (https://reader:reader@company.artifactoryonline.com/company/company-3/repository/): peer not authenticated -> [Help 1] 编辑:

[ERROR] Failed to execute goal on project company-pojo-services: Could not resolve dependencies for project org.company:company-pojo-services:jar:3.6.1.RELEASE: The following artifacts could not be resolved: javax.jms:jms:jar:1.1, com.oracle:ojdbc6:jar:11.2.0.1.0: Could not transfer artifact javax.jms:jms:jar:1.1 from/to artifactory-online (https://reader:reader@company.artifactoryonline.com/company/company-3/repository/): Remote host closed connection during handshake: SSL peer shut down incorrectly -> [Help 1}

这里的链接正是我的问题:Maven - peer not authenticated

但是太糟糕了,该解决方案对我不起作用。

【问题讨论】:

    标签: java xml maven virtual-machine


    【解决方案1】:

    这是因为更新版本的 Maven 检查 SSL 的 https 连接。参考这个暂时绕过错误。

    [http://maven.apache.org/wagon/wagon-providers/wagon-http/][1]

    对于永久解决方案,您必须将证书添加到 JRE 的证书存储中

    【讨论】:

    • 我的 apache 版本是 3.1.1。这个版本也有这个问题吗?哪些 args 适合我解决这个问题?
    • 使用这个参数 -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true
    • 现在我得到这个错误:Remote host closed connection during handshake: SSL peer shut down incorrectly
    • 粘贴您的错误日志
    • 添加了上面的日志
    猜你喜欢
    • 1970-01-01
    • 2013-06-15
    • 2020-11-06
    • 2012-08-13
    • 2017-05-09
    • 1970-01-01
    • 2015-05-07
    • 2016-06-11
    • 1970-01-01
    相关资源
    最近更新 更多