maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tuomas Kiviaho (JIRA)" <j...@codehaus.org>
Subject [jira] Updated: (ARCHETYPE-318) <requiredProperty> <defaultValue> not correctly filtered
Date Fri, 18 Mar 2011 08:34:23 GMT

     [ http://jira.codehaus.org/browse/ARCHETYPE-318?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tuomas Kiviaho updated ARCHETYPE-318:
-------------------------------------

    Attachment: DefaultArchetypeGenerationConfigurator.patch

This patch unifies interactive and batch mode behavior. Replacement of required properties
now fails if transitive properties are not resolved. I noticed in the code that in order for
${foobar} to be replaced with foobars actual value, foobar must be a required property, but
that another story. There also an oddity with groupId, artifactId, version (and package).
They are forced as required properties in the new configuration as well so declaring of artifactId
for instance without requiring will only lead to two properties with the same name of which
one is optional and the (forced) one is still required.

> <requiredProperty> <defaultValue> not correctly filtered
> --------------------------------------------------------
>
>                 Key: ARCHETYPE-318
>                 URL: http://jira.codehaus.org/browse/ARCHETYPE-318
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Generator
>    Affects Versions: 2.0-alpha-5
>            Reporter: Jochen Ehret
>            Priority: Minor
>         Attachments: DefaultArchetypeGenerationConfigurator.patch
>
>
> In our archetype-metadata.xml we┬┤ve defined a <requiredProperty> with a default
value like this:
> {code:xml}<requiredProperty key="subArtifactId">
>     <defaultValue>${artifactId}.itest1</defaultValue>
> </requiredProperty>{code}
> When we call "archetype:generate" and enter the parameters in interactive mode everything
works fine. But when we try to set the parameter "subArtifactId" on the command line (mvn
archetype:generate -DsubArtifactId=xyz) or from an "archetype.properties" file, the value
is ignored. In the generated pom.xml the variable ${subArtifactId} is always replaced with
"${artifactId}.itest1".

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message