hi patrick,
you can do it right now via a custom config-source - see e.g. [1].
if you prefer/need a shorter key e.g. only for the project stage, you can
replace
return System.getProperty(key.replace(".", "_"), null);
e.g. with:
if ("org.apache.deltaspike.ProjectStage".equals(key)) {
return System.getProperty("DELTASPIKE_PROJECT_STAGE", null);
}
return null;
if you would like to have an out-of-the-box support, please file a jira [2]
ticket.
regards,
gerhard
[1] https://gist.github.com/os890/1a1d4ea70fd44853b63f
[2] https://issues.apache.org/jira/browse/DELTASPIKE
http://www.irian.at
Your JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German
Professional Support for Apache
MyFaces, DeltaSpike and OpenWebBeans
2016-03-09 10:20 GMT+01:00 Patrick Suter <[email protected]>:
> Hi,
>
> We have been having problems setting the ProjectStage for our Application
> with the available keys via environment variable when deploying the
> Application to Cloud Foundry. This is because environment variables with a
> "." do not seem to get passed to the application. We need to set the
> ProjectStage via environment variable because we do not want our build to
> be platform dependent.
>
> I would suggest to add a key for the initial lookup of the ProjectStage
> that only contains uppercase letter and '_' like 'DELTASPIKE_PROJECT_STAGE'
> in org.apache.deltaspike.core.util.ProjectStageProducer.java which would
> ensure portability.
>
> Currently available keys to set the ProjectStage:
> /**
> * These config keys will get used to detect the ProjectStage.
> * We iterate through them until we find the first non-empty value.
> */
> public static final String[] CONFIG_SETTING_KEYS =
> {
> //TODO discuss it
> "org.apache.deltaspike.ProjectStage",
> "javax.faces.PROJECT_STAGE",
> "faces.PROJECT_STAGE"
> };
>
> Thanks for taking a look at this.
>
> - Patrick
>