Java Makefile

C

castillo.bryan

Roedy Green wrote:

Then you have some idea of the verbosity of ant conditionals.
Obviously, ant conditionals are not written in Java, but they have
that same degree of awkwardness. This comes from trying to do
everything in pure XML syntax. In ant you have to create a named step
called a target that contains the commands you may or may not want to
execute. Then you apply the keyword if and property name to the
target. You have to elsewhere in the program set the property to true
or false depending on whether you want the step executed. Then you
have to do an <antcall to the step to attempt to execute it! All this,
because the ant people have a love affair with XML! It is major
production to conditionally copy a file that may or may not exist.

Do you think the clumsiness is because of XML or the way they
structured the XML?
Why not have an if tag that has tasks contained within the if tag?
This makes more sense to me visually.

<target name="copy.pad.xml">
<if-exists file="${pad.dir}/${ant.project.name}.xml">
<copy
file="${pad.dir}/${ant.project.name}.xml"
todir="${package.dir}"
failonerror="false"
overwrite="true"
/>
</if-exists>
</target>

Ant has support for container tags, I wonder why there aren't
conditional container tags?
Or do I just not know about them?
 
R

root

Jean-Francois Briere said:
You don't know about them.
But don't be hard on yourself. All those "experts" that have posted in
this thread and have whined about Ant seem not to know either.
It is called Ant-contrib. Here is the link of its main page:
http://ant-contrib.sourceforge.net/
And here is the link of its Ant tasks:
http://ant-contrib.sourceforge.net/tasks/tasks/index.html

Uh-huh. And if you're developing open source, hopefully you don't forget to
put "you'll need ant-contrib tasks. And ant-junit task. And ant-jflex task.
And a bunch of ant-netbeans jars. Just to compile this thing" on your
download page.

Dima
 
J

Jean-Francois Briere

Or do I just not know about them?
Uh-huh. And if you're developing open source, hopefully you don't forget to
put "you'll need ant-contrib tasks. And ant-junit task. And ant-jflex task.
And a bunch of ant-netbeans jars. Just to compile this thing" on your
download page.

Dima

Huh? Most people don't have to compile the ant-contrib tasks library.
That's the entire point of using lthird party ibraries :)

Jean-Francois
 

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,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top