Jose, My two tips: Of course, I may missed something. But this is in short how I understand things
Ant is a replacement of Make for Java, and much more. Ant is intended to build systems (see Ant Home page). Is you start to massively use Ant you will quickly needs to use External Tools and Tasks. Furthermore you will usually always re-use the same Ant scripts with slightly modifications. The problem with Ant is that different teams can use Ant different ways (I already saw that) leading to never-ending discussion about Ant-Standards in your company. An other problem with ant is that scripts can become very complicated (thus difficult to maintain) if you do not split your project correctly. This is usually due to the fact some people want one script to produce as many artifacts as possible (Kind of Swiss Army Knife). On the other side, Maven is a "Java project Management and Project Comprehension tool" (see http://maven.apache.org). By its nature Maven build projects as Ant. But not only. Maven resolved for me all the drawbacks I mentioned above about Ant. This "magical" effect is due by the fact Maven provide a well defined project structure. But Maven is not only about that. Maven goes far beyond! For example it also provides a consistent way of artifact creation, storage, sharing,... This will help you to re-use software component from the community AND your company. Maven provides a consistent way for "component (bloody-hard-)re-use" Maven promotes cross-project development. In my case I use both Ant and Maven. I use very-very simple Ant script to buld some part of my applications. This is just because Ant is well integrated with my IDE. And Maven for the rest... HTH, Didier. _______________________ Didier Dubois dotBase solutions informatiques SA 25, route des Acacias CH - 1227 Gen�ve Tel. +41 22 301 07 07 Fax. +41 22 301 07 08 Jose Gonzalez Gomez To: Maven Users List <[EMAIL PROTECTED]> <[EMAIL PROTECTED] cc: chnet.com> Subject: Re: Newbie questions - from ant to maven 04/02/2003 12:52 PM Please respond to "Maven Users List" I still don't see the diference or relation between maven.xml and build.xml. From what I read and your answers I understand that maven is thought for the development of a "monolithic" application or library, the one that tipically is bundled in one jar, am I right? So if you need a custom build, you still may use ant... but can you call this build from maven, or must you call ant directly? Please, see inline for more questions... Konstantin Priblouda wrote: >--- Jose Gonzalez Gomez <[EMAIL PROTECTED]> >wrote: > > >> Is this the recommended approach for j2ee >>applications? I mean, I >>was thinking about switching to maven because of all >>the added >>functionalities over ant (source code metrics, cross >>reference source, >>documentation and site generation using xdocs,...) >>but if I have to >>create a maven project for each artifact in my >>application, I think that >>this could become cumbersome for large j2ee >>applications, so maybe I >>would delay adopting maven as my main build tool. >> >> > >It depends what tiers your application has. >If it's only web tier, without EJB ( and produces >single .war file ) then one maven project will be >sufficient. >With java code for your servlet/MVC framework, test >cases and web sources. > >Though I would separate EJB tier into separate >project, >and build them together using reactor. > >I'm working on project which is a big portal with >really different parts. > >So I move all stuff which can be used elsewhere >( like portlet management, persistence/business logic >for applications which could be used from separate web >context ) into separatreprojects, which produce >deployment units ( like ejb-jar ) and client >libraries. > > >This wa I can distribute work on the project parts >between my code velopers ( and sometimes our partner >companies ) > >Then all tested versions of subsystem are integrated >into portal project itself. > >Currently I got following projects: >- validation framework >- portlet management >- persistence layer and business logic for application >- integration project > >In future I plan to add some other projects and >setup common reactor for integration builds. >( and come OS projects I'm using will be also >integrated there. And if they do not have maven build >system yet, I write it myself and try to lobby them to >adopt it :) ) > So do you have this projects in different locations, or could you just create several project.properties (or whatever) to specify the information for this projects and keep all the source under a common location? Currently I'm developing a J2EE application that has a war and two ejb jars, that's why I'm so interested in this issue. Could you please outline you file hierarchy? > > > >>any convention in order to be used by maven? What is >>the relation >>between maven.xml, build.xml, project.xml, >>project.properties? >> >> > >maven xml defines your build goals ( and is mostly not >necessary - not for standart cases ) > Ok, so you could override some of the standard goals and finally call your custom build script if those standard goals doesn't match your interests, couldn't you? Or create new goals... By the way, what are the standard cases? I've seen goals in maven for j2ee:ejb, j2ee:war, etc, but they seem to be oriented for a J2EE application with a single war and a single jar file, am I wrong? I have the feeling that maven is rather inmatture in this sense, I mean, working with a fairly complex J2EE application requires some hacking or workaround to get maven working. >build.xml is POABS ( plain old ant build script ), >possibly generated by maven. >project.xml defines projects tructure and dependencies >project.properties allows fine tuning of goals defined >by maven and your goals > >There is also build.properties which will override >propject.properties and is used for user local >settings ( do not check it in into CVS ) > >regards, > >===== >Konstantin Priblouda ( ko5tik ) Freelance Software developer >< http://www.pribluda.de > < play java games -> http://www.yook.de > >< render charts online -> http://www.pribluda.de/povray/ > > >__________________________________________________ >Do you Yahoo!? >Yahoo! Tax Center - File online, calculators, forms, and more >http://platinum.yahoo.com > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > > > And of course, thank you very much for your kind help. By the way, where are you from? I'm from Spain, and I'm right now trying to stablish as a freelance developer, what about your experience? Regards Jose --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
