m2eclipse:多模块和父构建异常

时间:2011-10-17 09:38:10

标签: maven maven-2 build dependencies m2eclipse

我是m2eclipse的新手,我创建了一个虚拟java项目(mytest4)并检查了enable dependency management,之后,该插件创建了一个pom.xml文件。我手动将parent信息(例如groupIdartifactIdversion等添加到虚拟项目中。然后我将模块添加到父项目,而父projectTypepom而不是jar。但是,当我使用clean install构建时,出现错误:

[DEBUG] Extension realms for project com.multimod:myproject:pom:0.0.1-SNAPSHOT: (none)
[DEBUG] Looking up lifecyle mappings for packaging pom from ClassRealm[plexus.core, parent: null]
[ERROR] The build could not read 1 project -> 
    [Help 1]org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
    [ERROR] Child module C:\workspace\myproject\mytest4 of C:\workspace\myproject\pom.xml does not exist @ 

[ERROR] The project com.multimod:myproject:0.0.1-SNAPSHOT(C:\workspace\myproject\pom.xml) has 1 error
[ERROR] Child module C:\workspace\myproject\mytest4 of C:\workspace\myproject\pom.xml does not exist

我不明白C:\workspance\myproject\pom.xml不存在。

你可以提一些提示吗? 谢谢。

1 个答案:

答案 0 :(得分:0)

您可能必须在mytest4 pom文件中设置父pom文件的相对路径。默认值为../pom.xml,因此您的路径为C:\workspace\myproject\pom.xml

关于评论中的子问题。右键单击项目,然后选择Configure > Convert to Maven Project