- This topic has 15 replies, 3 voices, and was last updated 3 years ago by
Brian Fernandes.
-
AuthorPosts
-
malinivijayaramanParticipantI’m trying to make maven refer to my local repository, but its always trying to connect to central repository. Does my version support this? Any documentation that I can refer to resolve the issue?
Brian FernandesModeratorMalini,
Can you let us know at what stage connections to the central repository are attempted? Are you talking about within the IDE when dependencies or indices are being downloaded, or when building your app or other Maven goals using the
mvn
command.Can you also detail for us the changes you’ve made to have Maven refer to your local repository?
malinivijayaramanParticipantThis happens when trying to build maven project, Build clean or Build install after adding dependencies in the pom.xml. For maven to work offline, I have added <localRepository> path and <offline>true in the settings.xml in .m2 folder. Next, in run configuration, have checked offline mode specification.
Even if I try project -> maven -> add dependency, not all dependencies are showing up. I have the maven repository in c:/mavenoffline folder.
Also if I manually put in a missing jar in the .m2/repo, when I do build install, the jar gets deleted or updated to *.jar.lastupdated
Let me know if you need any other details.-
This reply was modified 3 years, 1 month ago by
malinivijayaraman.
malinivijayaramanParticipantBrian,
Now I have access to connect to the central repository of maven. But when I try to Build, I’m getting this error- “unable to find valid certification path maven”.
Also below error for Maven – clean install—–
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.pom
[INFO] ————————————————————————
[INFO] BUILD FAILURE
[INFO] ————————————————————————
[INFO] Total time: 1.118 s
[INFO] Finished at: 2021-03-24T14:54:46-04:00
[INFO] Final Memory: 6M/16M
[INFO] ————————————————————————
[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-clean-plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.5 from/to central (https://repo.maven.apache.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]_________________________________________________________________________________________________________________
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to
requested target at io.takari.aether.connector.AetherRepositoryConnector$2.wrap(AetherRepositoryConnector.java:895)________________________________________________________________________________________________________________
Is there any setting in myEclipse that needs to configured?-
This reply was modified 3 years, 1 month ago by
malinivijayaraman.
support-swapnaModeratorMalini,
The PKIX errors are because the configuration of your firewall does not handle correctly requests done to https uris. Could you please confirm this by asking your network admin?
Here is a thread which discusses issues with Maven behind proxy : https://stackoverflow.com/questions/25911623/problems-using-maven-and-ssl-behind-proxyYou can try running MyEclipse with a newer version of JDK, which might have the required certs and check if it fixes the issue.
Alternatively, you could configure Maven to work offline. Go to Window > Preferences > Maven and enable
Offline
. If you have set the local repo right in the settings.xml, then please go to Window > Preferences > Maven > User Settings and recheck if the local repository path is picked up correctly. If it is listed correctly, then reindex and check if it works.–Swapna
Genuitec Support
malinivijayaramanParticipantSwapna,
MyEclipse – windows – preferences – installed JRE’s its referring to the JDK inside MyEclipse\binary\com.sun.java.jdk8.win32.x86_1.8.0.v112. Also I have only jre installed in my Java-home. not JDK. is it causing the issue?
malinivijayaramanParticipantSwapna,
MyEclipse – windows – preferences – installed JRE’s its referring to the JDK inside MyEclipse\binary\com.sun.java.jdk8.win32.x86_1.8.0.v112. Also I have only jre installed in my Java-home. not JDK. is it causing the issue?
malinivijayaramanParticipantCreate a new maven project – this gives below error…
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6Why does new project creation give error?
malinivijayaramanParticipantCreate a new maven project – this gives below error…
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6Why does new project creation give error?
Brian FernandesModeratorMalini,
From the build failure you shared earlier, the problem is caused due to the fact that Maven is unable to reach the repositories in order to download artifacts you need. New projects will have these same requirements – there are referenced artifacts that still need to be downloaded and you will experience the same problem.
Did you read the stack overflow thread referenced by Swapna in her response on how to resolve this issue?
As far as the JVM suggestions are concerned, I would recommend downloading a Java 10 JDK and modifying the
-vm
argument in the myeclipse.ini file to point to the javaw.exe from this Java 10 installation (MyEclipse 2017, being an old install, may not work with more recent Java versions). This should ensure that MyEclipse itself runs with Java 10 instead of Java 8, and it may resolve the connectivity issues you’re experiencing.A longer term solution would be to simply upgrade to MyEclipse 2020 – it has updated Maven tooling, many Maven fixes as well as a far more recent JVM included that should get you past the current issues (if they are indeed caused by an outdated JVM). You don’t have to uninstall 2017 to install 2020, you can install this alongside your 2017 install.
Hope this helps.
malinivijayaramanParticipantBrian,
I have tried the stackoverflow suggested by Swapna, added the profiles in settings.xml. When I give update project, dependencies are getting updated in the \.m2\repository, but ends with maven-resource-plugin.jar-2.6 error.I will try to either get Java 10 jdk or install myEclipse 2020 version.
Brian FernandesModeratorMalini,
Thanks for the update. There is a small chance that version 2.6 of the maven-resources-plugin in your local repository is corrupt, resulting in this sort of error. You can try shutting down MyEclipse, and then deleting the 2.6 folder entirely, before starting MyEclipse and trying again.
The path to 2.6 should be
\repository\org\apache\maven\plugins\maven-resources-plugin\2.6
(within your .m2 folder)
malinivijayaramanParticipantBrian,
I have the latest myEclipse 2020 version, but still I’m getting the SunCertPathBuilderException – unable to find valid certificate and the below one:
Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6
Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.6I also tried the above solution of deleting \2.6 folder you provided, but its still giving same error.
Can you please help in resolving this?
Brian FernandesModeratorMalini,
1) Can you try running any Maven build commands from the command line, outside MyEclipse? Use the
mvn install
command for instance in the directory that contains thepom.xml
file. Do you see the same error?
2) I’m not sure if this will help, but can you shut down MyEclipse, delete (or bakckup) your 2.6 folder again, and replace it with the 2.6 folder that you get from unzipping this archive? Then start MyEclipse and see if you get past the problem stage. If not, please be sure to send us your workspace error log after this step.
malinivijayaramanParticipantBrian, I’m not able to access the archive. Also, I don’t have maven installed in my machine, I can run the project only through myEclipse. Have attached the log file for reference.
-
This reply was modified 3 years ago by
malinivijayaraman.
Attachments:
You must be logged in to view attached files. -
This reply was modified 3 years, 1 month ago by
-
AuthorPosts