In our organization we use internal Artifactory server as maven repository. I have setup the Maven settings accordingly. Problem is when I do Maven > Update from Eclipse below error is thrown -
Failure to transfer
org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from
https://.../artifactory/public was cached in
the local repository, resolution will not be reattempted until the
update interval of artifactory has elapsed or updates are forced.
Original error: Could not transfer artifact
org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from/to
artifactory (https://.../artifactory/public):
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to
find valid certification path to requested target
This is what I have tried so far -
Imported the Artifactory server certificate manually using keytool in Java cacerts.
Ensured that Eclipse setting is pointing to respective Maven and JDK installations.
Deleted m2_repo and rebuilt
Deleted eclipse setup and setup afresh
Restarted system
When I run Maven from command prompt it works fine. What am I missing here?
Issue got resolved when I tried Maven > Update with Force Update of Snapshot/Releases enabled.
Related
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
I had to re-install Eclipse, and my previously-working project refuses to compile due to Maven POM error.
The error is
Project build error: Non-resolvable parent POM: Failure to transfer my:my-parent:pom:3.0 from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced.
Original error: Could not transfer artifact my:my-parent:pom:3.0 from/to central (http://repo.maven.apache.org/
maven2): connect timed out and 'parent.relativePath' points at wrong local POM
I know the SVN location for the parent POM on the company Intranet, but not sure where it should be configured in Eclipse/Maven so parent POM is read from there instead of from Apache Maven repo
You must configure current maven repositories in your .m2 directory in settings.xml file.
And if you want to force to check for artifacts in remote repositories you must do a mvn compile with -U option to force an update
Since you are in company network may be a proxy issue. Check the settings.xml and check the required proxy is setup properly
Try force maven update
mvn clean install -U
As per NullPointerException's comment, the problem was that my previous Eclipse install had a custom .m2 location ( preferences -> maven -> User Settings ) and new install was pointing to incorrect .m2.
Changing that to correct location fixed the issue
I am trying to create a Maven based Jersey quick starter web App. I am selecting the glassfish archetype. But it is giving me the error given below. It is successfully creating com.sun.jersey archetype project. But with glassfish one its having issues. There are no proxy setup in my laptop which could interfere in downloading process. I need to sort this out asap.
Could not resolve archetype org.glassfish.jersey.archetypes:jersey quickstart-webapp:2.19 from any of the configured repositories.
Could not resolve artifact org.glassfish.jersey.archetypes:jersey-quickstart-webapp:jar:2.19
Failure to transfer org.glassfish.jersey.archetypes:jersey-quickstart-webapp:jar:2.19 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced.
Original error: Could not transfer artifact org.glassfish.jersey.archetypes:jersey-quickstart-webapp:jar:2.19 from/to central (https://repo.maven.apache.org/maven2): connect timed out
Failure to transfer org.glassfish.jersey.archetypes:jersey-quickstart-webapp:jar:2.19 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.glassfish.jersey.archetypes:jersey-quickstart-webapp:jar:2.19 from/to central (https://repo.maven.apache.org/maven2): connect timed out
It seems there is a typo error in the archetype's artifact: there is a missing hyphen. It's "jersey-quickstart-webapp" and not "jersey quickstart-webapp".
But there is also a timeout from Maven Central, so may be it was only that MC was not available at the time of transfert.
Whatever, before any new trial, delete the folders:
- ~/.m2/repository/org/glassfish/jersey/archetypes/jersey quickstart-webapp
- ~/.m2/repository/org/glassfish/jersey/archetypes/jersey-quickstart-webapp
Here is how I got the solution in eclipse
1. Go to window.
2. Select Preferences.
3. Select Maven.
4. Select Archetypes
5. Add remote catalog.
6. catalog file :- [http://repo.maven.apache.org/maven2/archetype-catalog.xml][1]
Description :- Remote Archetype (You can mention your own)
7. Click on verify and it should say something like this
Found 27166 archetype(s)
8. Click on OK.
9. Restart your eclipse.
[1]: http://repo.maven.apache.org/maven2/archetype-catalog.xml
Go to window.
Select Preferences.
Select Maven.
Select Archetypes
Add remote catalog.
catalog file :- https://repo.maven.apache.org/maven2/archetype-catalog.xml
Description :- Remote Archetype (You can mention your own)
Click on OK.
on eclipse
Go to window.
Select Preferences.
Select Maven.
Select Archetypes
Add remote catalog.
catalog file :- https://repo.maven.apache.org/maven2/archetype-catalog.xml
Description :- Remote Archetype (You can mention your own)
Click on OK.
This is the error thrown,
Failure to transfer org.codehaus.plexus:plexus-utils:jar:3.0 from
http://mirrors.ibiblio.org/maven2 was cached in the local repository,
resolution will not be reattempted until the update interval of
ibiblio.org has elapsed or updates are forced. Original error: Could
not transfer artifact org.codehaus.plexus:plexus-utils:jar:3.0 from/to
ibiblio.org (http://mirrors.ibiblio.org/ maven2): Access denied to
http://mirrors.ibiblio.org/maven2/org/codehaus/plexus/plexus-utils/3.0/plexus-utils-3.0.jar.
Error code 403, Forbidden
In Pic,
I have the same issue in two different machines [One of the machines with Proxy and other without proxy (Personnel laptop)]
I'm using
Eclipse Kepler
JDK 1.6
Maven 3.0.4
No luck after lots of attempts; Some of them are listed below:
downgraded JDK [Java] from 1.7 to 1.6
added proxy on settings.xml under [C:\Users\prashanth_sams\.m2]
added mirror in settings.xml under C:\Program Files\Maven\apache-maven-3.0.4\conf\settings.xml
located specific Maven version location externally
But, instead of jar files, I see the following two files present inside the repo with suffix, .lastUpdated
Is there any other mirrors to be added in the settings.xml? Any help is highly welcome!
This issue got fixed when I add the mirrors on settings.xml which is located in C:\Program Files\Maven\apache-maven-3.0.4\conf\settings.xml from the below URL
http://repo1.maven.org/maven2/.meta/repository-metadata.xml
After updating the XML, try Maven > Update Project..
The Maven Error:
Failed to execute goal on project XXXXXX: Could not resolve
dependencies for project XXXXXX:XXXXXX:0.1-SNAPSHOT: Failure to find
com.oracle.ucm:idcserver:jar:11.1.1.8 in
[http://internal-proxy:8080/nexus-2.6.4/content/groups/XXXXXX] was cached
in the local repository, resolution will not be reattempted until the
update interval of internal-proxy has elapsed or updates are forced.
I have confirmed that the artifact has indeed been proxied from the external source.
Why can the local Maven build resolve the dependency in either the cloud or the intranet proxy? How can I attempt to debug such problems? I am administrator of the local Maven repository, so I can debug/change configuration suggested here.
Any insight would be welcomed.
Do you have this particular ucm jar with you ? The jar com.oracle.ucm:idcserver:jar:11.1.1.8 is not there on maven central repository and thus will never be fetched since it does not exist there on maven central.
Last I remember, you will have to manually install it in your local repository. Check this post here
Ugh, it was an improper URL in the settings.xml.
I wish the error was more transparent such as connection refused.