You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Petr Janata (JIRA)" <ji...@codehaus.org> on 2010/11/08 18:22:03 UTC
[jira] Created: (ARCHETYPE-349) Property not available in config
when defaultValue in descriptor contains token
Property not available in config when defaultValue in descriptor contains token
-------------------------------------------------------------------------------
Key: ARCHETYPE-349
URL: http://jira.codehaus.org/browse/ARCHETYPE-349
Project: Maven Archetype
Issue Type: Bug
Components: Generator
Affects Versions: 2.0
Environment: any
Reporter: Petr Janata
Attachments: test_and_patch.tgz
There is a bug with property resolving when calling archetype:generate mojo. Default property value provided in archetype descriptor hides the value passed as parameter to mojo.
archetype-metadata.xml:
<requiredProperty key="foo">
<defaultValue>${some.name}</defaultValue>
</requiredProperty>
running:
mvn archetype:generate ... -Dfoo=bar
...
Define value for property 'foo': ${some.name}: :
Generation stops and asks for value of property foo although it was passed as parameter.
I have attached example archetype and patch that solves this issue.
Please review and focus on suspicious line (112 before patching, 116 after patching).
Basically the default value from metadata should be ignored, when value is explicitly set.
Handling nested tokens is a different story...
--
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
[jira] Commented: (ARCHETYPE-349) Property not available in config
when defaultValue in descriptor contains token
Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/ARCHETYPE-349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=277379#comment-277379 ]
Herve Boutemy commented on ARCHETYPE-349:
-----------------------------------------
IT improved to a real automated test using archetype:integration-test with a reference generated project in [r1163284|http://svn.apache.org/viewvc?rev=1163284&view=rev]
> Property not available in config when defaultValue in descriptor contains token
> -------------------------------------------------------------------------------
>
> Key: ARCHETYPE-349
> URL: https://jira.codehaus.org/browse/ARCHETYPE-349
> Project: Maven Archetype
> Issue Type: Bug
> Components: Generator
> Affects Versions: 2.0
> Environment: any
> Reporter: Petr Janata
> Assignee: Brett Porter
> Fix For: 2.1
>
> Attachments: archetype-349.patch, test_and_patch.tgz
>
>
> There is a bug with property resolving when calling archetype:generate mojo. Default property value provided in archetype descriptor hides the value passed as parameter to mojo.
> archetype-metadata.xml:
> {code:xml}<requiredProperty key="foo">
> <defaultValue>${some.name}</defaultValue>
> </requiredProperty>{code}
> running:
> {noformat}mvn archetype:generate ... -Dfoo=bar
> ...
> Define value for property 'foo': ${some.name}: :{noformat}
> Generation stops and asks for value of property foo although it was passed as parameter.
> I have attached example archetype and patch that solves this issue.
> Please review and focus on suspicious line (112 before patching, 116 after patching).
> Basically the default value from metadata should be ignored, when value is explicitly set.
> Handling nested tokens is a different story...
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (ARCHETYPE-349) Property not available in config
when defaultValue in descriptor contains token
Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/ARCHETYPE-349?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Herve Boutemy updated ARCHETYPE-349:
------------------------------------
Description:
There is a bug with property resolving when calling archetype:generate mojo. Default property value provided in archetype descriptor hides the value passed as parameter to mojo.
archetype-metadata.xml:
{code:xml}<requiredProperty key="foo">
<defaultValue>${some.name}</defaultValue>
</requiredProperty>{code}
running:
{noformat}mvn archetype:generate ... -Dfoo=bar
...
Define value for property 'foo': ${some.name}: :{noformat}
Generation stops and asks for value of property foo although it was passed as parameter.
I have attached example archetype and patch that solves this issue.
Please review and focus on suspicious line (112 before patching, 116 after patching).
Basically the default value from metadata should be ignored, when value is explicitly set.
Handling nested tokens is a different story...
was:
There is a bug with property resolving when calling archetype:generate mojo. Default property value provided in archetype descriptor hides the value passed as parameter to mojo.
archetype-metadata.xml:
<requiredProperty key="foo">
<defaultValue>${some.name}</defaultValue>
</requiredProperty>
running:
mvn archetype:generate ... -Dfoo=bar
...
Define value for property 'foo': ${some.name}: :
Generation stops and asks for value of property foo although it was passed as parameter.
I have attached example archetype and patch that solves this issue.
Please review and focus on suspicious line (112 before patching, 116 after patching).
Basically the default value from metadata should be ignored, when value is explicitly set.
Handling nested tokens is a different story...
> Property not available in config when defaultValue in descriptor contains token
> -------------------------------------------------------------------------------
>
> Key: ARCHETYPE-349
> URL: http://jira.codehaus.org/browse/ARCHETYPE-349
> Project: Maven Archetype
> Issue Type: Bug
> Components: Generator
> Affects Versions: 2.0
> Environment: any
> Reporter: Petr Janata
> Attachments: test_and_patch.tgz
>
>
> There is a bug with property resolving when calling archetype:generate mojo. Default property value provided in archetype descriptor hides the value passed as parameter to mojo.
> archetype-metadata.xml:
> {code:xml}<requiredProperty key="foo">
> <defaultValue>${some.name}</defaultValue>
> </requiredProperty>{code}
> running:
> {noformat}mvn archetype:generate ... -Dfoo=bar
> ...
> Define value for property 'foo': ${some.name}: :{noformat}
> Generation stops and asks for value of property foo although it was passed as parameter.
> I have attached example archetype and patch that solves this issue.
> Please review and focus on suspicious line (112 before patching, 116 after patching).
> Basically the default value from metadata should be ignored, when value is explicitly set.
> Handling nested tokens is a different story...
--
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
[jira] Updated: (ARCHETYPE-349) Property not available in config
when defaultValue in descriptor contains token
Posted by "Jesse McConnell (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/ARCHETYPE-349?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jesse McConnell updated ARCHETYPE-349:
--------------------------------------
Attachment: archetype-349.patch
reformatted patch, applies from the top of the archetype project
> Property not available in config when defaultValue in descriptor contains token
> -------------------------------------------------------------------------------
>
> Key: ARCHETYPE-349
> URL: https://jira.codehaus.org/browse/ARCHETYPE-349
> Project: Maven Archetype
> Issue Type: Bug
> Components: Generator
> Affects Versions: 2.0
> Environment: any
> Reporter: Petr Janata
> Attachments: archetype-349.patch, test_and_patch.tgz
>
>
> There is a bug with property resolving when calling archetype:generate mojo. Default property value provided in archetype descriptor hides the value passed as parameter to mojo.
> archetype-metadata.xml:
> {code:xml}<requiredProperty key="foo">
> <defaultValue>${some.name}</defaultValue>
> </requiredProperty>{code}
> running:
> {noformat}mvn archetype:generate ... -Dfoo=bar
> ...
> Define value for property 'foo': ${some.name}: :{noformat}
> Generation stops and asks for value of property foo although it was passed as parameter.
> I have attached example archetype and patch that solves this issue.
> Please review and focus on suspicious line (112 before patching, 116 after patching).
> Basically the default value from metadata should be ignored, when value is explicitly set.
> Handling nested tokens is a different story...
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Closed: (ARCHETYPE-349) Property not available in config
when defaultValue in descriptor contains token
Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
[ https://jira.codehaus.org/browse/ARCHETYPE-349?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brett Porter closed ARCHETYPE-349.
----------------------------------
Resolution: Fixed
Fix Version/s: 2.1
Assignee: Brett Porter
Patch applied, thanks both!
> Property not available in config when defaultValue in descriptor contains token
> -------------------------------------------------------------------------------
>
> Key: ARCHETYPE-349
> URL: https://jira.codehaus.org/browse/ARCHETYPE-349
> Project: Maven Archetype
> Issue Type: Bug
> Components: Generator
> Affects Versions: 2.0
> Environment: any
> Reporter: Petr Janata
> Assignee: Brett Porter
> Fix For: 2.1
>
> Attachments: archetype-349.patch, test_and_patch.tgz
>
>
> There is a bug with property resolving when calling archetype:generate mojo. Default property value provided in archetype descriptor hides the value passed as parameter to mojo.
> archetype-metadata.xml:
> {code:xml}<requiredProperty key="foo">
> <defaultValue>${some.name}</defaultValue>
> </requiredProperty>{code}
> running:
> {noformat}mvn archetype:generate ... -Dfoo=bar
> ...
> Define value for property 'foo': ${some.name}: :{noformat}
> Generation stops and asks for value of property foo although it was passed as parameter.
> I have attached example archetype and patch that solves this issue.
> Please review and focus on suspicious line (112 before patching, 116 after patching).
> Basically the default value from metadata should be ignored, when value is explicitly set.
> Handling nested tokens is a different story...
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira