You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Nicolas Dupont (JIRA)" <ji...@codehaus.org> on 2012/01/18 13:33:03 UTC

[jira] (ARCHETYPE-397) Required property default value is not displayed correctly if a Velocity expression

Nicolas Dupont created ARCHETYPE-397:
----------------------------------------

             Summary: Required property default value is not displayed correctly if a Velocity expression
                 Key: ARCHETYPE-397
                 URL: https://jira.codehaus.org/browse/ARCHETYPE-397
             Project: Maven Archetype
          Issue Type: Bug
          Components: Generator
    Affects Versions: 2.2
            Reporter: Nicolas Dupont


If you use a Velocity expression to define a default value in your archetype descriptor, it is not displayed correctly when you generate a project.
Let's say we have, in our descriptor :
<requiredProperty key="package">${groupId}.${artifactId}</requiredProperty>
When you generate a project from the archetype, you type com.company as a groupId and my-project as an artifactId. Then you'll be prompted for the package and default value will be displayed as "com.company.my-project".
Now, if we have in our descriptor :
{{<requiredProperty key="package">${groupId}.${artifactId.replace('-','')}</requiredProperty>}}
When you generate a project in the same way, the default value for package will be displayed as ${groupId}.${artifactId.replace('-','')} instead of com.company.myproject.
Note that if you leave the value as it is, the generation will do resolve the expression (package property will be resolve correctly). It's just confusing when the default value is showed at the prompt step.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (ARCHETYPE-397) Required property default value is not displayed correctly if a Velocity expression

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/ARCHETYPE-397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy updated ARCHETYPE-397:
-----------------------------------

    Fix Version/s: 2.3
         Assignee: Olivier Lamy
    
> Required property default value is not displayed correctly if a Velocity expression
> -----------------------------------------------------------------------------------
>
>                 Key: ARCHETYPE-397
>                 URL: https://jira.codehaus.org/browse/ARCHETYPE-397
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Generator
>    Affects Versions: 2.2
>            Reporter: Nicolas Dupont
>            Assignee: Olivier Lamy
>             Fix For: 2.3
>
>         Attachments: fix_archetype_397.patch
>
>
> If you use a Velocity expression to define a default value in your archetype descriptor, it is not displayed correctly when you generate a project.
> Let's say we have, in our descriptor :
> <requiredProperty key="package">${groupId}.${artifactId}</requiredProperty>
> When you generate a project from the archetype, you type com.company as a groupId and my-project as an artifactId. Then you'll be prompted for the package and default value will be displayed as "com.company.my-project".
> Now, if we have in our descriptor :
> {{<requiredProperty key="package">${groupId}.${artifactId.replace('-','')}</requiredProperty>}}
> When you generate a project in the same way, the default value for package will be displayed as ${groupId}.${artifactId.replace('-','')} instead of com.company.myproject.
> Note that if you leave the value as it is, the generation will do resolve the expression (package property will be resolve correctly). It's just confusing when the default value is showed at the prompt step.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (ARCHETYPE-397) Required property default value is not displayed correctly if a Velocity expression

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/ARCHETYPE-397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy closed ARCHETYPE-397.
----------------------------------

    Resolution: Fixed

fixed r1293908.
Thanks!
                
> Required property default value is not displayed correctly if a Velocity expression
> -----------------------------------------------------------------------------------
>
>                 Key: ARCHETYPE-397
>                 URL: https://jira.codehaus.org/browse/ARCHETYPE-397
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Generator
>    Affects Versions: 2.2
>            Reporter: Nicolas Dupont
>            Assignee: Olivier Lamy
>             Fix For: 2.3
>
>         Attachments: fix_archetype_397.patch
>
>
> If you use a Velocity expression to define a default value in your archetype descriptor, it is not displayed correctly when you generate a project.
> Let's say we have, in our descriptor :
> <requiredProperty key="package">${groupId}.${artifactId}</requiredProperty>
> When you generate a project from the archetype, you type com.company as a groupId and my-project as an artifactId. Then you'll be prompted for the package and default value will be displayed as "com.company.my-project".
> Now, if we have in our descriptor :
> {{<requiredProperty key="package">${groupId}.${artifactId.replace('-','')}</requiredProperty>}}
> When you generate a project in the same way, the default value for package will be displayed as ${groupId}.${artifactId.replace('-','')} instead of com.company.myproject.
> Note that if you leave the value as it is, the generation will do resolve the expression (package property will be resolve correctly). It's just confusing when the default value is showed at the prompt step.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (ARCHETYPE-397) Required property default value is not displayed correctly if a Velocity expression

Posted by "Emmanuel Hugonnet (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/ARCHETYPE-397?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Hugonnet updated ARCHETYPE-397:
----------------------------------------

    Attachment: fix_archetype_397.patch

Patch to fix this problem : creating a VelocityContext to display defaultValue correctly
                
> Required property default value is not displayed correctly if a Velocity expression
> -----------------------------------------------------------------------------------
>
>                 Key: ARCHETYPE-397
>                 URL: https://jira.codehaus.org/browse/ARCHETYPE-397
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Generator
>    Affects Versions: 2.2
>            Reporter: Nicolas Dupont
>         Attachments: fix_archetype_397.patch
>
>
> If you use a Velocity expression to define a default value in your archetype descriptor, it is not displayed correctly when you generate a project.
> Let's say we have, in our descriptor :
> <requiredProperty key="package">${groupId}.${artifactId}</requiredProperty>
> When you generate a project from the archetype, you type com.company as a groupId and my-project as an artifactId. Then you'll be prompted for the package and default value will be displayed as "com.company.my-project".
> Now, if we have in our descriptor :
> {{<requiredProperty key="package">${groupId}.${artifactId.replace('-','')}</requiredProperty>}}
> When you generate a project in the same way, the default value for package will be displayed as ${groupId}.${artifactId.replace('-','')} instead of com.company.myproject.
> Note that if you leave the value as it is, the generation will do resolve the expression (package property will be resolve correctly). It's just confusing when the default value is showed at the prompt step.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira