[Mono-list] Using Ant for Building
Alexander Klyubin
klyubin@aqris.com
Sat, 4 Aug 2001 18:23:08 +0300
Hi!
From my point of view, it might be a good idea to use Ant building tool
(http://jakarta.apache.org/ant/) for performing various build tasks for this
project. One of the possible drawbacks is that Ant is Java tool, hence, it
will require Java runtime to be installed in order to build the project.
I used Ant in many Java projects, which required complex building tasks. I
would say Ant is better and clearer than OS-dependent makefiles.
From my point of view the advantages are:
* Usually much shorter and more easily understandable build script. This is
because Ant has built-in tasks which have been written specifically for
building purposes. Usually one XML file. For example, compiling C# files in
directories and subdirectories is as easy as:
...
<target name="compile" depends="init">
<csc
targetType="library"
outputFile="${outputFile}"
references="lib\NUnitCore.dll"
includes="src/**/*.cs"
excludes="src/console/*.cs"
/>
</target>
...
* Single build script file. You don't have to modify similar files in all
subdirectories.
* Ant is a more or less standard for Java Open Source projects.
* Potentially dropping the dependency on Cygwin for Windows platform only
for building purposes. (Note: I have nothing like Cygwin tools. I use them
when working on my Windows machine really often)
* Although Ant is Java tool, it already has some .NET building tasks (csc,
ilasm) which even
work(http://jakarta.apache.org/ant/manual/OptionalTasks/dotnet.html).
DISADVANTAGES:
* Java dependency. One will have to have Java runtime installed in order to
run the build script.
* Although Ant makes most build tasks easier, some tasks which haven't been
coded into it are harder to achieve. This happens not that often anyway. You
can always use exec tasks to run shell scripts... I would like to note, that
I managed to always end up using Ant built-in tasks in the build scripts I
wrote.
NOTE: I never used Ant in non-Java projects. So this is just an idea.
If somebody is interested I could maybe even write Ant build script for the
project that does what's currently done by the makefiles.
What do you think?
Regards,
Alexander Klyubin