You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Josiah Slack <js...@iperia.com> on 2001/09/19 20:22:46 UTC

very basic question

Hi everyone. I'm new to the list, and am in the process of evaluating ant to
see if it's appropriate for a project my group is undertaking. I've been
looking at FAQs, and reading the traffic on this list for the past few days,
but haven't found an answer to the following question: what, in detail, are
the strengths and weaknesses of ant vs. make?

Any pointers would be appreciated. Thanks!

-josiah

javac task and the vm [was Re: very basic question]

Posted by David Walend <df...@cornell.edu>.
Matthew Inger wrote:

>Does the "javac" task use the same vm to compile as it uses
>to run ANT?  Or is there something special it does to boost
>the compile time.
>
Mathew,

Unless you use the fork="yes" option in ant 1.4, ant uses the same vm to 
compile. My machine seems to take about three seconds to start a vm, so 
it's not much of a penalty. However, the only times I've needed to use 
this option were when I was compiling source that used a different 
version of java's xml libraries.

Dave


Re: very basic question

Posted by Matthew Inger <ma...@sedonacorp.com>.
Does the "javac" task use the same vm to compile as it uses
to run ANT?  Or is there something special it does to boost
the compile time.


On Wed, 2001-09-19 at 15:17, Dan Tanner wrote:
> One big advantage of Ant over MAKE that our project found was the amount 
> of time it took to compile our system (Java/EJB).
> With MAKE, it was about 15 minutes.  When we switched to Ant, it dropped 
> down to about 4 minutes (including EJBC compile).  We also didn't need 
> to maintain a .depends file in every single package anymore.  It is true 
> that Ant's dependency-checking isn't as mature as others; but it doesn't 
> really matter for anything but the largest of projects, because it's 
> usually still much faster to do a fresh recompile with Ant than a 
> incremental recompile with MAKE.  (In my experience).
> 
> I don't know the actual numbers, but it's a safe assumption that most 
> people who now use Ant were once MAKE users, so we've got a solid 
> comparison base.  Ant has grown immensely since its inception, with most 
> of its users currently using it in production.  Given this, it'll be 
> tough to find anyone on this list that thinks MAKE is better than Ant 
> for a typical project.
> 
> 
> 
> Josiah Slack wrote:
> 
> > Hi everyone. I'm new to the list, and am in the process of evaluating ant to
> > see if it's appropriate for a project my group is undertaking. I've been
> > looking at FAQs, and reading the traffic on this list for the past few days,
> > but haven't found an answer to the following question: what, in detail, are
> > the strengths and weaknesses of ant vs. make?
> > 
> > Any pointers would be appreciated. Thanks!
> > 
> > -josiah
> > 
> > 
> > 
> 
> 
-- 
Matt Inger (matt.inger@sedonacorp.com)
Sedona Corporation
455 S. Gulph Road, Suite 300
King of Prussia, PA 19406
(484) 679-2213
"Self-respect - the secure feeling that no one,
 as yet, is suspicious." -H.L. Mencken 


Re: very basic question

Posted by David Walend <df...@cornell.edu>.
Josiah,

The biggest advantage we saw when we switched from make to ant was that 
suddenly everyone on our team understood what the build did. And 
everyone could edit it. Our team of ten depended on two high priests of 
make before. If both of them were out when we needed some change in the 
build, we were out of luck.

After I observed that, I've fought hard to keep the build.xml files 
simple and independent. Each subproject has a simple build.xml that any 
developer worth his salt can figure out. makefiles tend to grow hairy 
and complex during a project, but ant's build.xml files tend to stay 
simple, but increase in number.

Dave

Dan Tanner wrote:

> One big advantage of Ant over MAKE that our project found was the 
> amount of time it took to compile our system (Java/EJB).
> With MAKE, it was about 15 minutes.  When we switched to Ant, it 
> dropped down to about 4 minutes (including EJBC compile).  We also 
> didn't need to maintain a .depends file in every single package 
> anymore.  It is true that Ant's dependency-checking isn't as mature as 
> others; but it doesn't really matter for anything but the largest of 
> projects, because it's usually still much faster to do a fresh 
> recompile with Ant than a incremental recompile with MAKE.  (In my 
> experience).
>
> I don't know the actual numbers, but it's a safe assumption that most 
> people who now use Ant were once MAKE users, so we've got a solid 
> comparison base.  Ant has grown immensely since its inception, with 
> most of its users currently using it in production.  Given this, it'll 
> be tough to find anyone on this list that thinks MAKE is better than 
> Ant for a typical project.
>
>
>
> Josiah Slack wrote:
>
>> Hi everyone. I'm new to the list, and am in the process of evaluating 
>> ant to
>> see if it's appropriate for a project my group is undertaking. I've been
>> looking at FAQs, and reading the traffic on this list for the past 
>> few days,
>> but haven't found an answer to the following question: what, in 
>> detail, are
>> the strengths and weaknesses of ant vs. make?
>>
>> Any pointers would be appreciated. Thanks!
>>
>> -josiah
>>
>>
>>
>
>
>




Re: very basic question

Posted by Dan Tanner <da...@dantanner.com>.
One big advantage of Ant over MAKE that our project found was the amount 
of time it took to compile our system (Java/EJB).
With MAKE, it was about 15 minutes.  When we switched to Ant, it dropped 
down to about 4 minutes (including EJBC compile).  We also didn't need 
to maintain a .depends file in every single package anymore.  It is true 
that Ant's dependency-checking isn't as mature as others; but it doesn't 
really matter for anything but the largest of projects, because it's 
usually still much faster to do a fresh recompile with Ant than a 
incremental recompile with MAKE.  (In my experience).

I don't know the actual numbers, but it's a safe assumption that most 
people who now use Ant were once MAKE users, so we've got a solid 
comparison base.  Ant has grown immensely since its inception, with most 
of its users currently using it in production.  Given this, it'll be 
tough to find anyone on this list that thinks MAKE is better than Ant 
for a typical project.



Josiah Slack wrote:

> Hi everyone. I'm new to the list, and am in the process of evaluating ant to
> see if it's appropriate for a project my group is undertaking. I've been
> looking at FAQs, and reading the traffic on this list for the past few days,
> but haven't found an answer to the following question: what, in detail, are
> the strengths and weaknesses of ant vs. make?
> 
> Any pointers would be appreciated. Thanks!
> 
> -josiah
> 
> 
> 



Re: very basic question

Posted by Matthew Inger <ma...@sedonacorp.com>.
i'm sure people will offer a lot more than this,
but here's a start

1:  Ant is cross platform.  The same codebase will run
    on any system that has a java vm.

    Make must be ported to each platform as it is a
    binary executable

2:  Ant build scripts are defined in xml, and, in most
    cases can be used on any platform with no modifications.
    If however, you are calling system commands, you may
    need to adjust it account for the possible platform
    types.  For example:

       <target name="MaybeDoWindows" if="IsWindows">
         ...
       </target>

       <target name="MaybeDoUnix" if="IsUnix">
         ...
       </target>

       <target name="doStuff">
        <condition property="IsWindows" value="true">
          <os family="windows" />
        </condition>
        <condition property="IsUnix" value="true">
          <os family="unix" />
        </condition>

        <antcall target="MaybeDoWindows" />
        <antcall target="MaybeDoUnix" />
       </target>

    With make, you must have different make files for every platform
    type you execute on, or use something like "imake" to build them
    for you.

3:  Ant is extensible through the creation of Custom tasks which
    is java based, therefore platform-independent (provider your
    task doesn't do anything os specific).

    Make is extensible through shell commands, or other executables
    (batch files, .exe, .com, etc...)

4:  Ant is not great at dependency checking from .java -> .class files.
    I believe that make is better at this, but the ANT guru's can fill
    you in more.


5:  Ant has a lot of built in and optional tools that come in very
    handy, such as XML Transformation via XSL stylesheets, SQL
    connectivity via JDBC, version control tasks, etc....

    Make can support the above tools, but you have to have executables
    or scripts to perform the operations (not so easy for database
    operations).


I guess the bottom line is that ANT gives you the same advantages
over Make that Java gives you over C (in a platform independent
sense), plus a little bit more...


On Wed, 2001-09-19 at 14:22, Josiah Slack wrote:
> Hi everyone. I'm new to the list, and am in the process of evaluating ant to
> see if it's appropriate for a project my group is undertaking. I've been
> looking at FAQs, and reading the traffic on this list for the past few days,
> but haven't found an answer to the following question: what, in detail, are
> the strengths and weaknesses of ant vs. make?
> 
> Any pointers would be appreciated. Thanks!
> 
> -josiah
-- 
Matt Inger (matt.inger@sedonacorp.com)
Sedona Corporation
455 S. Gulph Road, Suite 300
King of Prussia, PA 19406
(484) 679-2213
"Self-respect - the secure feeling that no one,
 as yet, is suspicious." -H.L. Mencken 


Re: Checking if properties is set

Posted by Diane Holt <ho...@yahoo.com>.
--- Ylan Segal <yl...@digiworks.tv> wrote:
> I am trying to write a target that checks if all needed properties are
> set before it actually does anything else.

Other than using <script>, I don't know of any way currently to check if a
list of properties are simply set. The if/unless construct only tests one
property at a time, not a list of properties, as someone suggested
earlier. Nor can you use the <condition> task with the <equals> element,
as someone else suggested (comparing arg1 to "" will always return false,
regardless of whether the property named in arg1 is set or not). To use
<condition>, we'd need to add a new element that was like <equals>, but
that just checks for whether the property is set, not what it's set to.

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/

Checking if properties is set

Posted by Ylan Segal <yl...@digiworks.tv>.
Hi,


I am trying to write a target that checks if all needed properties are set
before it actually does anything else.
Why? because there are several developers working on a project and since the
build.xml is being checked into cvs, the specific properties (like src.home,
javadoc.home, etc) are particular to each developer and set in a
build.properties that is NOT checked-in to cvs.
However, I have managed to check with the condition task if the
build.properties is present, but that does not garantee that all the
properties needed are set, for example, if javadoc.home is not set, then I
end up having a directory created with the name ${javadoc.home}.
I want the build to fail if not all required properties are set.

Does anyone have an idea on how to do this? What I want really, is for the
condition task to be able to check for a specific property.

All help greatly appreciated.

Ylan Segal.


Re: very basic question

Posted by David Stagner <ds...@nmdp.org>.
Josiah Slack wrote:
> 
> Hi everyone. I'm new to the list, and am in the process of evaluating ant to
> see if it's appropriate for a project my group is undertaking. I've been
> looking at FAQs, and reading the traffic on this list for the past few days,
> but haven't found an answer to the following question: what, in detail, are
> the strengths and weaknesses of ant vs. make?
> 
> Any pointers would be appreciated. Thanks!

First pointer - assuming you're using Java, or primarily Java, try
building a project of moderate complexity, and writing both Ant files
and makefiles for the project.  See which one works better for you.  

Second pointer - make a list of requirements for *your* project, and
determine how you would implement each requirement in ant or make. 
Decide from that which one makes more sense, rather than looking for a
list of "strengths" and "weaknesses" that is pretty arbitrary and
probably biased.  Some sample questions... do you need your build system
to interact with your version control system?  Do you need your build
system to deploy to a testing or production environment?  Are you
building for multiple languages?  Are you building on multiple
platforms?  Are you dealing with proprietary IDEs that have their own
build requirements?

Quite frankly, either ant or make can be coerced into performing
virtually any build-related task, and it's largely a personal
preference.  And there are other options, too, like the excellent Cons
(written in Perl), or the built-in tools of an IDE, or even custom build
scripts.  Personally, i like ant for its regularity and extensibility,
and its clean cross-platform behavior.  I dislike make because i've had
the unpleasant experience of maintaining a large, cross-platform make
system.  But that's my experience, and my preferences.  

The tools we choose for development color the entire development
experience.  They should be matched to both the needs of the project and
the personalities of the developers, or they will cause pain.  "Best of
breed" is a myth to get you to buy whatever they're selling.  The only
way to really learn how a tool feels is to USE it.
-- 

David Stagner

National Marrow Donor Program
3001 Broadway Street NE
Broadway Ridge Suite 500
Minneapolis, MN  55413

Email: dstagner@nmdp.org