Uploaded image for project: 'Maven Archetype'
  1. Maven Archetype
  2. ARCHETYPE-675

Use property default value when running tests

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 3.2.1
    • None
    • None
    • None

    Description

      Given an archetype descriptor with:

      <requiredProperties>
          <requiredProperty key="example-prop">
            <defaultValue>Hi</defaultValue>
          </requiredProperty>
      </requiredProperties> 

       when you run `mvn verify` to run the integration test, it fails with:

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.2.1:integration-test (default-integration-test) on project demo:
      [ERROR] Archetype IT 'it1' failed: Missing required properties in archetype.properties: example-prop
      [ERROR] -> [Help 1]
      [ERROR] 

      Only after adding the property to the archetype.properties with a value, it will continue to run the test.

      It would be nice if the default values were inserted instead, unless specified otherwise.

      Attachments

        1. demo-archetype-test.zip
          26 kB
          Giovanni van der Schelde

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Giovds Giovanni van der Schelde
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: