1. Maven is not ANT. I assume you have read the Maven books and have tried some projects using Maven. If you are somebody who is used to ANT it will take a while to de-ANT you, so switching an ANT based project over to Maven is a really bad way to learn Maven... OTOH
2. If you have a fairly simple project structure (ie you just are building a jar or a war and not doing fancy stuff) the best bet is to create an empty Maven project structure (one module for each jar and one module for each web app... if you have more than one module create a parent project to hold them all) Then just move the .java files into (module)/src/main/java/ and all the resources into (module)/src/main/resources/ keeping the existing package directory structure... Then repeat the same for any tests you have, .java files into (module)/src/test/java/ and all the resources into (module)/src/test/resources/ All the webapp files go into (module)/src/main/webapp in the layout as for the war, so e.g. the web.xml goes to (module)/src/main/webapp/WEB-INF/web.xml Next you add all the dependencies to the poms, and cross your fingers and do "mvn verify" if that works you are done with ANT and on to Maven. 3. If you have a complex project try to do a migration along the lines of #1 first. On 8 June 2011 09:06, jiapei100 <[email protected]> wrote: > > Hi, all: > > Sorry for my entry-level question. Is it possible for me to convert from an > Ant project to A Maven project from within NetBeans IDE? > > Or, is there any method to convert from an Ant project to a Maven project > using some command line method? Or, any standard method to do so? > > Best Regards > Pei > > -- > View this message in context: > http://maven.40175.n5.nabble.com/How-to-convert-from-Ant-project-to-maven-project-tp4468638p4468638.html > Sent from the Maven - Users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > 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]
