[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ant-user
Subject:    RE: calling different target
From:       "Donald Strong" <dstrong () agentissoftware ! com>
Date:       2003-04-30 2:40:28
[Download RAW message or body]


1.	This should be directed to the ant user group, not me directly.
2.	Try the instructions in my previous email if the following does not work.
3.	Use location when pointing properties at directories.
		<property name="sourceDir" location="src" />
	This sets "sourceDir" to an absolute path rather than a relative one.
4.	Relative directories only work within ant. This is consistant with the way XML works.
	As soon as you create a process outside ant it runs in the original directory, ie. folder1.
	Consequently,

	<java classname="com.metapa.webservices.WSDLUtils" classpath="${classpath}" fork="true"
failonerror="true">
        <arg line="-config ./config.props
./lib/soap/soap.jar;./lib/tomcat/activation.jar;./lib/javamail/mail.jar" />
      </java>

	should be changed to:

      <property name="folder4.dir" location="." />
	<java classname="com.metapa.webservices.WSDLUtils" classpath="${classpath}" fork="true"
failonerror="true">
        <arg line="-config ${folder4.dir}/config.props
${folder4.dir}/lib/soap/soap.jar;${folder4.dir}/lib/tomcat/activation.jar;${folder4.dir}/lib/javamai
l/mail.jar" />
	</java>

> -----Original Message-----
> From: Hiron Menon [mailto:hironm@metapa.net]
> Sent: Wednesday, 30 April 2003 12:07 PM
> To: dstrong@agentissoftware.com
> Subject: Re: calling different target
>
>
> Ok .. for you to have a clear picture .. I am attaching the build.xml from
> folder 1 and folder4
>
> In folder1.build.xml look for
> <target name="adr-jar" >
>     <ant antfile="build.xml" dir="./adr/metapa/adr" target="full-test" >
>
> that is where i call the full-test target from folder4.
> Though it starts the target, it doesnt find the files like config.props etc
> which it is looking for in folder1, whereas files are actually in folder4
>
> Thanks and Regards,
>
> Hiron
>
> ----- Original Message -----
> From: "Donald Strong" <dstrong@agentissoftware.com>
> To: "Hiron Menon" <hironm@metapa.net>
> Cc: "Ant Mail List" <user@ant.apache.org>
> Sent: Tuesday, April 29, 2003 6:22 PM
> Subject: RE: calling different target
>
>
> > I an guessing without seeing the build.xml files in question.
> >
> > When you call
> >
> >     <ant dir="${folder4.dir}" >
> >
> > you will pass in all the properties from "folder1/build.xml".
> > If some of these have the same property name as those in
> > ".../folder4/build.xml" then they will be used in preference.
> >
> > Try:
> >     <ant dir="${folder4.dir} inheritAll="false" >
> >
> > If that doesn't help you will have to provide more detail.
> >
> > Regards
> > Donald.
> >
> > > -----Original Message-----
> > > From: Hiron Menon [mailto:hironm@metapa.net]
> > > Sent: Wednesday, 30 April 2003 11:10 AM
> > > To: dstrong@agentissoftware.com
> > > Subject: calling different target
> > >
> > >
> > > Hi Donald,
> > >
> > > Can you please help me with this?
> > > I am trying to call the target of a different build file, but I am
> facing a
> > > problem. Heres the problem in detail:
> > >
> > > Suppose the folder structure is folder1/folder2/folder3/folder4.
> > > I have a build.xml file in folder1 and also another build.xml in
> folder4.
> > > >From the build.xml of folder1, I am trying to call a unit test target
> of the
> > > build.xml in folder4. I am able to do so.
> > > But when the unit tests execute, it requires certain config files and
> > > property files which are actually present in folder4. But ant tries to
> look
> > > for them in folder1 and does not find them. How do I specify, that it
> should
> > > look for the files in folder4?
> > >
> > > Thanks in advance.
> > >
> > > Hiron
> > >
> >
>


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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic