You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Quinten Verheyen <q....@ringring.be> on 2005/04/18 16:43:16 UTC

odd problem when using a build that calls a build w/ the deploy task

Hi, ran into something odd:

- buildfile A (build-A.xml) contains deploy task, running the task works w/o any problems :

	<!-- ... -->
	<target name="deploy" depends="war">
		<deploy url="${tomcat.manager.url}"
            	username="${tomcat.manager.username}"
            	password="${tomcat.manager.password}"
            	war="${dist.dir}/webapp.war"
            	path="/${name}"
            	update="true" />
	</target>
	<!-- ... -->

Now comes the strange part ...

- buildfile B wants to call A's deploy task, remark : it's located in another dir, more specific the dir above, so :

	<!-- ... -->
	<target name="master">
		<ant antfile="build-A.xml" target="all" dir="subdir" />
	</target>
	<!-- ... -->

Question : does this work ?
Answer   : Nope, it results in a java.io.FileNotFoundException: dist\webapp.war (The system cannot find the path specified)
Question : Why ?
Answer   : Because the deploy task searches for dist in the dir of build B.
Question : Why ?
Answer   : I don't know ... ;-)

It is strange because the deploy task is the only one who has a problem with this. In reality build file B is a master build file that calls a 'all' target, and buildfile A contains the whole standard deployment shabang -> none of them fail except this specific task.

I would say it's worth checking out.

Obviously this prob is solved by using an absolute path, but it speaks for itself it shouldn't be configured like that.

Any thoughts ?

Kind regards,
Q

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org