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?
This topic has been locked.
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 Posts
Re: Using variables for path in Liberty App.ear.xml files2013-03-08T09:37:11ZThis is the accepted answer. This is the accepted answer.Hi,
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,