An Arquillian container adapter (DeployableContainer implementation) that can start and stop a local WebSphere Application Server Liberty Profile process and run tests on it over a remote protocol (effectively in a different JVM).
Container Injection Support Matrix
|@EJB||@EJB (no-interface)||@Inject (CDI)||@Inject (MC)||@PersistenceContext @PersistenceUnit|
This DeployableContainer has been tested with WebSphere Application Server Liberty Profile V8.5.5. You can find the download on the WASdev Liberty Profile download site.
Prerequisite WLP Configuration
In the server.xml of the WLP server at least enable the following features:
and enable the applicationMonitor MBean support:
Default Protocol: Servlet 3.0
Container Configuration Options
|wlpHome||String||None||Home directory of the WLP runtime.|
|serverName||String||defaultServer||Name of the server to start.|
|httpPort||Integer||9080|| HTTP Port of the server.
|deployType||String||dropins||Type of deployment (available: dropins or xml)|
|sharedLib||String||None||ID of the shared library reference; if provided it will be used as the commonLibraryRef attribute of the application/classloader configuration element|
|securityConfiguration||String||None||When using xml deployType the referred file will be embedded within the application tag into the server.xml and should be used to configure the security settings.|
|failSafeUndeployment||String||None|| In some scenarios the xml deployType deployments might fail to undeploy because of an open FileHandle on Windows when using an Oracle JVM. Enabling this flag suppresses the exception to be thrown and marks the file to be delete upon exiting the JVM process.
||String||None||String that will be set as the apiTypeVisibility attribute of the application/classloader configuration element. See the WLP Knowledge Center for possible values and default used when this value is not provided.|
|verifyApps||String||None||Specifies a comma-separated list of names of applications that will be verified to be started before tests are executed|
|verifyAppDeployTimeout||Integer||20||Time in seconds to wait for the verifyApps application deployment to complete and the applications to start|
|serverStartTimeout||Integer||30||Time in seconds to wait for the application server to start|
|appDeployTimeout||Integer||20||Time in seconds to wait for the application deployment to complete and the application to start|
|appUndeployTimeout||Integer||2||Time in seconds to wait for the application undeployment to complete|
|allowConnectingToRunningServer||Boolean||false||Allow a connection to be made to an already running application server process|
|outputToConsole||Boolean||true||When enabled output from the application server process will be emitted to stdout|
Example of Container Configuration (arquillian.xml)
Example of Maven profile setup