aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Wanted: Tutorial on How to convert Ant to to Maven? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Wanted: Tutorial on How to convert Ant to to Maven?" Watch "Wanted: Tutorial on How to convert Ant to to Maven?" New topic
Author

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

Siegfried Heintze
Ranch Hand

Joined: Aug 11, 2000
Posts: 386
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

Joined: Jan 23, 2002
Posts: 11962
    
    5
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 ]

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Sreenivas Mangasandra
Greenhorn

Joined: Dec 16, 2004
Posts: 10
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.


Regards,<br /> <br />Sreenivas
D BAELI
Greenhorn

Joined: Sep 03, 2005
Posts: 1
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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Wanted: Tutorial on How to convert Ant to to Maven?