[
https://issues.apache.org/jira/browse/DELTASPIKE-1167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Valentin Maechler updated DELTASPIKE-1167:
------------------------------------------
Description:
using the following apache-deltaspike.properties
{code}
edge-server-url=http://localhost:8081
edge-server-url.Development=http://development:8081
edge-server-url.Staging=http://staging:8081
edge-server-url.Production=http://prod:8081
some-service-url=${edge-server-url}/some-service
{code}
and executing the following code:
{code}
System.out.println("some-service-url="+ConfigResolver.getProjectStageAwarePropertyValue("some-service-url"));
{code}
having the following java VM arg set:
{code}
-Dorg.apache.deltaspike.ProjectStage=Staging
{code}
results in the output:
some-service-url=http://localhost:8081/some-service
expected is:
some-service-url=http://staging:8081/some-service
See in class {{org.apache.deltaspike.core.api.config.ConfigResolver.java}} line
233:
the call to {{getPropertyValue(varName, true)}} does not indicate that it
should be stage aware.
Which it probably can not know (yet) at that location.
Please see also attachments for detail son how to reproduce the issue.
BTW: This is an absolute must for our project!
was:
using the following apache-deltaspike.properties
{code}
edge-server-url=http://localhost:8081
edge-server-url.Development=http://development:8081
edge-server-url.Staging=http://staging:8081
edge-server-url.Production=http://prod:8081
some-service-url=${edge-server-url}/some-service
{code}
and executing the following code:
{code}
System.out.println("some-service-url="+ConfigResolver.getProjectStageAwarePropertyValue("some-service-url"));
{code}
having the following java VM arg set:
{code}
-Dorg.apache.deltaspike.ProjectStage=Staging
{code}
results in the output:
some-service-url=http://localhost:8081/some-service
expected is:
some-service-url=http://staging:8081/some-service
See in class {{org.apache.deltaspike.core.api.config.ConfigResolver.java}} line
233:
the call to {{getPropertyValue(varName, true)}} does not indicate that it
should be stage aware.
Which it probably can not know (yet) at that location.
Please see also attachments for detail son how to reproduce the issue.
> deltaspike configuration: Variable Replacement in Configured Values is NOT
> (!) stage aware
> ------------------------------------------------------------------------------------------
>
> Key: DELTASPIKE-1167
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-1167
> Project: DeltaSpike
> Issue Type: Bug
> Components: Configuration
> Affects Versions: 1.6.1
> Reporter: Valentin Maechler
> Attachments: ConfigurationTest.java, apache-deltaspike.properties
>
>
> using the following apache-deltaspike.properties
> {code}
> edge-server-url=http://localhost:8081
> edge-server-url.Development=http://development:8081
> edge-server-url.Staging=http://staging:8081
> edge-server-url.Production=http://prod:8081
> some-service-url=${edge-server-url}/some-service
> {code}
> and executing the following code:
> {code}
> System.out.println("some-service-url="+ConfigResolver.getProjectStageAwarePropertyValue("some-service-url"));
> {code}
> having the following java VM arg set:
> {code}
> -Dorg.apache.deltaspike.ProjectStage=Staging
> {code}
> results in the output:
> some-service-url=http://localhost:8081/some-service
> expected is:
> some-service-url=http://staging:8081/some-service
> See in class {{org.apache.deltaspike.core.api.config.ConfigResolver.java}}
> line 233:
> the call to {{getPropertyValue(varName, true)}} does not indicate that it
> should be stage aware.
> Which it probably can not know (yet) at that location.
> Please see also attachments for detail son how to reproduce the issue.
> BTW: This is an absolute must for our project!
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)