具有默认值artifactID的Maven原型属性 [英] Maven archetype properties with default value artifactID

查看:190
本文介绍了具有默认值artifactID的Maven原型属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个使用要创建的参数的原型...坚果,我不知道这样创建的参数是否正确:

I want to make an archetype that use a parameter to be created...nut I don't know if is right a parameter made in this way:

<requiredProperties>
    <requiredProperty key="appName">
        <defaultValue>${artifactId}</defaultValue>
    </requiredProperty>
</requiredProperties>

它对我不起作用...集成测试失败

It's not working for me...i've a failure on the integration-test


[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.

推荐答案

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

这篇关于具有默认值artifactID的Maven原型属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆