Update interval of Maven Central Repo - maven

Having zero experience with Maven, I am running a mvn clean install on a project and this is the error I get:
[ERROR] Failed to execute goal on project dnasequencing.CompaNY.com: Could not resolve dependencies for project com.CompaNY.dnasequencing:dnasequencing.
CompaNY.com:war:1.0-SNAPSHOT: The following artifacts could not be resolved: dsr-kepler:dsr-kepler:jar:0.0.1-SNAPSHOT, dsr-parser:dsr-parser:jar:0.0.1-
SNAPSHOT: Failure to find dsr-kepler:dsr-kepler:jar:0.0.1-SNAPSHOT in http://repo1.maven.org/maven2/ was cached in the local repository, resolution
will not be reattempted until the update interval of Maven_Central_Repo has elapsed or updates are forced -> [Help 1]
Based on these error messages, what is an startingpoint I should take a look for finding what is going wrong?

You can force Maven to update snapshots with the -U flag.
As far as what is going wrong, you can always check out the actual Maven website with your browser and see if the dependency actually exists.
http://search.maven.org/
If the dependency is not hosted in Maven central, then it seems it is a local dependency that you have to install in your local cache (run mvn clean install from that project).

Related

Jenkins build failed, artifactory issue

I am running a Jenkins build and its failing with the below error:
[ERROR] Plugin org.springframework.boot:spring-boot-maven-plugin:2.2.4.RELEASE or one of its
dependencies could not be resolved: Failed to read artifact descriptor for
org.springframework.boot:spring-boot-maven-plugin:jar:2.2.4.RELEASE: Failure to find
org.springframework.boot:spring-boot-maven-plugin:pom:2.2.4.RELEASE in
https://artifactory.abccompany.com:443/artifactory/java was cached in the local repository,
resolution will not be reattempted until the update interval of central has elapsed or updates are forced
I have checked the socket Timeout for repository in the advanced tab, I changed it to 60 secs but still build is failing.
What could be the issue and how to have it resolved?
Any help would be greatly appreciated.
Thank you
You are probably missing some dependencies.
Locate the dependencies you're missing with mvn dependency:tree, then install them manually, and build your project offline once.

Could not find artifact org.wildfly.core:wildfly-coer-parent:pom:myVersion in jboss-public-repository-group

I am using Maven for my project. I have a parent project myProjectA and when I do mvn clean install it builds successfully. myProjectA has multiple children, one of which is "childA1". This childA1 calls a plugin childB1 from myProjectB.
The problem is that when I try to do mvn clean install on childA1 then it fails with error:
Plugin my-maven-plugin:0.1-SNAPSHOT or one of its dependencies could not be resolved: Failed to read artifact descriptor for my-maven-plugin:jar:0.1-SNAPSHOT: Failure to find org.wildfly.core:wildfly-core-parent:pom:myVersion in http://repository.jboss.org/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of jboss-public-repository-group has elapsed or updates are forced
I understand from the error that the dependency org.wildfly.core in my-maven-plugin is not found. This dependency does not appear explicitly in the pom of childA1 or childB1. So to try to solve my problem I added the dependency to childB1 and did mvn clean install on childB1, the dependency was resolved and build was successful. While doing this I saw that the dependency was in fact downloaded from http://mynexus/nexus/content/groups/public and not the jboss repository that childA1 tries to get it from.
I looked at the "effective pom" tab (in Eclipse) of childA1 and childB1 and there I saw that the correct repository, mynexus, was listed and not the jboss repository.
Other things I tried is running with -U and I made sure to build myProjectA before building childA1. Unfortunately this did not solve my problem. Any suggestions how to fix it are welcome.

Building Valkyrie RCP

I'm trying to build Valkyrie RCP from the 1.2 release. According to their instructions, it should be easy: "Just clone the repository, and then use a mvn install command."
However, when I try the command, I get the following error:
[ERROR] Failed to execute goal on project valkyrie-rcp-core: Could not
resolve dependencies for project dk.navicon:valkyrie-rcp-core:jar:1.2:
Failure to find com.l2fprod:l2fprod-common-all:jar:7.3 in
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 -> [Help 1]
I can see that l2fprod-common-all-7.3.jar is included in the dependencies folder but Maven seems to be unaware of that. How should I resolve this problem?
Actually, it's now possible to build it using Gradle, which doesn't have the dependency issues . Also, there's a dependencies folder with batch scripts to install the missing dependencies if you still wish to use Maven.
As of 2.0 Valkyrie RCP will use Gradle.
The problem is that the given version of that dependency does not exist in Maven Central only older versions.
They would probably suggest you do a mvn install first on the file in the dependencies folder, then.
Try go down in deps and do a
mvn install -DgroupId=com.l2fprod -DartifactId=l2fprod-common-all -Dversion=7.3 -Dpackaging=jar -Dfile=l2fprod-common-all-7.3.jar
That would get you past that point locally.
After that re-execute your project build with a -Uoption.
Long term is to find the artifact and include it in a repository that is searchable from your maven settings or project profile.

Jenkins could not resolve dependencies

I have a problem with jenkins version 1.500. i am trying to build a project with a dependency to another project of mine.
The error is:
[ERROR] Failed to execute goal on project projectname: Could not resolve dependencies for project projectname:jar:1.0.0: Failure to find reference-project:jar:1.0.0 in 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 -> [Help 1]
If I build this project via console and Maven, the whole projects build succeed.
I checked the dependency jar file in the repository, it is there at the right place.
Does Maven have a own repository or did I miss something?
But under the Jenkins system settings, I chose "Default(~/.m2/repository)" and I did not check the checkbox "use own repository" at the project settings. Any ideas?
UPDATE
I created a extra job for the dependency in jenkins and called the Maven goal install and then everything works fine. Before this step I installed the dependency via Console and mvn install.
Why is there a difference? (i tried the given solution with delete and reinstall, but this did not help)
Simple solution delete the folder from the ~/.m2/repository which represents the artifact you've written about. ~/.m2/repository/${groupId}/... and rebuild. That happens sometimes if you have some problems during download of the artifact etc.
I too have similar problem and tried deleting the folder in ~/.m2/repository/
still its now downloading dependencies from remote repository location to local

Strange Maven3 error

all, I get this error when building with maven (mvn clean install).
Can't find the description of the problem. maybe anybody encountered it, what does it mean and how to fix it? How to force the updates?
Failure to find org.springframework:spring:jar:3.0.0.RELEASE in http://download.java.net/maven/2/ was cached in
the local repository, resolution will not be reattempted until the update interval of Java.Net has elapsed or updates are forced -> [Help 1]
Not sure if this works for Maven 3, here's what would work for Maven 2. This should work to clean the local repository:
mvn dependency:purge-local-repository
Otherwise, try cleaning the specific artifact from your local repository:
* Linux: ~/.m2
* Windows: C:\Documents and Settings\USER\.m2

Resources