2013-07-12 58 views
2

发生以下问题:一旦我打开Eclipe,所有的过程都用红色X签名。打开projet树,节点中没有错误签名。 Nothig向我展示了造成错误的原因。我无法建立这些项目。最后,我为Eclipse创建了一个新的工作区,从SVN中检出项目,并将它们导入为Maven项目。 (有两个主要和几个子项目。) Ther仍然是两个显示红色X的项目,但没有显示导致错误的原因。我试图刷新,在Eclipse中清理。我无法建立其他项目也没有错误,当然也不是那些有错误的项目。该错误消息是例如: -Maven错误和构建faliure

[WARNING] Some problems were encountered while building the effective model for hu.bz.ikti.insurance:SAMCommon:jar:0.0.1-SNAPSHOT 
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ hu.bz.ikti.insurance:InSurance:0.0.1-SNAPSHOT, C:\Dev\workspace\InSurance\pom.xml, line 27, column 12 
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. 
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects. 
[WARNING] 
[INFO]                   
[INFO] ------------------------------------------------------------------------ 
[INFO] Building SAM-függő közös osztályok 0.0.1-SNAPSHOT 
[INFO] ------------------------------------------------------------------------ 
[WARNING] The POM for hu.bz.ikti:common:jar:0.0.1-SNAPSHOT is missing, no dependency information available 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 1.110s 
[INFO] Finished at: Fri Jul 12 11:33:33 CEST 2013 
[INFO] Final Memory: 4M/114M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal on project SAMCommon: Could not resolve dependencies for project hu.bz.ikti.insurance:SAMCommon:jar:0.0.1-SNAPSHOT: Could not find artifact hu.bz.ikti:common:jar:0.0.1-SNAPSHOT -> [Help 1] 
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 
[ERROR] Re-run Maven using the -X switch to enable full debug logging. 

和消息的erroneus项目的部分是:

[ERROR] Failed to execute goal on project Service: Could not resolve dependencies for project hu.bz.ikti.insurance:Service:jar:0.0.1-SNAPSHOT: Failed to collect dependencies for [org.springframework:spring-context:jar:3.1.2.RELEASE (compile), org.springframework:spring-core:jar:3.1.2.RELEASE (compile), org.springframework:spring-beans:jar:3.1.2.RELEASE (compile), commons-dbcp:commons-dbcp:jar:1.4 (compile), postgresql:postgresql:jar:9.1-901-1.jdbc4 (compile), org.springframework:spring-tx:jar:3.1.2.RELEASE (compile), hu.bz.ikti.insurance:Model:jar:0.0.1-SNAPSHOT (compile), org.springframework:spring-orm:jar:3.1.2.RELEASE (compile), hu.bz.ikti:service-base:jar:0.0.1-SNAPSHOT (compile), org.springframework:spring-test:jar:3.1.2.RELEASE (compile), org.apache.maven.plugins:maven-compiler-plugin:jar:3.1 (compile)]: Failed to read artifact descriptor for hu.bz.ikti.insurance:Model:jar:0.0.1-SNAPSHOT: Could not transfer artifact hu.bz.ikti.insurance:Model:pom:0.0.1-SNAPSHOT from/to ikti (https://fcd3.ikti.hu/artifactory/ext-release-local): Failed to transfer https://fcd3.ikti.hu/artifactory/ext-release-local/hu/bz/ikti/insurance/Model/0.0.1-SNAPSHOT/Model-0.0.1-SNAPSHOT.pom. Error code 409, The repository 'ext-release-local' rejected the artifact 'ext-release-local:hu/bz/ikti/insurance/Model/0.0.1-SNAPSHOT/Model-0.0.1-SNAPSHOT.pom' due to its snapshot/release handling policy. -> [Help 1] 

任何人都可以帮我吗?

编辑:

是什么意思:

You are trying to deploy a snapshot version (Model-0.0.1-SNAPSHO‌​T.pom) into a releases-only repository ext-release-local ? Select a snapshot repository (e.g. ext-snapshot-local) instead of a release one.

我应该改变我的pom.xml?怎么样?我不明白它早些时候如何工作,但现在有这个编译问题。还有什么可以改变的?我没有改变任何意图。

编辑2

我也注意到,.m2目录文件夹下的settings.xml不存在。 Maven真的出了问题。

+0

该消息的重要部分是“错误代码409,存储库'ext-release-local'拒绝了该产品'ext-release-local:hu/bz/ikti/insurance/Model/0.0.1-SNAPSHOT/Model -0.0.1-SNAPSHOT.pom'由于其快照/发布处理策略。“检查远程回购(Nexus,Artifactory或其他)以找出问题所在。 – user944849

回答

3

正如@ user944849所提到的那样,409是重要的部分。 您正尝试将快照版本(Model-0.0.1-SNAPSHO‌​T.pom)部署到仅限发行版的存储库ext-release-local,因此存在冲突。 选择快照存储库(例如ext-snapshot-local)而不是发布版本。

+0

大家好, 我的问题已解决。 我们的资源库存在一些问题。我删除了对此的引用。之后,我能够编译所有项目。 – SzZ

1

我偶然发现了这个帖子有一个稍微不同的问题:我们试图神器artifact-1.2.1.jar部署到快照库,并得到这个错误:

org.artifactory.api.repo.exception.RepoRejectException: Cannot deploy file 
'artifact-1.2.1.jar'. The repository 'repo_snapshot' rejected the resolution 
of an artifact 'repo_snapshot:xxx/artifact/1.2.1/artifact-1.2.1.jar' due to 
conflict in the snapshot release handling policy. 

问题对我们来说是SNAPSHOT不是文件的一部分神器的名字,所以重命名为artifact-1.2.1-SNAPSHOT.jar解决了这个问题。