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.
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
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: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/): 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.
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
Related
I imported my project and when did a maven clean build was successful, but when maven install is done this Build Failure occurs.
I have my maven in C\maven\maven 3.6 and I have given the settings and repo location of that location to this project.
My Env variables are correctly set up with reference to Java and Maven as well. Please help me on this to get it solved.
it may be because of the proxy ! Check you proxy and test if it's working.
Im getting this error when I try to import any repos mainly from Spring Initializer. I'm behind a proxy but I have my proxies specified so not sure why this is failing. I have tried to run mvn dependency:purge-local-repository from Stackflow thread but this hasnt helped. I'm using java version "1.8.0_231". The error connection timed out usually points to proxy issues but I have tested and its working for almost everything else except IntelliJ and Eclipse.
Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.2.4.RELEASE from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.16.215] failed: Connection timed out: connect
check your IDEA's maven setting
Preferences -> Build,Execution, Deployment -> Build Tools -> Maven
is right.
pay close attention to the setting of User settings file and Local repository. make sure that they match your local settings.
I am trying to build Apache CXF locally. It does not work behind a maven proxy (e.g. JFrog Artifactory), because CXF's transitives dependencies contain a dependency with an invalid pom.xml file:
[ERROR] Failed to execute goal on project cxf-rt-transports-jms: Could not resolve dependencies for project org.apache.cxf:cxf-rt-transports-jms:bundle:3.4.0-SNAPSHOT: Failed to collect dependencies at org.apache.activemq:activemq-pool:jar:5.15.9 -> org.apache.activemq:activemq-jms-pool:jar:5.15.9 -> org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec:jar:1.0.1: Failed to read artifact descriptor for org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec:jar:1.0.1: Could not transfer artifact org.apache.geronimo.specs:specs:pom:1.1 from/to nexus-central (https://myrepo.local/maven-central/): Failed to transfer file https://myrepo.local/maven-central/org/apache/geronimo/specs/specs/1.1/specs-1.1.pom with status code 409 -> [Help 1]
Artifactory will deliver a 409 if it cannot parse the XML file. In this case, the artifact is apache.geronimo.specs:specs:pom:1.1. If you take a look at the XML file, you'll find it is invalid indeed: https://repo1.maven.org/maven2/org/apache/geronimo/specs/specs/1.1/specs-1.1.pom
After line 89 (closing </developers>), there is an extra `.
I opened an issue at apache to fix their build: https://issues.apache.org/jira/browse/CXF-8101
In the mean time, I'd like to work with CXF to create a patch an contribute.
Things I tried:
Install the dependency manually => failed because mvn still looks for updates
No proxy => not an option for me :(
Add some excludes locally on the parent/pom.xml => didn't help, I will never be able to catch them all (transitive dependencies…).
Forcing the offending artifacts' version to 1.2. Did not help either, because some projects wil still rely on a specific version.
That said, what are my options?
Thanks in advance,
Ben
You can try:
Download org/apache/geronimo/specs/specs/1.1/specs-1.1.pom into your local .m2 path and fix the error.[You need to be sure all dependencies are available in your local repository]
Try to build with maven command: -o (offline)
If -o doesn't help, try with -nsu,--no-snapshot-updates (Suppress SNAPSHOT updates)
Hope it helps you.
I am trying to run a Spring Project, with several dependencies, that I have already downloaded into my local repository, and have also done followings :
Added local repository path in setting.xml in localRepository tag.
Running the project using mvn install -nsu -llr -o , for offline mode.
And I am getting following error :
[ERROR] Failed to execute goal on project file2Json: Could not resolve
dependencies for project
com.nse.file2Json:file2Json:jar:0.0.1-SNAPSHOT: Cannot access central
(http://repo1.maven.org/maven2) in offline mode and the artifact
com.fasterxml.jackson.dataformat:jackson-dataformat-csv:jar:2.8.4 has
not been downloaded from it before. -> [Help 1]
I have the dependency installed, take a look :(
I have following questions :
Why is the project is trying to look into http://repo1.maven.org/maven2 when I am using offline mode ?
How can I run the project offline, by providing the required dependencies at required paths ?
Please help !
thanks in advance.
It says it cannot access Maven Central because you are in offline mode. And it tries to look there, because ´jackson-dataformat-csv` is not in your local repository, so Maven needs to get it from somewhere (and Maven Central is the default repository).
What you need to do is to execute mvn dependency:go-offline before you switch to the offline mode. This will download everything that you need (dependencies, transitive dependencies as well as plugins).
I am trying to install a project on Ubuntu server but I am receiving the following error:
[ERROR] Failed to execute goal on project db: Could not resolve dependencies for project com.company.soft.prod:db:jar:1.0-SNAPSHOT: The following artifacts could not be resolved: commons-codec:commons-codec:jar:1.5, mysql:mysql-connector-java:jar:5.1.26, org.springframework:spring-jdbc:jar:3.2.4.RELEASE, org.springframework:spring-beans:jar:3.2.4.RELEASE, org.springframework:spring-core:jar:3.2.4.RELEASE, org.springframework:spring-tx:jar:3.2.4.RELEASE, org.springframework:spring-orm:jar:3.2.4.RELEASE, aopalliance:aopalliance:jar:1.0, org.hibernate:hibernate-core:jar:3.5.1-Final, antlr:antlr:jar:2.7.6, commons-collections:commons-collections:jar:3.1, dom4j:dom4j:jar:1.6.1, xml-apis:xml-apis:jar:1.0.b2, javax.transaction:jta:jar:1.1, org.hibernate:hibernate-entitymanager:jar:3.5.1-Final, org.hibernate:hibernate-annotations:jar:3.5.1-Final, org.hibernate:hibernate-commons-annotations:jar:3.2.0.Final, cglib:cglib:jar:2.2, asm:asm:jar:3.1, javassist:javassist:jar:3.9.0.GA, org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Final, org.springframework:spring-context:jar:3.2.4.RELEASE, org.springframework:spring-aop:jar:3.2.4.RELEASE, org.springframework:spring-expression:jar:3.2.4.RELEASE, com.existanze.libraries:orm:jar:0.0.3, joda-time:joda-time:jar:1.6.2, com.jolbox:bonecp:jar:0.7.1.RELEASE, com.google.guava:guava:jar:r08: The repository system is offline but the artifact commons-codec:commons-codec:jar:1.5 is not available in the local repository.
I have to say that locally I am not facing any problem with dependencies resolution. What I am developing is a mavenized Spring MVC multi-project in Netbeans.
Now that I am trying to deploy it to the server I receive this error. I tried also mvn clean install -U to update SNAPSHOT but it still does not work. I don't know what else to do, so at this point I need some expert help.
Thank you very much.
I suspect that your Ubuntu server does not allow external internet connection to the central repository. Please change the firewall to allow the central repository access. If this is not allowed due to your corporation security policy, you might have to deploy a enterprise maven repository within your corporation.