[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: compare ant vs cons
From: |
ken |
Subject: |
Re: compare ant vs cons |
Date: |
Thu, 13 Sep 2001 09:51:22 -0700 |
User-agent: |
IMP/PHP IMAP webmail program 2.2.0-pre13 |
John -
I've used cons for several years on Java development projects and it has been
very successful. I recently decided to investigate to Ant just to see how it
compares. What I found was a mixed bag.
To its credit, Ant has lots of pre-built tasks related to Java development.
I've not used recent releases of cons, but I don't believe it has the same
level
of Java-specific functionality. However, in my view, Ant has a couple of
significant weaknesses.
1. Ant doesn't handle subprojects well. Ant's "ant" task and targeting
paradigm
do not make for a scalable build process in my view. Which means that you
either have to play games with the build invocations or rely upon monolithic
build files (which can be difficult to maintain.) One of the real strengths of
cons is its ability to decentralize the commands which govern the work to be
preformed.
2. Using Ant, I think you end up writing more build code to do the same amount
of work. For example, there is some Ant code to build some Java sources:
<javac srcdir="${source.home}" destdir="${javac.dest.dir}"
classpath="${javac.dest.dir}:${default.webapp.classpath}"
debug="on" verbose="${this.verbose}">
<include name="${java.path}/*.java"/>
</javac>
Here is some cons code that does the same thing (using some of my own
extensions)
$CONS = new cons::Java();
$CONS->javaCompile('*.java');
I think the difference between these two is quite clear. In the case of the
Ant, the javac task call is concern with lots of configuration stuff. In the
cons example, the cons::Java class is already preset to know to handle java
compiles. The result is simple (easier to maintain) build files.
I'm "on the fence" about Ant. I think it is a fine tool if you have just a
coule of projects to manage. And, it is well established. But, you cannot beat
cons for flexibility and scalability (especially if you are familiar with perl.)
Given your needs for both C++ and Java, I would probably use cons.
Ken
Quoting JohnA <address@hidden>:
> I am trying to compare ant vs cons in the following environment:
>
> - WinNT / 2K
> - few, if any, third party libraries
> - small (~50 projects)
> - C++ mostly using MSVC (possibly going to gcc)
> - Java using Jikes
>
> Has anyone already done this sort of comparison? If so, could you post
> your conclusions?
>
> TIA,
> John
>
>
> _______________________________________________
> address@hidden
> http://mail.gnu.org/mailman/listinfo/cons-discuss
> Cons URL: http://www.dsmit.com/cons/
>