Created attachment 704239 [details] Contains agent.log and test bundle Description of problem: If deploy.xml is using relative links for destinationFile for instance: <project name="my-test-deployment" default="main" xmlns:rhq="antlib:org.rhq.bundle"> <rhq:bundle name="myTest" version="1.1.1" description="first my-test deployment"> <rhq:deployment-unit name="Datasource"> <rhq:file name="app.properties" destinationFile="../../conf/app.properties" replace="false"/> </rhq:deployment-unit> </rhq:bundle> <target name="main"/> </project> bundle deployment will fail with the following exception: 2013-03-01 14:40:03,411 ERROR [ResourceContainer.invoker.nonDaemon-1] (org.rhq.plugins.ant.AntBundlePluginComponent)- Failed to deploy bundle [class org.rhq.core.pluginapi.bundle.BundleDeployRequest: deployment=[BundleResourceDeployment: bdd=[BundleDeployment[id=10291, name=Deployment [1] of Version [1.1.1] to [myDest]]], resource=[Resource[id=13802, uuid=ecb58f7d-a967-45f2-ac72-f39695efe600, type={JBossAS5}JBossAS Server, key=/home/biljana/JBoss/jboss-eap-5.1.2/jboss-eap-5.1/jboss-as/server/default, name=EAP bkramer.redhat.com:1099 default, version=EAP 5.1.2]]], full-deploy-directory=[/home/biljana/JBoss/jboss-eap-5.1.2/jboss-eap-5.1/jboss-as/server/default/deploy/myTest], clean=[false], revert=[false]] java.lang.Exception: Failed to execute the bundle Ant script at org.rhq.plugins.ant.AntBundlePluginComponent.deployBundle(AntBundlePluginComponent.java:159) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:634) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.RuntimeException: Failed to execute bundle deploy file [/home/biljana/JON_312/rhq-agent/data/tmp/bundle-versions/10211/ant-bundle-recipe106831198048929530.xml]. Cause: /home/biljana/JON_312/rhq-agent/data/tmp/bundle-versions/10211/ant-bundle-recipe106831198048929530.xml:2: Failed to deploy bundle [fxmpDatasource] version [1.1.1]: java.lang.Exception: Failed to create new parent directory for raw file [/home/biljana/JBoss/jboss-eap-5.1.2/jboss-eap-5.1/jboss-as/server/default/deploy/myTest/../../conf/app.properties] Attached agent.log excerpt that covers this and test bundle (info.zip). Version-Release number of selected component (if applicable): JON 3.1.2 How reproducible: Always Steps to Reproduce: 1. Attempt to deploy attached bundle Actual results: The bundle is not deployed and java.lang.Exception: Failed to create new parent directory for raw file [...] is thrown. Expected results: The bundle should be properly deployed without any exception. Additional info: ** If I add a new <rhq:file> element into deploy.xml that does not use destinationFile nor destinationDir, the deployment is properly done. ** Also, I tried to use the following as a workaround: <project name="my-test-deployment" default="main" xmlns:rhq="antlib:org.rhq.bundle"> <rhq:bundle name="myTest" version="1.1.1" description="first my-test deployment"> <rhq:deployment-unit name="Datasource"> <rhq:file name="app.properties" destinationFile="${rhq.deploy.dir}/../../conf/app.properties" replace="false"/> </rhq:deployment-unit> </rhq:bundle> <target name="main"/> </project> but this throws the same exception.
Apparently, this was fixed by mazz in commit 8ae20bd510aa660e94f70cad95fc680fd0dedd47.