我有春季核心培训课程的示例项目。他们确实在他们的机器上工作,而不是在我的机器上。我不是maven的专家,但内部的.pom文件会出现此错误。我非常感谢任何类似猴子的指示,我先做,然后才能理解。非常感谢你提前。我只想运行它们并再次通过。
项目构建错误:不可解析的父POM:无法传输com.springsource.training.common:来自https://tbits.springsource.com/repository/snapshot的abstractWebProject:pom:1.1.7.RELEASE缓存在本地存储库中,解析不会重新尝试,直到com.springsource.training.snapshot的更新间隔已过,或强制更新。
原始错误:无法传输工件com.springsource.training.com:abstractWebProject:pom:1.1.7.RELEASE from / to com.springsource.training.snapshot(https://tbits.springsource.com/repository/快照):ConnectException和' parent.relativePath'指向错误的本地POM pom.xml / mvc-1-solution line 1 Maven问题
此外我错过了很多库的错误: 描述资源路径位置类型
Project 'mvc-1-solution' is missing required library: 'C:\Users\Blabla\.m2\repository\org\cloudfoundry\cloudfoundry-runtime\0.6.0-BUILD-SNAPSHOT\cloudfoundry-runtime-0.6.0-BUILD-SNAPSHOT.jar' mvc-1-solution Build path Build Path Problem
Project 'mvc-1-solution' is missing required library: 'C:\Users\Blabla\.m2\repository\org\hibernate\hibernate-annotations\3.5.3-Final\hibernate-annotations-3.5.3-Final.jar' mvc-1-solution Build path Build Path Problem
Project 'mvc-1-solution' is missing required library: 'C:\Users\Blabla\.m2\repository\org\hibernate\hibernate-core\3.5.3-Final\hibernate-core-3.5.3-Final.jar' mvc-1-solution Build path Build Path Problem
等等。
他们的.pom文件。
<?xml version="1.0" encoding="UTF-8"?>
<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>
<groupId>com.springsource.training.module</groupId>
<artifactId>mvc-1-solution</artifactId>
<packaging>war</packaging>
<version>3.2.1.RELEASE</version>
<parent>
<groupId>com.springsource.training.common</groupId>
<artifactId>abstractWebProject</artifactId>
<version>1.1.7.RELEASE</version>
</parent>
<repositories>
<repository>
<id>com.springsource.training.snapshot</id>
<name>SpringSource Training Repository - Snapshots</name>
<url>https://tbits.springsource.com/repository/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>com.springsource.training.release</id>
<name>SpringSource Training Repository - Releases</name>
<url>https://tbits.springsource.com/repository/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>org.springframework.maven.milestone</id>
<name>Spring Maven Milestone Repository</name>
<url>http://maven.springframework.org/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>springsource-snapshot</id>
<url>http://s3.amazonaws.com/private.maven.springsource.com/snapshot/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<!-- DBCP -->
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.3</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
<exclusion>
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
</exclusion>
<exclusion>
<groupId>xerces</groupId>
<artifactId>xerces</artifactId>
</exclusion>
<exclusion>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
</exclusion>
<exclusion>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
<version>1.5.4</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- CloudFoundry -->
<dependency>
<groupId>org.cloudfoundry</groupId>
<artifactId>cloudfoundry-runtime</artifactId>
<version>0.6.0-BUILD-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
答案 0 :(得分:1)
不是解决方案,而是如何解决问题的方法:
abstractWebProject
将包含在其中一些中。因此错误Project build error: Non-resolvable parent POM: Failure to transfer
就是这样的结果。settings.xml
settings.xml
中的文件.m2
(取决于您在不同位置的操作系统)。希望你能得到解决它所需要的帮助。
答案 1 :(得分:0)
“..在com.springsource.training.snapshot的更新间隔过去或强制更新之前,不会重新尝试解析。” - 这是由于第一次尝试下载工件失败,需要从存储库中删除那些* .lastUpdated。
对于Windows:
cd%userprofile%。m2 \ repository for / r%i in(* .lastUpdated)do del%i