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

Input validation for required properties defined in artifact descriptor

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.0
    • Component/s: Archetypes, Generator, Plugin
    • Labels:
      None

      Description

      Add the possibility to define validation regular expressions for required properties in artifact descriptors.
      Use the regular expressions to validate user input (and ask the user to try again if the expression doesn't match)

      here's an example of a property that is required by the archetype to be only lower case alphabet characters:

      — in archetype-metadata.xml :
      <requiredProperty key="username">
      <validationRegex>^[a-z]*$</validationRegex>
      </requiredProperty>

      — at prompt :
      Define value for property 'username' (should match expression '^[a-z]*$'): John
      Value does not match the expression, please try again: john
      Define value for property...

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                michael-o Michael Osipov
                Reporter:
                mryan Manuel Ryan
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: