In my App.ear.xml files in wlp/usr/shared/apps, the sourceOnDisk does not appear to support using variables to define the file paths.
I have tried defining global environmental variables in Windows and using them in the file:
And I also tried String substitution option in RAD. The application file then appears as:
In both cases, the referred to libraries fail to load.
Does anyone know of a way to use variables for the path names in the App.ear.xml files for Liberty?
NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
This topic has been locked.
1 reply Latest Post - 2013-03-08T09:37:11Z by Iain_Duncan
Pinned topic Using variables for path in Liberty App.ear.xml files
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Iain_Duncan 0600022HB223 PostsACCEPTED ANSWER
Re: Using variables for path in Liberty App.ear.xml files2013-03-08T09:37:11Z in response to SystemAdminHi,
I think to do what you want to do (i.e. use a Windows environment variable) you will need to set a Liberty variable to the windows variable which you will need to do when you launch the server:
java -DrepoHome=%M2_REPO% -jar ws-launch.jar myServer
This will have set the "repoHome" Liberty variable to the %M2_REPO% windows variable and make it available for so you can then use the String substitution that you were trying in RAD to produce:
You can read more about variable substitution here:
Hope that helps,