我是m2eclipse的新手,我创建了一个虚拟java项目(mytest4)并检查了enable dependency management
,之后,该插件创建了一个pom.xml文件。我手动将parent
信息(例如groupId
,artifactId
和version
等添加到虚拟项目中。然后我将模块添加到父项目,而父projectType
为pom
而不是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
不存在。
答案 0 :(得分:0)
您可能必须在mytest4 pom文件中设置父pom文件的相对路径。默认值为../pom.xml
,因此您的路径为C:\workspace\myproject\pom.xml
。
关于评论中的子问题。右键单击项目,然后选择Configure > Convert to Maven Project