I added this maven job.
exec:java -Dexec.mainClass="com.someclass.SomeClass" -DAPP_HOME="${DEV_ENV_LOC}"
What happens is, spring context is able to pickup the value of APP_HOME, but the java class System.getEnv("APP_HOME"), is not able to pick up the value.
Any ideas?
For command line options you have to use
System.getProperty()
:Or pass
APP_HOME
variable as an environment variable with EnvInject Plugin and lookup it withSystem.getenv()
:Find more details in difference here.