You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Paul Milliken (JIRA)" <ji...@apache.org> on 2015/06/03 15:33:37 UTC
[jira] [Updated] (MSHARED-417) Infinite loop when loading
self-referencing properties
[ https://issues.apache.org/jira/browse/MSHARED-417?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Milliken updated MSHARED-417:
----------------------------------
Description:
I've recently encountered a situation in which maven-resources-plugin would hang indefinitely when using resource filtering. I've managed to track it down to the loadPropertyFile and getPropertyValue methods in PropertyUtils.
getPropertyValue appears to have some protection against a property referring to itself. So, the following properties file loads fine:
{code}
test=${test}
test2=${test2}
{code}
With the value of the "test" property ending up as "$\{test\}". However, if you load the following properties file:
{code}
test=${test2}
test2=${test2}
{code}
then getPropertyValue seems to get stuck in a loop attempting to resolve the property.
In our case, this was encountered as a result of a misconfiguration (our filters.properties is being generated based on a number of sources, and something was configured incorrectly). Causing the Maven process to hang indefinitely (while using 100% of a CPU core) isn't ideal behaviour.
was:
I've recently encountered a situation in which maven-resources-plugin would hang indefinitely when using resource filtering. I've managed to track it down to the loadPropertyFile and getPropertyValue methods in PropertyUtils.
getPropertyValue appears to have some protection against a property referring to itself. So, the following properties file loads fine:
{code}
test=${test}
test2=${test2}
{code}
With the value of the "test" property ending up as "${test}". However, if you load the following properties file:
{code}
test=${test2}
test2=${test2}
{code}
then getPropertyValue seems to get stuck in a loop attempting to resolve the property.
In our case, this was encountered as a result of a misconfiguration (our filters.properties is being generated based on a number of sources, and something was configured incorrectly). Causing the Maven process to hang indefinitely (while using 100% of a CPU core) isn't ideal behaviour.
> Infinite loop when loading self-referencing properties
> ------------------------------------------------------
>
> Key: MSHARED-417
> URL: https://issues.apache.org/jira/browse/MSHARED-417
> Project: Maven Shared Components
> Issue Type: Bug
> Components: maven-filtering
> Affects Versions: maven-filtering-1.3
> Environment: Maven 3.2.5. Maven-filtering-1.3.
> Reporter: Paul Milliken
>
> I've recently encountered a situation in which maven-resources-plugin would hang indefinitely when using resource filtering. I've managed to track it down to the loadPropertyFile and getPropertyValue methods in PropertyUtils.
> getPropertyValue appears to have some protection against a property referring to itself. So, the following properties file loads fine:
> {code}
> test=${test}
> test2=${test2}
> {code}
> With the value of the "test" property ending up as "$\{test\}". However, if you load the following properties file:
> {code}
> test=${test2}
> test2=${test2}
> {code}
> then getPropertyValue seems to get stuck in a loop attempting to resolve the property.
> In our case, this was encountered as a result of a misconfiguration (our filters.properties is being generated based on a number of sources, and something was configured incorrectly). Causing the Maven process to hang indefinitely (while using 100% of a CPU core) isn't ideal behaviour.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)