具有默认值artifactID的Maven原型属性

ras*_*cio 10 maven maven-archetype

我想创建一个使用参数创建的原型...坚果我不知道这是否是一个以这种方式制作的参数:

<requiredProperties>
    <requiredProperty key="appName">
        <defaultValue>${artifactId}</defaultValue>
    </requiredProperty>
</requiredProperties>
Run Code Online (Sandbox Code Playgroud)

这对我不起作用......我在集成测试中失败了

[INFO] --- maven-archetype-plugin:2.0:integration-test (default-integration-test) @webapp-archetype ---
[ERROR] Archetype test.archetype:webapp-archetype:1.0-SNAPSHOT is not configured
    Property appName is missing.
org.apache.maven.archetype.exception.ArchetypeNotConfigured: Archetype test.archetype:webapp-archetype:1.0-SNAPSHOT is not configured
    Property appName is missing.

小智 20

编辑test/resources/projects/basic/archetype.properties并添加appName=artifactID.