Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Maven and its capabilities

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I'm just kind of new to Maven and in the process of migrating from ANT. So wondering how Maven will help to build, test and deploy to destination serves (kind of end to end build tool).

Can someone share their experience and/or thoughts?

Thanks in advance,
Bala.
 
Saloon Keeper
Posts: 22260
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maven differs from Ant in that it's designed to do specific functions on specific filesets. Ant is more general.

The advantages of Maven are:

1. It automatically retrieves all the components to achieve a goal

2. It enforces a consistent filesystem structure on projects (whether you like it or not).

3. You don't have to do a lot of detailed coding of how to build, test, deploy, etc. In Ant you'd have to spell out the rules. In Maven, since the structure is more rigidly defined, the rules are mostly builtin. Also, since there are so many builtin actions, it's easier to support the odds and ends like documentation and unit testing, since you don't have to take the time and effort to set up explicit rules for them.

Maven is at its best where large, possibly distributed teams are working on complex projects built with the assistence of a large number of external components and where having a standardized project layout will make it easier for people to jump in and get to work. Most of the jakarta apache projects are Maven projects.
 
Bala Raj
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Tim for spelling out the advantageous of Maven.

It seems Maven can help to compile and create the binary files. At the same time I'm wondering what kind of configuration and coding is required to do the following:

1- Pull code from a source control (such as ClearCase, SubVersion)
2- Do a build
3- Run some unit tests
4- Deploy to destination servers
5- Schedule and run 1 through 4
6- Notify the users the outcome

Will I be able to achieve the above with Maven? If not what kind of tools do I need to achieve the above?

Regards
Bala.

[ April 24, 2007: Message edited by: Bala Rajamani ]
[ April 24, 2007: Message edited by: Bala Rajamani ]
 
Tim Holloway
Saloon Keeper
Posts: 22260
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With the right plug-ins, Maven can do pretty much anything.

If I'm not too confused (since I haven't used Maven in a few months), all of what you want except for the first step are pretty much commonplace. The reason that Maven wouldn't be fetching source code is that A) first it needs to know what project you're working on and B) you wouldn't want source code fetches to overwrite your modifications. However, that's for the project base code. I can see cases where you'd want Maven to fetch sources for secondary items that don't come in as binary/jar files.

The apache projects normally run an automated nightly build cycle, and they do do exactly all of what you asked about, including creating updated javadocs and manuals, running unit tests and publishing test reports, etc. I forget what the controlling process for that is - it may be gump.
 
This is awkward. I've grown a second evil head. I'm going to need a machete and a tiny ad ...
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic