簡體   English   中英

Maven 具有默認值 artifactID 的原型屬性

[英]Maven archetype properties with default value artifactID

我想制作一個使用要創建的參數的原型......堅果我不知道以這種方式制作的參數是否正確:

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

它對我不起作用...我在集成測試中失敗了

[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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM