Could anyone give me some idea what is the difference bwteen ant and maven?

2008-10-24 Thread dr2238
  I have knowledge on ant, but doesn't have any knowledge on
maven.   I heard other say ant is kind of procedural language , while maven
is an objected oriented language.

Is that true?   Could anyone explain it to me a little bit?It would be
great if you can show me some small examples to let me understand what is
the difference between them.


thanks a lot for your help


Daniel


Re: Could anyone give me some idea what is the difference bwteen ant and maven?

2008-10-24 Thread David C. Hicks
I would suggest you do a Google search using ant maven compare and 
choose any one of the myriad links that appear.  Some will be slanted 
one way or the other.


Neither Ant nor Maven are languages in the traditional sense.  They 
could be considered DSL's (domain specific languages) whose purpose is 
to configure and execute the building of software and/or related tasks.  
That's pretty much where the similarities end, IMO.


Dave


dr2238 wrote:

  I have knowledge on ant, but doesn't have any knowledge on
maven.   I heard other say ant is kind of procedural language , while maven
is an objected oriented language.

Is that true?   Could anyone explain it to me a little bit?It would be
great if you can show me some small examples to let me understand what is
the difference between them.


thanks a lot for your help


Daniel

  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Could anyone give me some idea what is the difference bwteen ant and maven?

2008-10-24 Thread Martin Gainty

Great question btw!

Ant is xml-based target driven build environment
each task(s) corresponds to a particular piece of build functionality such as 
jsp-compile,compile,jar,war or ear
which must be completed in order so that the web-application (war) or 
application enterprise app (ear) can deploy
Currently ant has no capability (and just as soon as I say this someone could 
release a new jar with these functions) to 
define repositories (offline/online)
no ability to interface to 'the build system' thru a predefined plugin interface
The biggest challenge i found with ant is no ability to handle version specific 
build environment configurations
e.g.
fu.jar needs to be 1.0
bar.jar needs to be 1.1
fubar.jar needs fu.jar (1.0 version) and bar.jar (1.1 version) to work 
properly..

Anyone?
Martin 
__ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business 
of Sender. This transmission is of a confidential nature and Sender does not 
endorse distribution to any party other than intended recipient. Sender does 
not necessarily endorse content contained within this transmission. 


 Date: Fri, 24 Oct 2008 14:28:13 -0500
 From: [EMAIL PROTECTED]
 To: users@maven.apache.org
 Subject: Could anyone give me some idea what is the difference bwteen ant and 
 maven?
 
   I have knowledge on ant, but doesn't have any knowledge on
 maven.   I heard other say ant is kind of procedural language , while maven
 is an objected oriented language.
 
 Is that true?   Could anyone explain it to me a little bit?It would be
 great if you can show me some small examples to let me understand what is
 the difference between them.
 
 
 thanks a lot for your help
 
 
 Daniel

_
Want to read Hotmail messages in Outlook? The Wordsmiths show you how.
http://windowslive.com/connect/post/wedowindowslive.spaces.live.com-Blog-cns!20EE04FBC541789!167.entry?ocid=TXT_TAGLM_WL_hotmail_092008

Re: Could anyone give me some idea what is the difference bwteen ant and maven?

2008-10-24 Thread David Brown
Hello, I was a long-time Ant user mainly because of the gigs I had all used 
Ant. There are various camps out there with the Pro's and Con's of both build 
systems. Ant is full control you do what you want limited only by your skill or 
lack thereof with the Ant language. Yes, Ant is more of a procedural build 
sytem. Maven: on the other is a so-called 'descriptive' build system. Depending 
upon your needs there are advantages and disadvantages to both systems. I would 
say that if you have a relatively fixed and relatively well defined number of 
apps, libs, jars, wars and ears to generate and you don't want your developers 
to have to become build experts Maven may be the better choice. On the other 
hand if your systems are wide ranging but interdependent and in need of 
non-native or maverick libraries and or proprietary jar, wars and ears then 
Ant. May be a better choice. There are gurus out there such as: Steve Loughran 
that will put a lot more weight into the use of Ant (and for
  a good reason) than the use of Maven. Maven on the other hand allows the use 
of Ant tasks more-or-less directly as part of the Maven build. HTH, David.

dr2238 wrote ..
   I have knowledge on ant, but doesn't have any knowledge on
 maven.   I heard other say ant is kind of procedural language , while maven
 is an objected oriented language.
 
 Is that true?   Could anyone explain it to me a little bit?It would be
 great if you can show me some small examples to let me understand what is
 the difference between them.
 
 
 thanks a lot for your help
 
 
 Daniel
Yet some, not wise, go to the other side of the globe, to barbarous and 
unhealthy regions, and devote ten or twenty years, in that they may live,-that 
is, keep comfortably warm,- and die in New England at last. 

Henry David Thoreau - Walden - 1845

Yet some, not wise, go to the other side of the globe, to barbarous and 
unhealthy regions, and devote ten or twenty years, in that they may live,-that 
is, keep comfortably warm,- and die in New England at last. 

Henry David Thoreau - Walden - 1845

Yet some, not wise, go to the other side of the globe, to barbarous and 
unhealthy regions, and devote ten or twenty years, in that they may live,-that 
is, keep comfortably warm,- and die in New England at last. 

Henry David Thoreau - Walden - 1845


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Could anyone give me some idea what is the difference bwteen ant and maven?

2008-10-24 Thread Graham Leggett

dr2238 wrote:


  I have knowledge on ant, but doesn't have any knowledge on
maven.   I heard other say ant is kind of procedural language , while maven
is an objected oriented language.



Is that true?   Could anyone explain it to me a little bit?It would be
great if you can show me some small examples to let me understand what is
the difference between them.


They are very different from one another.

Ant is effectively a scripting language: you give ant a sequence of 
tasks to do, and ant will go off and do those tasks for you.


Like any scripting language, ant is entirely useless without a script to 
run (aka the build.xml file).


And the ant script has to be written by you: ant isn't going to do 
anything unless you tell ant how to do it.


Way back when, people realised that people were writing the same ant 
scripts, doing very similar things, over and over again, resulting in 
incompatible and incomplete behaviour.


Surely if someone wrote just one ant script, and everyone used the same 
script, life would be much easier for everybody. In fact, life would be 
even easier if we could write the script in java directly and release it 
like we do any other java code.


And so maven was born.

Maven is not a scripting language. Maven is not a language at all.

Maven is like a butler: it knows how to do stuff.

Maven, build my jar file and run the tests.

Certainly sir.

Of course, in order to do useful stuff for you, maven needs to know a 
few details about your project. Before it can build your jar file, it 
needs to know your project's name and the current version so that it can 
give your jar file a sensible name.


This is where pom.xml comes in.

The POM is the place where everything maven needs to know is stored.

The more information you add to your POM file, the more maven can do for 
you, without expecting you to tell maven how to do it, like you have to 
do with ant.


If you tell maven what jars your project depends on, maven can 
automatically download those jars for you. When your project depends on 
50 jars, that is one serious timesaver, and 50 less things you have to 
care about.


Tell maven what kind of test library you use, and maven can run your 
tests for you as part of the build (mvn test).


If you tell maven that you use eclipse, maven can set up your eclipse 
environment for you. Getting up and running in your IDE becomes a single 
simple command, instead of 45 minutes of clicking the mouse (mvn 
eclipse:eclipse).


You can ask maven to build your javadocs for you. You already told maven 
where your source was, so maven has everything it needs to build the 
javadocs, without you having to tell it how (mvn javadoc).


In fact, maven knows how to build lots of different kinds of 
autogenerated documentation, and package them together into an 
autogenerated website for you with helpful menu navigation (mvn site).


And if you tell maven where the documentation should be uploaded to, 
maven can upload your site to your documentation webserver automatically 
(mvn site:deploy).


At this point you're probably wondering how you will remember all these 
different maven commands when the time comes to tag a release of your code.


Surely there must be a simple way for maven to sanity check your code to 
check whether it is properly checked in, test that your test suite runs 
correctly, tag your release, bump up the version numbers on all the 
files in source control to the next version number, check out a pristine 
copy of your tag, build the code, deploy the code to your release 
repository, build the documentation, upload the documentation for your 
release to your documentation website, all in one easy and pain free step?


There is:

mvn release:prepare release:perform

That's it.

Seriously.

You might start wondering what would happen if you had to tell maven 
about each and every detail about your project: wouldn't it get out of hand?


Of course it would, which is why maven introduces the concept of 
sensible defaults.


Some information, like the project name, is mandatory. But other 
information, like where your source code lives, has a sensible default. 
Put your source code where maven expects to find it (src/main/java) and 
you no longer have to tell maven where your source code is, maven 
already knows.


And if maven already knows where your source code is, then your fellow 
developers know where your source code is, without them having to look 
it up.


By sticking to the maven standard way of laying out your project, there 
is lots of information that you no longer need to tell maven about, or 
your fellow developers about. That means less work, less confusion, and 
less documentation.


You have just downloaded a project you have never seen before in your 
life. The project builds using maven. That means mvn install will 
build and install your code. You didn't need to read any documentation 
or instructions, you already knew how to build the