【问题标题】:Maven archetype properties with default value artifactID具有默认值 artifactID 的 Maven 原型属性
【发布时间】:2011-07-05 13:54:27
【问题描述】:

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

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

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

[信息] --- maven-archetype-plugin:2.0:integration-test (default-integration-test) @webapp-archetype --- [错误] 原型 test.archetype:webapp-archetype:1.0-SNAPSHOT 未配置 缺少属性 appName。 org.apache.maven.archetype.exception.ArchetypeNotConfigured:未配置原型 test.archetype:webapp-archetype:1.0-SNAPSHOT 缺少属性 appName。

【问题讨论】:

    标签: maven maven-archetype


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-12-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多