[
https://issues.apache.org/jira/browse/ARCHETYPE-487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14730684#comment-14730684
]
ASF GitHub Bot commented on ARCHETYPE-487:
------------------------------------------
GitHub user m-ryan opened a pull request:
https://github.com/apache/maven-archetype/pull/7
ARCHETYPE-487 Add input validation for required properties defined in…
This pull request implements the following new feature :
https://issues.apache.org/jira/browse/ARCHETYPE-487
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/m-ryan/maven-archetype master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/maven-archetype/pull/7.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #7
----
commit 178dc478b801067bcda386d2a44d097bf89e15f4
Author: Manuel Ryan <[email protected]>
Date: 2015-09-04T11:47:43Z
ARCHETYPE-487 Add input validation for required properties defined in
artifact descriptor
----
> Input validation for required properties defined in artifact descriptor
> -----------------------------------------------------------------------
>
> Key: ARCHETYPE-487
> URL: https://issues.apache.org/jira/browse/ARCHETYPE-487
> Project: Maven Archetype
> Issue Type: New Feature
> Components: Archetypes, Generator, Plugin
> Reporter: Manuel Ryan
> Priority: Minor
>
> 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...
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)