Idea: Container Installer Extension
lfryc Jul 2, 2013 7:32 AMHey guys,
I have created a simple extension which allow to unpack a container distribution for managed container adapter.
It allows resolution of container distribution from:
- Maven G:A:V (using ShrinkWrap Resolver)
- URL (file:///.., http://..)
This solution basically removes a need for unpacking the container distribution from Maven.
I have already found several cases where it would be beneficial to use it and also Ondra Zizka is interested.
----
The configuration is done in arquillian.xml.
At the end, extension's configuration could look like:
<extension qualifier="container-installer"> <property name="installation">{group:artifactId:version}|http://...|file://...}</property> <property name="target">${project.build.directory}</property> <property name="uninstallAfterSuite">true</property> </extension>
Or better, it could hook into configuration of containers, so that each configuration will have associated distribution.
<container qualifier="jboss" default="true"> <configuration> <property name="jbossHome">${project.build.directory}/${jbossHome}</property> <!-- the location of distribution ZIP --> <property name="installation">{group:artifactId:version}|http://...|file://...}</property> <!-- the location of configuration files that we need to rewrite --> <property name="installConfiguration">{group:artifactId:version}|http://...|file://...}</property> <property name="installationTarget">${project.build.directory}</property> <property name="uninstallAfterSuite">true</property> </configuration> </container>
It occurs to me that it would be also beneficial when this extension could setup containerHome automatically after resolution of a binary and its expansion, in this case it would set ${jbossHome} env property.
----
The container installation can also provide some useful event hooks:
- InstallContainer
- ConfigureInstalledContainer
- UnconfigureInstalledContainer
- UninstallContainer
You can use arbitrary method to configure container, e.g. use ShrinkWrap Descriptors to rewrite container's XML configuration.
----
Would you find this extension useful?