Łukasz Woźniczka
Łukasz Woźniczka

Reputation: 1695

How i can add some jvm options to arquillian test

Its possible to add some jvm options to embedded glassfish using arquillian ?

I need to add that jvm options:

-Djavax.net.ssl.keyStorePassword=changeit
-Djavax.net.ssl.trustStorePassword=changeit

Upvotes: 0

Views: 1615

Answers (1)

Hardy
Hardy

Reputation: 19129

Java properties on Glassfish are configured in domain.xml. Since you are running an embedded Glassfish, you don't really have a domain.xml file you could modify. You can try to do this in arquillian.xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<arquillian xmlns="http://www.jboss.org/arquillian-1.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.jboss.org/arquillian-1.0 http://jboss.org/schema/arquillian/arquillian-1.0.xsd">
    <engine>
        <property name="deploymentExportPath">target/</property>
    </engine>
    <container qualifier="glassfish" default="true">
        <configuration>
            <property name="configurationXml">file:src/test/resources/domain.xml</property>
            ...
        </configuration>
    </container>
</arquillian>

The configurationXml property is used to pass the configuration file to use for the embedded insance. See also https://docs.jboss.org/author/display/ARQ/GlassFish+3.1+-+Embedded. domain.xml itself has a section for JVM arguments.

Upvotes: 2

Related Questions