Maven build error Unavailable versions for org.codehaus.jackson: jackson-core-asl: jar: [1.8.1.9) within the specified range

I am getting the following error from this morning doing maven build. There are no specific changes for yesterday and today. Can someone help me resolve this? I tried to clear all local repositories by changing Jackson version to 1.9.10. Surprisingly, this works for my colleagues who are working on the same assembly.

[ERROR] Failed to execute goal on project netvogue-database-api: Could not resolve dependencies for project org.netvogue.server:netvogue-database-api:jar:1.0-SNAPSHOT: Failed to collect dependencies for [org.springframework.data:spring-data-neo4j-rest:jar:2.1.0.RC4 (compile), org.codehaus.jackson:jackson-jaxrs:jar:1.8.3 (compile), org.codehaus.jackson:jackson-mapper-asl:jar:1.8.3 (compile), org.neo4j:neo4j-kernel:jar:tests:1.8.RC1 (test), org.neo4j:neo4j-cypher:jar:1.8.RC1 (compile), com.amazonaws:aws-java-sdk:jar:1.3.10 (compile), org.imgscalr:imgscalr-lib:jar:4.2 (compile), org.springframework:spring-context:jar:3.1.2.RELEASE (compile), org.springframework.security:spring-security-config:jar:3.1.2.RELEASE (compile), org.springframework.security:spring-security-web:jar:3.1.2.RELEASE (compile), org.slf4j:slf4j-api:jar:1.5.10 (compile), org.slf4j:jcl-over-slf4j:jar:1.5.10 (runtime), org.slf4j:slf4j-log4j12:jar:1.5.10 (runtime), log4j:log4j:jar:1.2.16 (compile), junit:junit:jar:4.7 (test)]: No versions available for org.codehaus.jackson:jackson-core-asl:jar:[1.8,1.9) within specified range -> [Help 1] 
+10
jackson maven-3 maven-metadata
Sep 29 '12 at 10:31
source share
4 answers

As pointed out by yegor256, someone who has recently encountered this problem is probably caused by Amazon AWS. Just change your aws-java-sdk to a newer version (current - 1.3.20) and the problem will disappear.

+6
01 Oct
source share

It looks like the Jackson jackson-core-asl maven-metadata.xml file is corrupt.

When Maven tries to resolve dependency versions from a range, it should look in the maven-metadata.xml file to determine the version candidates that it can select. Currently this file looks like this:

 <metadata modelVersion="1.1.0"> <groupId>org.codehaus.jackson</groupId> <artifactId>jackson-core-asl</artifactId> <versioning> <latest>1.1.0</latest> <release>1.1.0</release> <versions> <version>1.1.0</version> </versions> <lastUpdated>20120928142709</lastUpdated> </versioning> </metadata> 

This means that the only legal version that the version range can choose is 1.1.0 . As an example of how this file most likely looked before checking the jackson-core-lgpl maven-metadata.xml file:

 <metadata> <groupId>org.codehaus.jackson</groupId> <artifactId>jackson-core-lgpl</artifactId> <version>0.9.8</version> <versioning> <versions> <version>0.9.8</version> <version>0.9.7</version> <version>0.9.9</version> <version>0.9.9-2</version> <version>0.9.9-3</version> <version>0.9.9-4</version> <version>0.9.9-5</version> <version>0.9.9-6</version> <version>1.0.0</version> ... 

As suggested earlier, you can hard code the dependency on a specific Jackson version, which shortens the version resolution and avoids reading the maven-metadata.xml file.

+10
Oct 01
source share

I must indicate that the latest version of this file (maven-metadata.xml) must be incorrect. The latest version for org.codehaus.jackson / jackson-core-asl is 1.9.9.

Other dependencies requiring other versions of jackson-core-asl newer than 1.1.0 to break. As in my scenario. I had to manually modify the maven-metadata.xml ok jackson-core-asl file to make it work.

+2
01 Oct
source share

Maven cannot find dependency for jackson-core-asl, you need to include the following in your POM

 <dependency> <groupId>org.codehaus.jackson</groupId> <artifactId>jackson-core-asl</artifactId> <version>1.9.0</version> </dependency> 

If it is already on, you may need to specify a repository. Check out the maven repository

+1
Sep 29 '12 at 10:36
source share



All Articles