[ 
http://jira.codehaus.org/browse/ARCHETYPE-367?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=262289#action_262289
 ] 

Herve Boutemy commented on ARCHETYPE-367:
-----------------------------------------

IIUC, properties are interpreted as Strings by default
then Velocity interprets $isCXF as String, which is equivalent to "true"
so you need to do explicit boolean transformation with "$isCXF == true"

I understand that it is not very natural, but the only solution I can see is 
adding a type to properties, but where?

Do you have an idea of a way it could be specified?

> boolean requiredProperty used in archetype ressource doesn't work as expected
> -----------------------------------------------------------------------------
>
>                 Key: ARCHETYPE-367
>                 URL: http://jira.codehaus.org/browse/ARCHETYPE-367
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Archetypes
>    Affects Versions: 2.0
>            Reporter: Björn Mahler
>            Priority: Minor
>
> I created a custom Property like ${isCXF} to enable cxf-functionality in our 
> archetype. In a resource file (web.xml) I've something like this:
> #if($isCXF)
>   <!-- CXF SOAP servlet -->
>     <servlet>
>     [...]
> #end
> and this doesn't work. isCXF is always true! and the code in the if-block is 
> always rendered consequently. So I modified it to: ($isCXF == true). And that 
> worked, but it's more verbose and error-prone.
> maybe the Object generated for the variable doesn't overwrite toString 
> correctly?

-- 
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


Reply via email to