-
1. Re: How to specify jboss home on VM level
aslak Mar 29, 2012 11:50 AM (in response to veitg)1 of 1 people found this helpfulIn Arquillian Core CR7, you should be able to use environment variable replacement in arquillian.xml
<property name="jbossHome">${my.other.variable}</property>
Optionally as ${my.other.variable, default_value_if_other_not_found, .....}
But keep in mind that in most cases when running via Maven Surefire, Surefire will fork a new jvm, so you have to set these variables in the Surefire configuraiton, e.g. via :
<systemPropertyVariables>
<my.other.value>value</my.other.value>
</systemPropertyVariables>
-
2. Re: How to specify jboss home on VM level
veitg Mar 29, 2012 12:04 PM (in response to aslak)Hi.
Thanks for the quick reply. Placing a variable in the xml works as you described.
But sadly this won't fix my problem . Because everyone has to set this variable in their Eclipse run configurations then.
The default to use JBOSS_HOME is good if nothing else is specified. It would be nice if this could be overridden by the jvm system properties - If one is set.
If none is set, use the JBOSS_HOME. If not set, fail. Is something like that possible?
-
3. Re: How to specify jboss home on VM level
aslak Mar 29, 2012 12:24 PM (in response to veitg)so you want a custom env variable if it's set, if not use JBOSS_HOME, and if JBOSS_HOME is not set, then fail ?
${my.variable, JBOSS_HOME}
if my.variable is not set, JBOSS_HOME will be used. If JBOSS_HOME is not set, it 'should' pass null to the configuration and it will fail with JBOSS_HOME or jbossHome not set .. ?
-
4. Re: How to specify jboss home on VM level
veitg Mar 29, 2012 12:31 PM (in response to aslak)Exactly.
I placed ${jboss.home, JBOSS_HOME} into my xml. Then, in eclipse in run configurations I set -Djboss.home=d:\foo\myjboss7.
This works. If I remove -D completely from the run configuration and run it, deploying fails with:
org.jboss.arquillian.container.spi.ConfigurationException: jbossHome '${jboss.home, JBOSS_HOME}' must exist
I guess in this case it tries to find JBOSS_HOME in the java system props as well and NOT in the OS env (where I set JBOSS_HOME to an JBoss 5 installation)
I'm using 1.0.0-Final-SNAPSHOT (BTW: final-SNAPSHOT is a funny name though ).