rhq:bundle is not expanding properties
kenrumer Aug 26, 2012 1:47 PMMy deploy.xml looks like below. It works fine in when run from rhq-bundle-deployer, but from the GUI it is asking for ${archive-name} file to be uploaded. Is this a bug? Am I doing something wrong?
<?xml version="1.0"?>
<!-- Author ------ -->
<project
name="jdk1.6-install"
default="main"
xmlns:rhq="antlib:org.rhq.bundle">
<property
name="bundle-name"
value="jdk1.6" />
<property
name="bundle-version"
value="1.0" />
<property
name="product-version"
value="0_33" />
<property
name="OS"
value="LINUX" />
<property
name="processor"
value="x86_64" />
<property
name="product-folder"
value="${bundle-name}.${product-version}" />
<property
name="archive-name"
value="${bundle-name}.${product-version}-${OS}-${processor}.zip" />
<rhq:bundle
name="${bundle-name}"
version="${bundle-version}"
description="Installs ${bundle-name} version=${bundle-version}">
<rhq:deployment-unit
name="${bundle-name}"
preinstallTarget="preinstall"
postinstallTarget="postinstall"
manageRootDir="true">
<rhq:archive
name="${archive-name}"
exploded="true">
</rhq:archive>
<rhq:file name="preinstall.sh" />
<rhq:file name="postinstall.sh" />
</rhq:deployment-unit>
</rhq:bundle>
<target name="main"/>
<target name="preinstall">
<mkdir dir="${rhq.deploy.dir}" />
<rhq:audit
action="Deployment Properties"
info="Properties for ${rhq.deploy.name}"
message="See details">ID: ${rhq.deploy.id}
Directory: ${rhq.deploy.dir}
hostname=${rhq.system.hostname}
os.name=${rhq.system.os.name}
os.version=${rhq.system.os.version}
os.type=${rhq.system.os.type}
architecture=${rhq.system.architecture}
interfaces.java.address=${rhq.system.interfaces.java.address}</rhq:audit>
<rhq:audit
action="${bundle-name} preinstall"
info="executing preinstall.sh script" />
<chmod file="preinstall.sh" perm="700" />
<exec
executable="preinstall.sh"
failifexecutionfails="false"
failonerror="true"
logError="true"
resultproperty="result"
resolveexecutable="true">
<arg value="deploy.name=${rhq.deploy.name}" />
<arg value="deploy.id=${rhq.deploy.id}" />
<arg value="deploy.dir=${rhq.deploy.dir}" />
<arg value="hostname=${rhq.system.hostname}" />
<arg value="os.name=${rhq.system.os.name}" />
<arg value="os.version=${rhq.system.os.version}" />
<arg value="os.type=${rhq.system.os.type}" />
<arg value="architecture=${rhq.system.architecture}" />
<arg value="interfaces.java.address=${rhq.system.interfaces.java.address}" />
</exec>
<rhq:audit
status="FAILURE"
action="${bundle-name} preinstall"
info="preinstall.sh script was not found or script execution failed"
message="${output}">${error}</rhq:audit>
<rhq:audit
action="${bundle-name} preinstall"
info="preinstall complete, exit code=${result}. Installing to ${rhq.deploy.dir}"
message="${output}">${error}</rhq:audit>
</target>
<target name="postinstall">
<chmod file="postinstall.sh" perm="700" />
<exec
executable="postinstall.sh"
failifexecutionfails="false"
failonerror="true"
logError="true"
resultproperty="result"
resolveexecutable="true">
<arg value="deploy.name=${rhq.deploy.name}" />
<arg value="deploy.id=${rhq.deploy.id}" />
<arg value="deploy.dir=${rhq.deploy.dir}" />
<arg value="hostname=${rhq.system.hostname}" />
<arg value="os.name=${rhq.system.os.name}" />
<arg value="os.version=${rhq.system.os.version}" />
<arg value="os.type=${rhq.system.os.type}" />
<arg value="architecture=${rhq.system.architecture}" />
<arg value="interfaces.java.address=${rhq.system.interfaces.java.address}" />
</exec>
<rhq:audit
status="FAILURE"
action="${bundle-name} postinstall"
info="postinstall.sh script was not found"
message="postinstall.sh script was not found. Continuing bundle deployment." />
<rhq:audit
action="${bundle-name} postinstall"
info="postinstall complete. Installed at ${rhq.deploy.dir}" />
</target>
</project>