我有一个具有以下结构的项目:
project (pom)
project-client (module, jar)
project-ejb (module, jar)
project-web (module, war)
project-ear (module, ear)
在 pom 中,模块使用以下方法引用父级:
<relativePath>../project</relativePath>
Run Code Online (Sandbox Code Playgroud)
并且根 pom 以相同的方式引用模块(使用 ../)。
我可以使用 archetype:create-from-project 创建原型,并且一切运行顺利。
但是当我尝试安装原型(mvn install 在 target/generated-sources/archetype 目录中)时,出现错误:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:integration-test (default-integration-test) on project seguranca-archetype:
[ERROR] Archetype IT 'basic' failed: org.apache.maven.archetype.exception.ArchetypeGenerationFailure: Error merging velocity templates: Unable to find resource 'archetype-resources/../__rootArtifactId__-client/pom.xml'
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:integration-test (default-integration-test) on project seguranca-archetype:
Archetype IT 'basic' failed: org.apache.maven.archetype.exception.ArchetypeGenerationFailure: Error merging velocity templates: Unable …Run Code Online (Sandbox Code Playgroud)