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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]