Maven 2 正确且最新的ehcache maven存储库在哪里
我一直在努力在我的环境中获得ehcache 2.1.0。只要我认为我做对了,它就不会下载。下面是我设置存储库的位置:Maven 2 正确且最新的ehcache maven存储库在哪里,maven-2,ehcache,sonatype,Maven 2,Ehcache,Sonatype,我一直在努力在我的环境中获得ehcache 2.1.0。只要我认为我做对了,它就不会下载。下面是我设置存储库的位置: <repository> <!--<url>https://oss.sonatype.org/content/repositories/releases/</url>--> <url>http://oss.sonatype.org/content/repositories/sourceforge-relea
<repository>
<!--<url>https://oss.sonatype.org/content/repositories/releases/</url>-->
<url>http://oss.sonatype.org/content/repositories/sourceforge-releases</url>
<id>sonatype-mirror</id>
<layout>default</layout>
<name>Repository for library including ehcache recent ones</name>
</repository>
http://oss.sonatype.org/content/repositories/sourceforge-releases
谐振式反射镜
违约
库的存储库,包括ehcache最近的库
我这样添加依赖项:
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache</artifactId>
<version>2.1.0</version>
</dependency>
net.sf.ehcache
ehcache
2.1.0
是否有任何我做得不对或不正确的地方?
net.sf.ehcache:ehcache:2.1.0
是类型pom
的依赖项,因此需要指定它:
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache</artifactId>
<version>2.1.0</version>
<type>pom</type>
</dependency>
net.sf.ehcache
maven中央存储库中提供了Ehcache,无需添加特定的存储库
然而,ehcache
工件是特殊的,它是一个类型为pom
的“聚合”工件。因此,应该像这样声明依赖关系:
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache</artifactId>
<version>2.1.0</version>
<type>pom</type>
</dependency>
net.sf.ehcache
对于net.sf.ehcache:ehcache:2.8.1