Failed to download packages from Maven repository for Maven project in the IntelliJ - maven

I've tried to download package in pom.xml file in the Maven but it is always failed to download.
Got the error message:
Could not transfer artifact org.sonatype.oss:oss-parent:pom:5 from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/org/sonatype/oss/oss-parent/5/oss-parent-5.pom
I've tried to check the issue, go to the: File > Settings > Build, Execution, Deployment > Build Tools >Maven >Repositories
URL: https://repo.maven.apache.org.maven2
Type: Remote
Updated: Error
I am not sure if the issue in the Repositories causes issue that can't download package from maven.
Could you show me to fix it?
I'm using IntelliJ Idea 2021.1.1, created maven project.

Related

Failed to collect dependencies at com.marklogic-datahub-jar:4.3.1

Failed to read artifact descriptor for com.marklogic:marklogic-data-hub:jar:4.3.1: Could not transfer artifact com.fasterxml.jackson:jackson-bom:pom:2.9.7 from/to jcenter (http://jcenter.bintray.com)
I am trying to build a project on STS and while doing the Maven build, I am receiving the same error.
Tried to update with forced snapshots and clean install. Had no luck resolving the issue.

Git runner - problem to download dependency

I have one project that uses the git runner.
The command mvn package works fine on local, all dependencies are downloaded from my local nexus.
When I execute build command at the git runner environment, all dependencies from my local nexus where downloaded without problem too, but only one dependency is a problem, lets see:
[ERROR] Failed to execute goal on project sic: Could not resolve dependencies for project com.example:sic:jar:0.0.1-SNAPSHOT: Failed to collect dependencies at br.com.sspds:ojdbc6:jar:1.0.1: Failed to read artifact descriptor for br.com.sspds:ojdbc6:jar:1.0.1: Could not transfer artifact br.com.sspds:ojdbc6:pom:1.0.1 from/to Nexus (http://172.25.100.75:8090/repository/maven-public/): Transfer failed for http://172.25.100.75:8090/repository/maven-public/br/com/sspds/ojdbc6/1.0.1/ojdbc6-1.0.1.pom: No route to host (Host unreachable)
One big detail: the library ojdbc6-1.0.1.jar was developed by our team and made available manually on our nexus server.
My configuration from nexus server is into my pom.xml.
Any idea about this problem?

Failed to collect dependencies maven

getting this error when trying to maven install
Failed to execute goal
org.apache.maven.plugins:maven-jar-plugin:3.1.2:jar (default-jar) on
project AbacusLibraryServer: Execution default-jar of goal
org.apache.maven.plugins:maven-jar-plugin:3.1.2:jar failed: Plugin
org.apache.maven.plugins:maven-jar-plugin:3.1.2 or one of its
dependencies could not be resolved: Failed to collect dependencies at
org.apache.maven.plugins:maven-jar-plugin:jar:3.1.2 ->
org.apache.maven.shared:file-management:jar:3.0.0: Failed to read
artifact descriptor for
org.apache.maven.shared:file-management:jar:3.0.0: Could not transfer
artifact org.apache.maven.shared:file-management:pom:3.0.0 from/to
central (https://repo.maven.apache.org/maven2): Transfer failed for
https://repo.maven.apache.org/maven2/org/apache/maven/shared/file-management/3.0.0/file-management-3.0.0.pom:
Received fatal alert: protocol_version -> [Help 1]
i can see a lot of .lastUpdated files in maven.
tried using maven clean and then maven install.
i tried deleting all these files and doing maven force update using eclipse not working.
what is working is downloading every jar file one by one from maven repository already done for around 20 but there are still more and no idea how much isn't there a easier way.
also not using any proxy tried using mobile network and personal wifi.

Maven build error on maven install

I imported a maven project onto my eclipse. I clicked on Run As->Maven Install. But I got the following build error. Please help
plugin org.apache.maven.plugins:maven-jar-plugin:2.3.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-jar-plugin:jar 2.3.2:Could not transfer artifact org.apache.maven.plugins:maven-jar-plugin:pom: 2.3.2 from/to central(http://repo1.maven.org/maven2):Error transferring file: repo1.maven.org: Unknown host repo1.maven.org
I checked /m2/repository. But could not find anything related.
Somehow it is not able to download the required artifacts from the Maven Central repo.
A suggestion please check your network connectivity, are you behind any firewall or try to change your proxysettings.
Otherwise in the worst case try to download required artifacts manually and put them in .m2/repository (as per ur local system) and try to install again.
http://search.maven.org/#browse|672389075
It should work.
Thanks

Maven - unable to download dependencies behind Proxy Error Code - 307 Temporary Redirect

I am using Maven to run a Java project. My issue is that I am not able to download the dependencies. It is giving the following error
[ERROR] Plugin org.apache.maven.plugins:maven-surefire-plugin:2.7.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-surefire-plugin:jar:2.7.1: Could not transfer artifact org.apache.maven.plugins:maven-surefire-plugin:pom:2.7.1 from/to central (http://repo1.maven.org/maven2): Failed to transfer http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.7.1/maven-surefire-plugin-2.7.1.pom. Error code 307, Temporary Redirect -> [Help 1]
The settings.xml is properly configured with the proxy details (since I am behind a proxy) Still, I am not able to access the maven repo to download.
UPDATE: Thanks a lot landal79.I revisited this issue after some time. Still this issue gives me a nightmare.
Currently, I am not able to create any Maven Project. I am 100% sure this is due to a proxy issue. But not able to
nail it down to where exactly the issue.
When I try creating a project selecting an archetype, I am not able to create a maven project. I am getting the below error
"Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE from any of the configured repositories.
Could not resolve artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:RELEASE
Failed to resolve version for org.apache.maven.archetypes:maven-archetype-
quickstart:pom:RELEASE: Could not find metadata org.apache.maven.archetypes:maven-archetype-quickstart/maven-metadata.xml in local (C:\Users\rrr.m2\repository)
Failed to resolve version for org.apache.maven.archetypes:maven-archetype-quickstart:pom:RELEASE: Could not find metadata org.apache.maven.archetypes:maven-archetype-quickstart/maven-metadata.xml in local (C:\Users\rrr.m2\repository)"
I try creating this project through Eclipse. The settings.xml point to the right proxy ( cross checked with the Network connections dialog (window ->General->NetworkConenction Dialog). But the issue still persists.
So what I did was installed standalone Maven and create a maven project from command prompt. To my surprise,I am not able to download the archetypes in Maven Repo though other plugins are getting downloaded (Surefire plugin and JUNit jar for example)
Is there any work around to resolve the archetype download issue?
I tried your solution, but the issue still persists. When I create a simple maven project (without using any archetypes) I am getting "Unable to build Project " Error
PS: The proxy settings are defined in settings.xml and they are correct. Also, the eclipse proxy settings are correct (Since I am able to install plugins from Eclipse MarketPlace)
Eclipse experts - please help me resolve this issue. Thanks a lot in advance for help.
Thanks

Resources