Java Maven Central的ehcache依赖项存在问题
我正在尝试在一台新笔记本电脑上构建一个项目,该笔记本电脑的.m2/repository目录为空。我得到以下错误:Java Maven Central的ehcache依赖项存在问题,java,maven,ehcache,Java,Maven,Ehcache,我正在尝试在一台新笔记本电脑上构建一个项目,该笔记本电脑的.m2/repository目录为空。我得到以下错误: BUILD FAILED /home/awills/Dropbox/Jasig/portal/uPortal/build.xml:635: The following error occurred while executing this line: /home/awills/Dropbox/Jasig/portal/uPortal/build.xml:1437: The follo
BUILD FAILED
/home/awills/Dropbox/Jasig/portal/uPortal/build.xml:635: The following error occurred while executing this line:
/home/awills/Dropbox/Jasig/portal/uPortal/build.xml:1437: The following error occurred while executing this line:
/home/awills/Dropbox/Jasig/portal/uPortal/build.xml:1372: The following error occurred while executing this line:
/home/awills/Dropbox/Jasig/portal/uPortal/build.xml:1315: The following error occurred while executing this line:
/home/awills/Dropbox/Jasig/portal/uPortal/build.xml:1318: The following error occurred while executing this line:
/home/awills/Dropbox/Jasig/portal/uPortal/build.xml:1375: The following error occurred while executing this line:
/home/awills/Dropbox/Jasig/portal/uPortal/build.xml:1227: Unable to resolve artifact: Unable to get dependency information: Unable to read the metadata file for artifact 'net.sf.ehcache:ehcache-web:jar': Cannot find parent: net.sf.ehcache:ehcache-web-parent for project: null:ehcache-web:jar:null for project null:ehcache-web:jar:null
net.sf.ehcache:ehcache-web:jar:2.0.4
from the specified remote repositories:
central (http://repo1.maven.org/maven2),
sonatype-nexus-snapshots (https://oss.sonatype.org/content/repositories/snapshots),
apache-snapshots (http://repository.apache.org/snapshots)
Path to dependency:
1) org.jasig.portal:uportal-war:war:4.1.0-SNAPSHOT
2) org.jasig.resourceserver:resource-server-utils:jar:1.0.38
该项目已经成熟,这种依赖关系最近没有改变。该构建最近正在运行
我不理解project:null:ehcache web:jar:null的部分——它从哪里得到null
net.sf.ehcache:ehcache web:2.0.4 pom的开头如下
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache-web-parent</artifactId>
<version>2.0.4</version>
</parent>
<name>Ehcache Web Filters</name>
<artifactId>ehcache-web</artifactId>
<packaging>jar</packaging>
<description><![CDATA[Web caching filters.]]> </description>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://ehcache.org/license.html</url>
</license>
</licenses>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<properties>
<forgeTags>Integration Module</forgeTags>
<Bundle-RequiredExecutionEnvironment>J2SE-1.5</Bundle-RequiredExecutionEnvironment>
</properties>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache-parent</artifactId>
<version>2.3</version>
</parent>
<name>Ehcache Web Filters Parent</name>
<artifactId>ehcache-web-parent</artifactId>
<packaging>pom</packaging>
<version>2.0.4</version>
<description>parent pom for web module</description>
4.0.0
net.sf.ehcache
ehcache web父对象
2.0.4
Ehcache网络过滤器
ehcache网络
罐子
Apache软件许可证,版本2.0
http://ehcache.org/license.html
而net.sf.ehcache:ehcache-web-parent:2.0.4 pom的开头如下
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache-web-parent</artifactId>
<version>2.0.4</version>
</parent>
<name>Ehcache Web Filters</name>
<artifactId>ehcache-web</artifactId>
<packaging>jar</packaging>
<description><![CDATA[Web caching filters.]]> </description>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://ehcache.org/license.html</url>
</license>
</licenses>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<properties>
<forgeTags>Integration Module</forgeTags>
<Bundle-RequiredExecutionEnvironment>J2SE-1.5</Bundle-RequiredExecutionEnvironment>
</properties>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache-parent</artifactId>
<version>2.3</version>
</parent>
<name>Ehcache Web Filters Parent</name>
<artifactId>ehcache-web-parent</artifactId>
<packaging>pom</packaging>
<version>2.0.4</version>
<description>parent pom for web module</description>
集成模块
J2SE-1.5
4.0.0
net.sf.ehcache
ehcache父级
2.3
Ehcache Web筛选器父级
ehcache web父对象
聚甲醛
2.0.4
web模块的父pom
似乎当存在父pom,并且在子pom中定义了存储库(在本例中为ehcache web)时,maven仅尝试从子pom中定义的存储库中查找父依赖项,而根本不在maven central中查找
在ehcache web pom中,您有:
<repositories>
<repository>
<id>sourceforge-snapshots</id>
<name>Sourceforge Snapshot Repository</name>
<url>http://oss.sonatype.org/content/repositories/sourceforge-snapshots</url>
</repository>
</repositories>
sourceforge快照
Sourceforge快照存储库
http://oss.sonatype.org/content/repositories/sourceforge-snapshots
但由于父级不再是快照,并且已移动到maven central,因此找不到它。我通过简单地从本地pom文件(~/.m2/repository/net/sf/ehcache/ehcache-web/2.0.4/ehcache-web-2.0.4.pom)中删除repositories元素来解决这个问题
我还必须删除存储的ehcache web父pom文件,这只是一个重定向
我在网上发现有关这方面的信息少得出奇,但也许这些信息会有所帮助: