You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "WATKINS, Andy, FM" <An...@rbos.com> on 2001/10/12 18:43:42 UTC
How to manage without rules
In make you have rules, not so in ant
I have a target as follows
<target name="project1_test" depends="">
<junit printsummary="no" haltonfailure="yes" fork="yes" timeout="60000">
<jvmarg value="-Dlog.dir=project1" />
<classpath>
<path refid="localclasses"/>
<path refid="classpath"/>
</classpath>
<formatter usefile="false" type="plain" />
<batchtest fork="yes">
<fileset dir="${rbsfm}/project1/classes"
includes="**/*$$Test.class" />
</batchtest>
</junit>
<echo message="Common tests completed OK" />
</target>
The problem is that I have 10 different projects, that all need this
sort of target, but with different directories.
In make, I would have a target called "*.test" and use $@ to pull out the
value
********************************************************************
Visit our Internet site at http://www.rbsmarkets.com
This e-mail is intended only for the addressee named above.
As this e-mail may contain confidential or privileged information,
if you are not the named addressee, you are not authorised to
retain, read, copy or disseminate this message or any part of it.
********************************************************************
Re: How to manage without rules
Posted by Peter Donald <do...@apache.org>.
On Sat, 13 Oct 2001 09:04, T Master wrote:
> What is wrong with using antcall? I make a generic target, and pass in the
> paremeters to use.
> It does the job with use similar to method calling in Java.
The problem is that you invariable start need functionality like recursive
proeprty resolution and besides it makes your ant files hard to follow at
times. See a message titled "Re: Question about properties and ant2" by me
around Sept 14th for more explanation.
--
Cheers,
Pete
-----------------------------------------------------------
"Remember, your body is a temple; however, it's also your
dancehall and bowling alley" -- Dharma Montgomery
-----------------------------------------------------------
Re: How to manage without rules
Posted by T Master <tm...@iknowledgeinc.com>.
What is wrong with using antcall? I make a generic target, and pass in the
paremeters to use.
It does the job with use similar to method calling in Java.
I don't know of "make rules" (or I've forgotten!), so does anyone have an
example?
T Master
----- Original Message -----
From: "Peter Donald" <do...@apache.org>
To: <an...@jakarta.apache.org>
Sent: Friday, October 12, 2001 4:18 PM
Subject: Re: How to manage without rules
> On Sat, 13 Oct 2001 02:43, WATKINS, Andy, FM wrote:
> > In make you have rules, not so in ant
>
> yet ... hopefully Ant will have notion of rules in future ;)
>
> However there is no real easy way of doing it currently. The best way may
be
> to use <antcall> to call the target and pass in the specific parameters
you
> want to use.
>
> --
> Cheers,
>
> Pete
Re: How to manage without rules
Posted by Peter Donald <do...@apache.org>.
On Sat, 13 Oct 2001 02:43, WATKINS, Andy, FM wrote:
> In make you have rules, not so in ant
yet ... hopefully Ant will have notion of rules in future ;)
However there is no real easy way of doing it currently. The best way may be
to use <antcall> to call the target and pass in the specific parameters you
want to use.
> I have a target as follows
>
> <target name="project1_test" depends="">
> <junit printsummary="no" haltonfailure="yes" fork="yes"
> timeout="60000"> <jvmarg value="-Dlog.dir=project1" />
>
> <classpath>
> <path refid="localclasses"/>
> <path refid="classpath"/>
> </classpath>
>
> <formatter usefile="false" type="plain" />
>
> <batchtest fork="yes">
> <fileset dir="${rbsfm}/project1/classes"
> includes="**/*$$Test.class" />
> </batchtest>
> </junit>
> <echo message="Common tests completed OK" />
> </target>
>
>
>
>
> The problem is that I have 10 different projects, that all need this
> sort of target, but with different directories.
>
> In make, I would have a target called "*.test" and use $@ to pull out the
> value
>
>
> ********************************************************************
> Visit our Internet site at http://www.rbsmarkets.com
>
> This e-mail is intended only for the addressee named above.
> As this e-mail may contain confidential or privileged information,
> if you are not the named addressee, you are not authorised to
> retain, read, copy or disseminate this message or any part of it.
> ********************************************************************
--
Cheers,
Pete
---------------------------------------------------
For every complex problem there is a solution that
is simple, neat and wrong
---------------------------------------------------