You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by "Vincent Massol (JIRA)" <ca...@jakarta.apache.org> on 2005/04/22 19:21:24 UTC

[jira] Commented: (CACTUS-206) cactus.sysproperties space delimiter in property file can be confusing

     [ http://issues.apache.org/jira/browse/CACTUS-206?page=comments#action_63527 ]
     
Vincent Massol commented on CACTUS-206:
---------------------------------------

Hi Thierry,

Thanks for the issue and for the proposition. Would it work for you if we add "\t" as a delimiter? 

I'd prefer to keep the solution as simple as possible. Having too many properties makes it more complex to configure (even though there are default values).

Thanks

> cactus.sysproperties space delimiter in property file can be confusing
> ----------------------------------------------------------------------
>
>          Key: CACTUS-206
>          URL: http://issues.apache.org/jira/browse/CACTUS-206
>      Project: Cactus
>         Type: Improvement
>   Components: Maven Integration
>     Reporter: thierry lach
>     Priority: Minor

>
> The use of the space as a delimiter for cactus.sysproperties can cause unanticipated failures which may be extremely difficult to debug.
> Consider the following example, with the property names split over multiple lines for clarity:
> cactus.sysproperties=\
>     propertya\
>     propertyb\
>     propertyc
> propertya=something
> propertyb=something
> propertyc=something
> This will only work correctly if the indentation is done with spaces.  If the three values are indented with tabs, property[abc] will not be set (because, I think, util:tokenize will be attempting to work with the string \n\tpropertya\n\tpropertyb\n\tpropertyc which contains no spaces.
> I suggest adding an additional key in the plugin.properties, such as 
> cactus.sysproperties.delimiter=SPACE
> and changing the relevant portions (three of them) of plugin.jelly to:
>       <!-- Pass any user-defined system properties -->
>       <j:set var="syspropDelim" value="${cactus.sysproperties.delimiter}"/>
>       <j:if test="${syspropDelim == 'SPACE'}">
>           <j:set var="syspropDelim" value=" "/>
>       </j:if>
>       
>       <util:tokenize var="listOfProperties" delim="${syspropDelim}">${cactus.sysproperties}</util:tokenize>
> This allows a user to set the property
> cactus.sysproperties.delimiter=,
> and then the following example works properly even using tabs:
> cactus.sysproperties=\
>     propertya,\
>     propertyb,\
>     propertyc
> propertya=something
> propertyb=something
> propertyc=something
> Of course, you could just change the delimiter, but this approach would allow existing applications to work properly.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: cactus-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-dev-help@jakarta.apache.org