Uploaded image for project: 'Arquillian'
  1. Arquillian
  2. ARQ-647

Implement a convenient way to pass system properties to managed container's JVM.

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: Critical Critical
    • None
    • 1.0.0.CR5
    • Configuration
    • None

      Currently, the only way to pass system props to a container (say, JBoss AS 7), is to use

        <property name="javaVmArguments">-Dfoo=bar</property>
      

      It would be great if system properties could be specified in a special way, like:

      • by loading a .properties file and setting them in JVM
      • from a deployment
      • from a path
      • from an URL
      • by a special config elements
      • by taking them all from the launching JVM; possibly only those with a given prefix

      Here's how I'd imagine it. Params in [] are optional, with default values.

      <arquillian xmlns="http://jboss.org/schema/arquillian" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      	xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
      
      	<container qualifier="jboss" default="true">
      		<configuration>
      			<property name="jbossHome">target/smoke</property>
      			<property name="javaVmArguments">${server.jvm.args}</property>
      			<property name="serverConfig">${server.config:standalone.xml}</property>
      			<property name="allowConnectingToRunningServer">true</property>
      			<systemProperties>
      				<copyCurrent [prefix="arq."]/>
      				<loadFromDeployment [path="META-INF/arq.system.properties"] [optional="false"]>
      				<loadFromFile       path="../testsuite/my.properties" [optional="false"]>
                                      <loadFromUrl        url="http://foo.redhat.com/foo.properties" [optional="true"]>
      				<property name="jbossas.ts.integ.dir">${fooBar}</property>
      			</systemProperties>
      		</configuration>
      	</container>
      </arquillian>
      

              arubinge@redhat.com Andrew Rubinger (Inactive)
              ozizka_jira Ondrej Zizka (Inactive)
              Votes:
              6 Vote for this issue
              Watchers:
              11 Start watching this issue

                Created:
                Updated: