简体   繁体   English

Maven无法使用vmware在我的vm上运行

[英]Maven unable to run on my vm using vmware

I recently did a fresh install of maven. 我最近重新安装了Maven。 I have been trying to run mvn clean install but I keep getting a peer not authenticated error. 我一直在尝试运行mvn clean install但是我一直收到对等人未通过身份验证的错误。 I can acess the website with the credentials that I am using in the settings.xml file but I am unable to complete the execute my goal. 我可以在settings.xml文件中使用正在使用的凭据访问网站,但无法完成执行目标。

  1. I have tried explicitly setting my path for settings.xml: mvn clean install -s ~/.m2/settings.xml for local and global mvn clean install -gs /home/myuser/app/maven/conf/settings.xml 我尝试显式设置settings.xml的路径: mvn clean install -s ~/.m2/settings.xml mvn clean install -gs /home/myuser/app/maven/conf/settings.xml mvn clean install -s ~/.m2/settings.xml用于本地和全局mvn clean install -gs /home/myuser/app/maven/conf/settings.xml
  2. Double checked whether each file was using the right creds and they definitely were. 仔细检查了每个文件是否使用了正确的凭据,而且确实如此。

Does anyone have any other solution that I can try? 有没有人可以尝试其他解决方案? Because these credentials work 100%, I just dont know why they aren't working in this case. 因为这些凭据100%有效,所以我只是不知道为什么在这种情况下它们不起作用。 Is there any explicit way for me to set the username and password in the command line? 有什么明确的方法可以在命令行中设置用户名和密码? Because I am at my wits end with this. 因为我尽力而为。 Been working on this for about 2 days and don't have a solution. 已经为此工作了大约2天,没有解决方案。

I was using this same maven project 6 months ago, but I don't recall ever having this problem. 我在6个月前使用了同一个Maven项目,但我不记得曾经遇到过这个问题。 Talked to my co-worker and he was able to run it with the same settings that I have but hes not on a VM. 与我的同事交谈,他可以使用与我相同的设置来运行它,但他不在VM上。 Is the VM to blame? 是VM的罪魁祸首吗? Is there some proxy setting or something that I am missing that I have to set for VMs? 是否需要为虚拟机设置某些代理设置或缺少的设置? I am using VMWare to run my VM which is Ubuntu 16. 我正在使用VMWare运行我的Ubuntu 16. VM。

Thank you for all the help! 感谢您的所有帮助!

ERROR Message: 错误信息:

[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] EDIT: [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}

This link here is exactly my problem: Maven - peer not authenticated 此链接正是我的问题: Maven-对等方未通过身份验证

But too bad the solution doesnt work for me. 但是太糟糕了,该解决方案对我不起作用。

Reson for this is newer versions of Maven checks for SSL for https connections. 为此,Reson是Maven的较新版本,用于检查https连接的SSL。 Refer this to bypass the error temporarily. 请参考此内容暂时绕过错误。

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

For a permanent solution, you have to add the certificate to the certificate store of your JRE 对于永久解决方案,您必须将证书添加到JRE的证书存储中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM