WTP to Maven transfer [message #144025] |
Sun, 16 October 2005 10:45  |
Eclipse User |
|
|
|
Originally posted by: thisisnot.mymail.com
Hi,
We recently realized (better late then never) that we'd like to use some
tools like ant and maven so that we can do continuous integration,
automated testing, code coverage and other goodies. We actually married
WTP while still in M4 (we had some headaches back then) and we still use
it (are are actively monitoring development around it, call us beta
testers, gunny pigs, mad man, early adopters, etc.)
I recently tried to do a couple of tasks that actually create our EAR
bringing together the modules and various artifacts and that part went
ok but it was more trial and error game. Is there a guide of how to
integrate a wtp project to a maven project? Any good tips, blogs, links
you might pass would be very useful. Also if there are any eclipse
plugins for maven (do they support wtp stuff?) which would you choose
and why and last but not least, maven1 or maven2?
|
|
|
Re: WTP to Maven transfer [message #144099 is a reply to message #144025] |
Mon, 17 October 2005 05:59   |
Eclipse User |
|
|
|
Originally posted by: patrick.roumanoff.gmail.com
Srgjan Srepfler wrote:
> Hi,
> We recently realized (better late then never) that we'd like to use some
> tools like ant and maven so that we can do continuous integration,
> automated testing, code coverage and other goodies. We actually married
> WTP while still in M4 (we had some headaches back then) and we still use
> it (are are actively monitoring development around it, call us beta
> testers, gunny pigs, mad man, early adopters, etc.)
> I recently tried to do a couple of tasks that actually create our EAR
> bringing together the modules and various artifacts and that part went
> ok but it was more trial and error game. Is there a guide of how to
> integrate a wtp project to a maven project? Any good tips, blogs, links
> you might pass would be very useful. Also if there are any eclipse
> plugins for maven (do they support wtp stuff?) which would you choose
> and why and last but not least, maven1 or maven2?
I went the other (from maven 1 to wtp).
see http://roumanoff.blogger.com/
There is some basic incompatibilities between the philosphy of maven and
WTP.
One of them isbeing the handling of jar dependencies.
For WTP they need to be in [webapp folder]/WEB-INF/lib
for maven, they just live outside your source tree.
beside that, it's quite easy to configure maven to follow WTP naming
convention.
if you are just getting started with ant/maven, I would go maven 2 all
the way.
Maven 2 is almost released and you seem to like betas...
good luck
Patrick
|
|
|
|
|
Re: WTP to Maven transfer [message #144403 is a reply to message #144129] |
Wed, 19 October 2005 05:54  |
Eclipse User |
|
|
|
Originally posted by: patrick.roumanoff.gmail.com
Rafał Krzewski wrote:
> Patrick Roumanoff wrote:
>
>> There is some basic incompatibilities between the philosphy of maven
>> and WTP.
>> One of them isbeing the handling of jar dependencies.
>>
>> For WTP they need to be in [webapp folder]/WEB-INF/lib
>> for maven, they just live outside your source tree.
>
>
> Not true. You can define a dependency using a classpath variable like
> MAVEN_REPO - it should be copied automatically into the target
> application by the WPT.
Well, it sould, and most of the the time it is.
I described the technique in http://roumanoff.blogspot.com, and used it
with some medium sized projects.
but other stuff is broken if you don't put your jars in WEB-INF/lib
like jsp tag variable validation, see
https://bugs.eclipse.org/bugs/show_bug.cgi?id=112083
and WTP is just slowed down by external dependencies.
What I wanted to point out is the fact that going from maven to WTP is
feasible, but going from WTP to maven is another story, as you need to
ignore the jars in WEB-INF/lib and rebuild the list in you project.xml file.
> I know that Maven2 version of eclipse plugin attempts to generate
> .wtpmodules files automaticaly from maven project descriptor. Don't know
> if they are any good though.
again this is going in the other direction. and the patch was only
comitted 10 days ago and not yet released.
The general idea is that if you want to use continuous integration
tools, you have to go in the other direction: migrate your project to
ant/maven/maven2 and then make it editable/debuggable with WTP.
continuous integration is all about reproductibility. right now WTP is a
bit fresh and prone to radical evolutions/changes. It is not a safe bet
to assume the project is not going to change. You'll be much safer
investing on maven 2.
good luck
Patrick.
|
|
|
Powered by
FUDForum. Page generated in 0.03889 seconds