Ant in DOS

R

Roger Huston

Hello,

I am a Configuration Manager, recently hired into a company that wants
to start using Ant for its build system. The funny thing is that we
do not have any java in our application it is all MS C++ stuff, so I
am not sure how much use Ant will be.

I need to start finding out more info on Ant. I saw a reference to an
Ant mailing list, where can I find that? Is there one specific to
those of us on MS systems?

I also have a question. We are running an Ant task already, from a
batch file. It calls some external commands while it runs. If one of
these commands throws an error - Errorlevel 1 - how can that be
transmitted back when ant exists. Can it exit with an errorlevel of
1?

Thank you!

Rober
 
M

Michiel Konstapel

I also have a question. We are running an Ant task already, from a
batch file. It calls some external commands while it runs. If one of
these commands throws an error - Errorlevel 1 - how can that be
transmitted back when ant exists. Can it exit with an errorlevel of
1?

I think setting failonerror="true" on the <exec> task should do that.
Michiel
 
D

Daniel Dyer

Hello,

I am a Configuration Manager, recently hired into a company that wants
to start using Ant for its build system. The funny thing is that we
do not have any java in our application it is all MS C++ stuff, so I
am not sure how much use Ant will be.

I'm an Ant fan and I use it for all my Java stuff, but I don't think it is
that useful for C++. I used it once for C++ compilation in a Java project
that had some JNI stuff, complicated by the fact the C++ had to compile
with VC++ on Windows and GCC on Linux/Solaris. Doing this with the
existing Ant tasks (exec and uptodate) was fiddly (checking whether the
files had been modified then building them with the appropriate compiler
for the current platform). Still, the advantage of Ant is that it is
extensible. If you can find (or write) custom tasks for compiling C++ you
may find it adequate for your purposes.
I need to start finding out more info on Ant. I saw a reference to an
Ant mailing list, where can I find that? Is there one specific to
those of us on MS systems?

http://ant.apache.org/mail.html
 
G

Gordon Beaton

Still, the advantage of Ant is that it is extensible.

Advantage when compared to what?

I see proponents of Ant use that phrase all the time, but aren't all
build systems extensible? Just because make doesn't call it that and
you don't need any "plugins" doesn't mean that you're stuck using some
fixed set of tasks.

It seems to me that extensibility, whatever it's called this week, is
simply a basic property of any build tool.

/gordon
 
D

Daniel Dyer

Advantage when compared to what?

I see proponents of Ant use that phrase all the time, but aren't all
build systems extensible? Just because make doesn't call it that and
you don't need any "plugins" doesn't mean that you're stuck using some
fixed set of tasks.

I meant extensible in the OO sense. Ant and make differ in their
"extensibility" philosophy. With make you call out to an external program,
which is possible (though not always that elegantly) with Ant. When
extending Ant's capabilities however you extend (in the OO sense) existing
Ant classes, and these run "internally" (for want of better terminology).
They are essentially a fully integrated part of the build, rather than a
forked process (whether this is relevant to the task in hand or is in some
way better is another discussion).
It seems to me that extensibility, whatever it's called this week, is
simply a basic property of any build tool.

I was not trying to advocate Ant over make, the original poster would
probably be better off with make for his particular problem. I was just
suggesting how it might be done with Ant.
 
A

Aidan

Roger said:
I am a Configuration Manager, recently hired into a company that wants
to start using Ant for its build system. The funny thing is that we
do not have any java in our application it is all MS C++ stuff, so I
am not sure how much use Ant will be.

I need to start finding out more info on Ant. I saw a reference to an
Ant mailing list, where can I find that? Is there one specific to
those of us on MS systems?

As you may have noticed, any mention of Ant on a public group tends to make
some resentful make enthusiasts reach for their insecticide.

As a configuration manager I'm sure you feel it unnecessary to be partisan
in this dispute. Nothing against *make, but ant does offer a very appealing
alternative which anyone involved in configuration and deployment should be
aware of.

I would recommend two starting points for leaning about Ant seriously. First
the ant web site http://ant.apache.org/ where there is extensive
documentation and a manual. You will also find details of their mailing
lists, which I recommend you join. http://ant.apache.org/mail.html

If having looked at that information you feel you could benefit from a
deeper understanding, then buy your self a copy of Hatcher & Loughran's
"Java Development with Ant".

If you feel deterred by the mention of Java in the title, don't worry.
Actually very little of the book is about Java. Its mostly about deployment
and configuration management, and is one of the best book ever written on
that subject.

What may particularly interest you is that, although Ant began as a Java
only tool, that is becoming less and less true. Chapter of 17 of the Ant
book explains about the contributed CC task which offers support for C and
C++ development http://ant-contrib.sourceforge.net/cc.html . You might ask
on the list about integration of other tools, like cppUnit, which are being
transmogrified from a Java to a C++ target environment.


Aidan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top