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 "thierry lach (JIRA)" <ca...@jakarta.apache.org> on 2005/04/21 23:55:25 UTC

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

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


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

Posted by "thierry lach (JIRA)" <ca...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/CACTUS-206?page=comments#action_63679 ]
     
thierry lach commented on CACTUS-206:
-------------------------------------

That would be reasonable and probably more useful.

> 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


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

Posted by "Felipe Leme (JIRA)" <ca...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/CACTUS-206?page=comments#action_12332475 ] 

Felipe Leme commented on CACTUS-206:
------------------------------------

On a second thought, using an external file could be confusing for the user, as that file would typically have a .properties extension but it would not be a properties file (as it would only contain the names, not the values).

Vincent,is there  any reason (other than breaking backwards compatibility) for not using a comma-related list?

-- Felipe


> 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


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

Posted by "Vincent Massol (JIRA)" <ca...@jakarta.apache.org>.
     [ 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


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

Posted by "thierry lach (JIRA)" <ca...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/CACTUS-206?page=comments#action_63536 ]
     
thierry lach commented on CACTUS-206:
-------------------------------------

Quite frankly, if it were up to me, I'd just change it to be comma-delimited to be consistent with the rest of the lists.

But since I realize that is not an option, I think what would work would be to use whitespace as a delimiter - that would be space, \t, \n, and \r, I think.

That should make the following example, which is similar to the one above but without tabs, work also (disclaimer - I haven't tried it)

cactus.sysproperties=\ 
propertya\ 
propertyb\ 
propertyc 


> 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


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

Posted by "Vincent Massol (JIRA)" <ca...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/CACTUS-206?page=comments#action_12332482 ] 

Vincent Massol commented on CACTUS-206:
---------------------------------------

> Vincent,is there any reason (other than breaking backwards compatibility) for not using a comma-related list? 

Not that I know of. I think we have simply reused what existed in the maven 1 test plugin at the time.


> 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


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

Posted by "Felipe Leme (JIRA)" <ca...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/CACTUS-206?page=comments#action_63630 ]
     
Felipe Leme commented on CACTUS-206:
------------------------------------

I agree with Vincent that we should keep things simple.

So, what if we use a new property with in turn is the path for a property file which would be read as such by the plugin? Something like this:

cactus.sysproperties.path=${basedir}/etc/cactus-resources/system.properties

-- Felipe


> 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