You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Joe Germuska <Jo...@Germuska.com> on 2004/06/28 16:24:33 UTC
Building Struts with Maven (was Re: nominate ?)
As one of the people interested in making Maven work for Struts, I'll
just jump in here.
First, it's true that Ant is "the official" build tool for Struts
1.2.x -- it's the thing to use to make releases, etc, and nothing
should be committed that breaks it.
That said, once you have Maven going, you can certainly use it to
compile a Struts JAR that is equally usable to one built by Ant.
Also, as far as I can tell, the Cactus tests run equally well in
Maven -- I have some problems running tests that use cookies in both
Ant and Maven, and have never gotten any feedback from any other
users about it. (To run Cactus tests with Maven, you do have to set
some of the properties in build.properties.)
>Maven disadvantages (to me)
>>>From a 'nurturing the community' perspective, the cost of 'converting' vs.
>the cost of 'starting from scratch' can be more than we can afford right
>now. We seemed to have a lot more participation before the attempt to
>Mavenize began.
I can't believe that the presence of Maven files has scared people
away. I don't have a better explanation for why participation seems
lower than before (not sure I share the perception either) but the
Ant stuff hasn't gone away and hasn't been deprecated.
>I know I've found myself in several "states of mind" (if you will) when
>considering making changes/patches:
> - I don't want to make changes that could break the Maven build.
> - I know how to do foo in Ant, but what is the Maven equivalent?
> - If I add something to the Maven build process, will I get it correct on
>the Ant side?
>
>I absolutely HATE the feeling of intimidation by my lack of knowledge of the
>toolset and rather than pull my hair out learning yet 'another neat tool'
>(pun indented) I (like others I'm sure) find myself fading into the
>background and do simple things here and there where I can.
Even as resident Maven apologist, none of these should be concerns.
Maven is not yet the official build tool for Struts, and it won't be
until it does everything the current Ant build does and there is no
reason for concerns like this. Some might argue that Maven also
shouldn't be official until they finally cut a 1.0 release -- I
wouldn't make that argument, but I might not fight it very vigorously
either. The only thing which is fragile (and which I think has
broken again since last winter when I got it working) is using Maven
to run the Cactus tests. But still, I should hope that no one is
letting that slow them down.
Finally, remember that Maven can run any Ant task. The "maven.xml"
file in the project root directory can be extended with custom goals
which can be nearly 100% direct copies of stuff from a build.xml
file. In fact, given that we have build.xml broken into multiple
files, you could probably simply use an antcall task in maven.xml and
not even copy anything.
But still, I consider Maven a "shortcut" for people who want to work
with the source and build it, but who aren't necessarily interested
in making official releases, building the Struts web site, etc. (I
would like to see it get closer to that, but I haven't had much time
to put into it myself.)
That said, I don't see any reason why someone who wants to submit
patches can't do develop them using Maven instead of Ant.
Joe
--
Joe Germuska
Joe@Germuska.com
http://blog.germuska.com
"In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn
back; I'll know I'm in the wrong place."
- Carlos Santana
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org