Maven will only load pom, it will not load the jar

I am new to maven and I have what I'm sure is a configuration issue. I have my master and child. Inside jar pom, I declared this dependency:

<dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.4</version> </dependency> 

However, when I look in the $HOME/.m2/repository directory, there is only a pom file. There is no jar file. Most other dependencies have jar files, but not this one. Without this jar, the compilation stage is not performed.

Any ideas on what I'm doing wrong?

+4
source share
3 answers

Is it possible that you are behind a proxy / firewall, which prevents the download of jar files?

+2
source

Commons-lang 2.4 jar is on the Maven repository: http://repo1.maven.org/maven2/commons-lang/commons-lang/2.4/

There are several possibilities to solve your problem:

  • you can manually add the jar to your local repository using the target "mvn install: install-file" or directly by putting the jar in a good directory
  • you can delete the commons-lang directory in your repository, and lauch Maven again. Sometimes the Maven download fails, and the cluster of your local repository may solve the problem.
+1
source

A few things you can check:

I had the same problem when I used Maven 2, and when I upgraded to Maven 3, this problem disappeared.

+1
source

All Articles