I am new to Maven and am trying to set up one of my first POM
s. My application will cache using EhCache. Going to Maven Central Repo (link here) I copy-n-pasted the <dependency>
tag and copy it into my pom.xml
like so:
...many dependencies above this point
<dependency>
<scope>compile</scope>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.0.1.Final</version>
</dependency>
<dependency>
<scope>compile</scope>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache</artifactId>
<version>2.5.0</version>
</dependency>
<dependency>
<scope>compile</scope>
<groupId>jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>3.5.3</version>
</dependency>
...many dependencies below this point
When I save the changes, Eclipse builds the workspace and gives me an error on the opening <dependency>
tag for EhCache 2.5:
Missing artifact net.sf.ehcache:ehcache:jar:2.5.0
So I figured that perhaps v.2.5.0 has something wrong with it, and repeated the same for 2.4.7
(the last 2.4.x
release before 2.5.0
). Same deal.
Since I'm so new to Maven, I don't even know where to begin looking. I tried Project >> Clean
and even restarted Eclipse to see if it was just a typical Eclipse "quirk". Nope.
I am thinking:
- Could EhCache be publishing bad JARs to the Maven repo?
- Could Maven Repo have something wrong with it?
- Could this be due to something else configured wrong in my
pom.xml
? - Could this be a "JAR hell" issue where I have a conflict somewhere on my dependency graph?
How would SO start tackling this problem? Thanks in advance!