You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by RajaPrlabu <co...@gmail.com> on 2013/06/14 03:30:44 UTC

Ant Project Convert To Maven

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 Eclipse
IDE.which is the best 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?1.How to convert Spring MVC Project using Ant convert into
Maven nexus.could u please provide me Following Steps.ThanksRaja k



--
View this message in context: http://maven.40175.n5.nabble.com/Ant-Project-Convert-To-Maven-tp5759284.html
Sent from the Maven - Users mailing list archive at Nabble.com.

Re: Ant Project Convert To Maven

Posted by Hervé BOUTEMY <he...@free.fr>.
the approach i used in a company was in 2 steps:

1. continue to build with Ant, but with Maven Ant Tasks for dependency 
management

2. use Maven to try to build, in parallel with Ant, to check if you get the 
same result. A first result here was to get a reporting site working, even if 
the artifact built by Maven wasn't completely right


Regards,

Hervé

Le jeudi 13 juin 2013 18:30:44 RajaPrlabu a écrit :
> 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 Eclipse
> IDE.which is the best 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?1.How to convert Spring MVC Project using Ant convert into
> Maven nexus.could u please provide me Following Steps.ThanksRaja k
> 
> 
> 
> --
> View this message in context:
> http://maven.40175.n5.nabble.com/Ant-Project-Convert-To-Maven-tp5759284.htm
> l Sent from the Maven - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Ant Project Convert To Maven

Posted by Martin Gainty <mg...@hotmail.com>.
Ron, Russ and myself have experience in both build environments

Ant <pathelement> becomes Maven <dependency> in <dependencies>
Ant Taskdef becomes Maven Mojo which has multiple @goals which you later bind to a maven lifecycle phase
Ant <target> becomes <plugin> in <build><plugins>

Ron is right ...alot of people fight with maven because they dont understand the importance of version specific artifacts deploying in execution environments
having inconsistent versions of libraries leads to runtime exceptions
if you're lucky you'll get a ClassNotFoundException or ClassCastException
if you're not lucky you'll get a Stacktrace which you will have to comb thru to get to the problem

which is the reason is why every build engineer will  learn to become a 'maven maven'

start here
http://maven.apache.org/
 
maven founder has his own website with useful examples and tutorials at
http://www.sonatype.org/

Thanks and Regards,
Martin 
______________________________________________ 
Maven..yiddish for 'all-knowing'
 

 
> Date: Fri, 14 Jun 2013 00:11:53 -0400
> From: rwheeler@artifact-software.com
> To: users@maven.apache.org
> Subject: Re: Ant Project Convert To Maven
> 
> Start by scanning a few of the free books and articles about Maven.
> This will give you a good overview of the Maven way of looking at things.
> 
> I use Eclipse/STS from SpringSource http://www.springsource.org/sts.
> It is a very good Maven IDE and comes ready to go with a single download.
> 
> I am sure that you will find a lot of Netbeans users here who are also 
> happy.
> 
> Maven is driven by convention and is very set in its ways.
> Forget anything that you know about Ant and be prepared to completely 
> rethink your build processes.
> If you try to make Maven into an advanced Ant build, you will have a big 
> fight on your hands until you change your mind.
> Maven will not change its mind about building software no matter how 
> hard you try to bend it to your will.
> 
> Start out with a simple Maven project model and get it working before 
> you try to optimize your process.
> A lot of people get into trouble by trying to implement advanced 
> automation before they get their project to build as a simple Maven project.
> 
> In the end, you will have a much more repeatable build process that can 
> be shared with your team without having to explain the steps.
> It is pretty easy and safe to pick up someone's maven project and 
> rebuild it without having to read their POM files.
> 
> 
> Ron
> 
> On 13/06/2013 11:50 PM, Russell Gold wrote:
> > Hi Raja,
> >
> > Having done this several times, with projects of varying complexity, I am sorry to say that AFAIK there is no automated way to do it. The problem is that ant is a very free form scripting language that allows you to describe builds - but ant writers cannot be guaranteed to do everything the same way.
> >
> > Ant does not require any particular conventions for organizing source trees, invocation of external programs to process code, or even require a single source tree to map to a single artifact. Bottom line is, you're going to have to do the change manually. Now if your project is simple, turning it into a maven build is trivial. But I've spent a couple of works converting one project, and am in the middle of a massive one with a couple of hundred ant scripts and a few dozen special processing steps, that I expect to take several months to convert.
> >
> > Do you have any specific questions about converting your build? How complex is it?
> >
> > - Russ
> >
> >
> > On Jun 13, 2013, at 9:30 PM, RajaPrlabu <co...@gmail.com> 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 Eclipse
> >> IDE.which is the best 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?1.How to convert Spring MVC Project using Ant convert into
> >> Maven nexus.could u please provide me Following Steps.ThanksRaja k
> >>
> >>
> >>
> >> --
> >> View this message in context: http://maven.40175.n5.nabble.com/Ant-Project-Convert-To-Maven-tp5759284.html
> >> Sent from the Maven - Users mailing list archive at Nabble.com.
> > -----------------
> > Come read my webnovel, Take a Lemon <http://www.takealemon.com>,
> > and listen to the Misfile radio play <http://www.gold-family.us/audio/misfile.html>!
> >
> >
> >
> >
> >
> 
> 
> -- 
> Ron Wheeler
> President
> Artifact Software Inc
> email: rwheeler@artifact-software.com
> skype: ronaldmwheeler
> phone: 866-970-2435, ext 102
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
 		 	   		  

Re: Ant Project Convert To Maven

Posted by Ron Wheeler <rw...@artifact-software.com>.
Start by scanning a few of the free books and articles about Maven.
This will give you a good overview of the Maven way of looking at things.

I use Eclipse/STS from SpringSource http://www.springsource.org/sts.
It is a very good Maven IDE and comes ready to go with a single download.

I am sure that you will find a lot of Netbeans users here who are also 
happy.

Maven is driven by convention and is very set in its ways.
Forget anything that you know about Ant and be prepared to completely 
rethink your build processes.
If you try to make Maven into an advanced Ant build, you will have a big 
fight on your hands until you change your mind.
Maven will not change its mind about building software no matter how 
hard you try to bend it to your will.

Start out with a simple Maven project model and get it working before 
you try to optimize your process.
A lot of people get into trouble by trying to implement advanced 
automation before they get their project to build as a simple Maven project.

In the end, you will have a much more repeatable build process that can 
be shared with your team without having to explain the steps.
It is pretty easy and safe to pick up someone's maven project and 
rebuild it without having to read their POM files.


Ron

On 13/06/2013 11:50 PM, Russell Gold wrote:
> Hi Raja,
>
> Having done this several times, with projects of varying complexity, I am sorry to say that AFAIK there is no automated way to do it. The problem is that ant is a very free form scripting language that allows you to describe builds - but ant writers cannot be guaranteed to do everything the same way.
>
> Ant does not require any particular conventions for organizing source trees, invocation of external programs to process code, or even require a single source tree to map to a single artifact. Bottom line is, you're going to have to do the change manually. Now if your project is simple, turning it into a maven build is trivial. But I've spent a couple of works converting one project, and am in the middle of a massive one with a couple of hundred ant scripts and a few dozen special processing steps, that I expect to take several months to convert.
>
> Do you have any specific questions about converting your build? How complex is it?
>
> - Russ
>
>
> On Jun 13, 2013, at 9:30 PM, RajaPrlabu <co...@gmail.com> 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 Eclipse
>> IDE.which is the best 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?1.How to convert Spring MVC Project using Ant convert into
>> Maven nexus.could u please provide me Following Steps.ThanksRaja k
>>
>>
>>
>> --
>> View this message in context: http://maven.40175.n5.nabble.com/Ant-Project-Convert-To-Maven-tp5759284.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
> -----------------
> Come read my webnovel, Take a Lemon <http://www.takealemon.com>,
> and listen to the Misfile radio play <http://www.gold-family.us/audio/misfile.html>!
>
>
>
>
>


-- 
Ron Wheeler
President
Artifact Software Inc
email: rwheeler@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Ant Project Convert To Maven

Posted by Russell Gold <ru...@gold-family.us>.
Hi Raja,

Having done this several times, with projects of varying complexity, I am sorry to say that AFAIK there is no automated way to do it. The problem is that ant is a very free form scripting language that allows you to describe builds - but ant writers cannot be guaranteed to do everything the same way.

Ant does not require any particular conventions for organizing source trees, invocation of external programs to process code, or even require a single source tree to map to a single artifact. Bottom line is, you're going to have to do the change manually. Now if your project is simple, turning it into a maven build is trivial. But I've spent a couple of works converting one project, and am in the middle of a massive one with a couple of hundred ant scripts and a few dozen special processing steps, that I expect to take several months to convert.

Do you have any specific questions about converting your build? How complex is it?

- Russ


On Jun 13, 2013, at 9:30 PM, RajaPrlabu <co...@gmail.com> 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 Eclipse
> IDE.which is the best 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?1.How to convert Spring MVC Project using Ant convert into
> Maven nexus.could u please provide me Following Steps.ThanksRaja k
> 
> 
> 
> --
> View this message in context: http://maven.40175.n5.nabble.com/Ant-Project-Convert-To-Maven-tp5759284.html
> Sent from the Maven - Users mailing list archive at Nabble.com.

-----------------
Come read my webnovel, Take a Lemon <http://www.takealemon.com>, 
and listen to the Misfile radio play <http://www.gold-family.us/audio/misfile.html>!





Re: Ant Project Convert To Maven

Posted by Barrie Treloar <ba...@gmail.com>.
Please have a look at the freely available books at
http://maven.apache.org/articles.html

I'm sure one of these shows you a step by step approach for converting to Maven.
Something along the lines of
1) Write a basic pom that does nothing but invoke ant
2) Start removing bits from Ant and replacing them with the Maven equivalent
...
N) Done

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org