Question

I'm trying to build a large project and failing with the following error:

[INFO] ------------------------------------------------------------------------
[INFO] Building Utilities
[INFO]    task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] [resources:resources]
[WARNING] Using platform encoding (Cp1255 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 16 resources
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

Couldn't find a version in [2.2.2] to match range [2.1_3,2.1_3]
  cglib:cglib-nodep:jar:null

from the specified remote repositories:
  java.net (http://download.java.net/maven/2),
  internal (http://repo.some-project.org/maven),
  central (http://repo1.maven.org/maven2)

Path to dependency:
        1) org.some-project:util:jar:1.5.0

I found and downloaded cglib-nodep-2.1_3.jar
As I lack experience with maven, I'm not sure how to (hrr...) make the build process use this file instead of failing on (I guess) fetching it from the internet.

Was it helpful?

Solution 3

cglib version 2.1_3 has been removed from the main maven repo in favor of 2.2.2
Try updating your dependency to 2.2.2 - who knows, perhaps it'll work :)
If it doesn't, download 2.1_3 (from here for example) and manually install it locally.

OTHER TIPS

It is working if you put in the dependencyManagement section, instead of putting it in the dependencies section.

<dependencyManagement>
   <dependencies>
      <dependency>     
        <groupId>cglib</groupId>     
        <artifactId>cglib-nodep</artifactId>     
        <version>2.1_2</version> 
      </dependency>     
   </dependencies>
</dependencyManagement>

All the versions are working. I was getting the same error when I had put it in the dependencies section instead of dependencyManagement section. You need not do it manually.

In your pom.xml under the dependencyManagement section add:

<project>
 ...
 <dependencyManagement>
  <dependencies>
  ...
   <dependency>
    <groupId>cglib</groupId>
    <artifactId>cglib-nodep</artifactId>
    <version>2.1_3</version>
    </dependency>
  ....
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top