I am importing spring boot project after generating the zip file from spring.start.io -
spring.start.io
Complete project is not getting imported .It is giving errors in pom.xml like
Failure to transfer com.fasterxml.jackson:jackson-bom:pom:2.10.4 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 com.fasterxml.jackson:jackson-bom:pom:2.10.4 from/to central (http://repo.maven.apache.org/maven2): Failed to transfer http://repo.maven.apache.org/maven2/com/fasterxml/jackson/jackson-bom/2.10.4/jackson-bom-2.10.4.pom. Error code 501, HTTPS Required
It is imported as-
How it is imported
Where is the problem?
Could you try to add -U as argument of your mvn command to force the update of depedencies cached in your repository ? ex :
mvn -U clean install
You also have a warning about https that is required by maven central so set https in sour maven settings.xml
like :
<settings>
<mirrors>
<mirror>
<id>internal-repository</id>
<name>Maven Repository Manager running on https://repo1.maven.org/maven2</name>
<url>https://repo1.maven.org/maven2/</url>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>
</settings>
You also have an error about https as http is no longer supported on maven repository. You have to set http://insecure.repo1.maven.org/maven2/ if you really have no choice to use insecure http. It's well documented :
https://support.sonatype.com/hc/en-us/articles/360041287334-Central-501-HTTPS-Required
Best regards.
Related
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 took a new laptop and setting my environment.
the code that builds fine on a different machine is failing with the following error:
Failed to collect dependencies at javax.enterprise:cdi-api:jar:2.0:
Failed to read artifact descriptor for
javax.enterprise:cdi-api:jar:2.0: Could not transfer artifact
javax.enterprise:cdi-api:pom:2.0 from/to
maven2-repository.dev.java.net (http://download.java.net/maven/2/):
download.java.net: Unknown host download.java.net -> [Help 1]
this is happening intermittently. What is wrong ? any solution please ?
Maven repository is resolving to 404 (for me too currently). It is oracle's problem. I suggest you can use multiple repositories including central nexus to avoid having single point of failure.
Ideally your organization should have one proxy repository which acts as your org level cache for public artifacts and could also act as internal repository for private artifacts.
Add these to your pom.xml and retry
<repositories>
<repository>
<id>central</id>
<url>https://repo.maven.apache.org/maven2/</url>
</repository>
</repositories>
This error happened to me when I was behind a corporate firewall.
You could try setting up a proxy server in maven settings in .m2 folder.
Also see If you can download the file directly from the maven repository website at that moment. Mostly you cannot download due to some network issue you are facing.
Maven settings will not change intermittently.
I installed maven 3.3.3 and the install was successful.
However, while trying to create a maven project in eclipse I am getting the below error
'Creating maven-archtype-quickstart' has encountered a problem
Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart:1.1 from any of the configured repositories.
Could not resolve artifact org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1
Failure to transfer org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 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.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from/to central (https://repo.maven.apache.org/maven2): Connection refused: connect
Failure to transfer org.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 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.apache.maven.archetypes:maven-archetype-quickstart:pom:1.1 from/to central (https://repo.maven.apache.org/maven2): Connection refused: connect
I've added proxy details to my settings.xml (got it from my browser) with/without username password
<proxies>
<proxy>
<id>462603</id>
<active>true</active>
<protocol>http</protocol>
<username>com\462603</username>
<password>xxxxxxxx</password>
<host>proxy.company.com</host>
<port>6050</port>
<nonProxyHosts>10.*|*.company.com</nonProxyHosts>
</proxy>
</proxies>
I listed this settings.xml in Eclipse->Windows->Preferences->Maven->User Settings
Also added the archtype http://repo1.maven.org/maven2/archetype-catalog.xml in Eclipse->Windows->Preferences->Maven->Archtype
Apart from all this the error still persists
I am aware there are many such duplicate question, but the solutions mentioned in all of it didn't work
Keep Connected to internet,
Step 1:- Delete .m2 folder
Step 2:- Open Eclipse click on Window->Preferences
Step 3:- Pop-Up will display , Click Maven-> Archetype
Step 4:- Click on "add remote catalog"
Step 5:- Enter the deatil
CATALOG FILE = https://repo1.maven.org/maven2/archetype-catalog.xml
DESCRIPTION = maven_catalog
Step 6:- Click on Verify , After the verification hit Ok .
I am very new to maven,I integrated maven in eclipse and when I am trying convert my existing
project into maven I am getting following error:
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 org.apache.maven.plugins:maven-surefire-
plugin:pom:2.12.4 from/to central (http://repo.maven.apache.org/maven2): repo.maven.apache.org
I have no idea what is this? please guide me.
Your dependency on the maven-surefire-plugin could not be downloaded.
Verify that your maven is set up correctly (proxy is configured) and retry getting the dependencies using the maven -U command line parameter.
If the problem persists, try debugging the maven flow using the -X command line parameter.
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.