Reputation: 51
I am using Maven version 2.2.1 and Artifactory 3.5.2.1.Jenkins build fails with error:
[INFO] Failed to resolve artifact.
No versions are present in the repository for the artifact with a range [1.4,)
commons-beanutils:commons-beanutils:jar:null
from the specified remote repositories:
central (http://myartifactory.com/PROJECT_REPO-virtual),
snapshots (http://myartifactory.com/PROJECT_REPO-virtual)
Path to dependency:
1) org.codehaus.mojo:jasperreports-maven-plugin:maven-plugin:1.0-beta-2
2) jasperreports:jasperreports:jar:1.2.0
I have added the project's nexus repository as remote repository in Artifactory but still build fails with above error. The same build is successful if i add the project's nexus repository in the pom file.
Any suggestions are appreciated.
Upvotes: 2
Views: 1768
Reputation: 32639
Version ranges don't work very well under Maven 2.x
. You should consider upgrading to Maven 3.3.x, or defining a concrete version for your dependency. Allowing silent upgrades to third-party dependencies without your approval can be dangerous and at the very least impact your build's stability.
Upvotes: 1