• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Wanted: Tutorial on How to convert Ant to to Maven?

 
Siegfried Heintze
Ranch Hand
Posts: 403
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now can someone help me understand maven and ant? I get the impression from the boulder colorado jug presentation (months ago) that one uses maven instead of ant. I ran the maven tutorial and it worked! I was impressed.


The rest of my questions below could probably just be answered by a URL that contains some better documentation. The documentation at maven.apache.org is making my very fustrated. It would be nice to see an ant build.xml that uses sql, junit and schemaexport and xdoclet tasks that has been converted to use maven.

There are all these ant tasks like junit, sql, xdoclet and schemaexport. I don't understand, from looking at the maven documentation, how one specifies complex logic (in AppFuse's build.xml, for example) in a maven file. It seems there oodles of plugins for maven, including a maven plugin. I looked at the hibernate plugin entry at maven.apache.org and it was very discouraging. It only supports hibernate 2.0.

None of the these plugins have more than a couple of sentences of documentation. This is wierd.

When I look at unit testing in the user's guide at maven.apache.org it is very brief. It really does not explain how to set up unit tests with junit or dbunit like I see in the ant tutorials (like Eric Hatcher's book on Ant). The one example maven project is good but just too trivial to be useful. Do you just add all your ant tasks to you project.xml using the <ant:task>? What happens if there is not a plug for what you want to do? For example, I did not see schemaexport in the list of plugins for maven.

There must be a better explanaition of maven somewhere. Anyone know where?

Thanks,
Siegfried
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't used Maven either beyond running "off the shelf" builds created by the "maven genapp" templates. However, there are at least two books on Maven coming out in the near months:

Maven: A Developer's Notebook
Pro Apache Maven

Actually, that O'Reilly book is already available.
[ July 18, 2005: Message edited by: Lasse Koskela ]
 
Sreenivas Mangasandra
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Siegfried,

I would suggest the following ::

Mastering OpenSource Tools Including Ant, XDoclet, JUnit, Cactus, & Maven -
http://www.bookpool.com/sm/0764556177

Maven SQL Plug-in -
http://www.codeczar.com/products/maven-sql-plugin/index.html
http://jakarta.apache.org/commons/sandbox/sql/

I shall post reply if i find some more information.
N i hope u find something useful in the above links,

Sreenivas Mangasandra.
 
D BAELI
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just read : "Maven: A Developer's Notebook" it should give an answer to your questions. This book details exactly how Maven works, its goals and the way of using it. The distinctions with ant are also detailed.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic