You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Elliotte Rusty Harold (Jira)" <ji...@apache.org> on 2019/12/23 11:35:00 UTC

[jira] [Closed] (ARCHETYPE-313) Setting required properties when instantiating archetype from execution in pom.xml

     [ https://issues.apache.org/jira/browse/ARCHETYPE-313?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Elliotte Rusty Harold closed ARCHETYPE-313.
-------------------------------------------

> Setting required properties when instantiating archetype from execution in pom.xml
> ----------------------------------------------------------------------------------
>
>                 Key: ARCHETYPE-313
>                 URL: https://issues.apache.org/jira/browse/ARCHETYPE-313
>             Project: Maven Archetype
>          Issue Type: Improvement
>            Reporter: Florian Motlik
>            Priority: Minor
>         Attachments: patch, pom.xml
>
>
> When calling archetype:generate from an execution in the pom there is no possibility to set required properties of the Archetype. So when for testing purposes you are trying to use the archetype for creating a new project, package and compile it it won't work, because required properties are not set. Workaround would be to define default values for all required fields, but this is a NoGo.
> A solution for the Problem would be to have an environment String in the CreateProjectFromArchetypeMojo Class which points to a Properties File. This Properties file contains the correct values for the Archetype. They are loaded into executionProperties, so as if they were given over command line. If no environment is given they are simply not loaded.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)