[ 
https://issues.apache.org/jira/browse/GROOVY-9491?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Arseniy Tashoyan updated GROOVY-9491:
-------------------------------------
    Description: 
With a malformedĀ grapeConfig.xml, groovy prints a warning on standard error, 
then continues to run with some built-in default Grape configuration:
{code:none}
Local Ivy config file 
'/Users/user/workspace/custom/src/main/resources/grapeConfig.xml' appears 
corrupt - ignoring it and using default config instead
...
{code}
This leads to unpredictable behavior - for example, a wrong version of library 
in the classpath downloaded from a wrong location. Such issue is quite hard to 
troubleshoot, because the actual failure occurs at arbitrary point of time and 
gives no clue about the root cause.
Instead, groovy should fail with non-zero code.
The warning on stderr might be visible when running a script in a console. But 
for a CI system, where no human reads stderr unless a build or test failed, 
this warning is almost invisible.

  was:
With a malformedĀ grapeConfig.xml, groovy prints a warning on standard error, 
then continues to run with some built-in default Grape configuration:
{code:none}
Local Ivy config file 
'/Users/user/workspace/custom/src/main/resources/grapeConfig.xml' appears 
corrupt - ignoring it and using default config instead
...
{code}
This leads to unpredictable behavior - for example, a wrong version of library 
in the classpath downloaded from a wrong location. Such issue is quite hard to 
troubleshoot, because the actual failure occurs at arbitrary point of time and 
gives no clue about the root cause.
Instead, groovy should fail with non-zero code.
The problem is especially prominent for a CI system, where no human reads 
stderr unless a build or test failed.


> Groovy still runs despite grapeConfig.xml is malformed
> ------------------------------------------------------
>
>                 Key: GROOVY-9491
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9491
>             Project: Groovy
>          Issue Type: Bug
>          Components: groovy-runtime
>    Affects Versions: 2.5.10, 3.0.2
>            Reporter: Arseniy Tashoyan
>            Priority: Major
>
> With a malformedĀ grapeConfig.xml, groovy prints a warning on standard error, 
> then continues to run with some built-in default Grape configuration:
> {code:none}
> Local Ivy config file 
> '/Users/user/workspace/custom/src/main/resources/grapeConfig.xml' appears 
> corrupt - ignoring it and using default config instead
> ...
> {code}
> This leads to unpredictable behavior - for example, a wrong version of 
> library in the classpath downloaded from a wrong location. Such issue is 
> quite hard to troubleshoot, because the actual failure occurs at arbitrary 
> point of time and gives no clue about the root cause.
> Instead, groovy should fail with non-zero code.
> The warning on stderr might be visible when running a script in a console. 
> But for a CI system, where no human reads stderr unless a build or test 
> failed, this warning is almost invisible.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to