Maven archetype properties with artifactID default value

I want to create an archetype that uses the created parameter ... nut I don’t know if this parameter is correct made in this way:

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

This does not work for me ... I have an error in 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.
+5
source share
1 answer

Change test/resources/projects/basic/archetype.propertiesand add appName=artifactIDthere.

+14

All Articles