smarty_pants
smarty_pants

Reputation: 89

Maven unable to run on my vm using vmware

I recently did a fresh install of maven. I have been trying to run mvn clean install but I keep getting a peer not authenticated error. 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.

  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
  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. 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.

I was using this same maven project 6 months ago, but I don't recall ever having this problem. 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. Is the VM to blame? 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.

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:[email protected]/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:[email protected]/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

But too bad the solution doesnt work for me.

Upvotes: 0

Views: 493

Answers (1)

Chiran K.
Chiran K.

Reputation: 404

Reson for this is newer versions of Maven checks for SSL for https connections. Refer this to bypass the error temporarily.

[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

Upvotes: 1

Related Questions