bundles
rafaelcba Sep 27, 2010 2:53 PMHello!
I want to use the new provisioning feature on RHQ 3/JON 2.4.
I have a bundle with a Data Source definition, a WAR and the bundle recipe (deploy.xml). I want to update some tokens on DS xml and deploy the WAR inside JBoss deploy's directory.
<?xml version="1.0"?>
<project name="test-bundle" default="main"
xmlns:rhq="antlib:org.rhq.bundle">
<rhq:bundle name="POC-WAR-DEPLOY" version="3.0.0" description="Deploy de pacote WAR via Bundles">
<rhq:input-property
name="dbUser"
description="database user"
required="true"
defaultValue="sa"
type="string">
</rhq:input-property>
<rhq:input-property
name="dbPWD"
description="dabase password"
required="true"
defaultValue="xxx"
type="string">
</rhq:input-property>
<rhq:input-property
name="dsMinPoolSize"
description="min pool size"
required="true"
defaultValue="2"
type="integer">
</rhq:input-property>
<rhq:input-property
name="dsMaxPoolSize"
description="max pool size"
required="true"
defaultValue="20"
type="integer">
</rhq:input-property>
<rhq:deployment-unit name="WAR">
<rhq:file name="JSFTutorials-CDStore.war" destinationFile="JSFTutorials-CDStore.war" replace="true"></rhq:file>
<rhq:file name="hsqldb-test-ds.xml" destinationFile="hsqldb-test-ds.xml" replace="true"></rhq:file>
</rhq:deployment-unit>
</rhq:bundle>
<target name="main"></target>
</project>
The DataSource token process works fine but the WAR deploy fails because sounds like RHQ corrupt the WAR. After the RHQ finish the bundle process the WAR inside JBoss is corrupt.
By the way I've tried use this form to update some tokens on web.xml inside a WAR. But RHQ deploy the WAR exploded in rhq.deploy.dir.
There is a way to force RHQ to deploy the archieve in zipped form?
<rhq:archive name="JSFTutorials-CDStore.war">
<rhq:replace>
<rhq:fileset>
<include name="**/web.xml"/>
</rhq:fileset>
</rhq:replace>
</rhq:archive>
Thanks.
-
rhq-bundles.zip 1.2 MB