At 07:09 AM 9/8/2005, Ashley Williams wrote:

I work with many projects that are based around a single source tree
- by that I mean no matter how many modules and jars are build, there
is just one directory called com with all the code underneath it. I'm
not saying this is better or worse than the structure expected by
Maven 2 out the box (don't want to sign up for that war!!), but I
still need to find some practical solutions

1. The big one: is Maven 2 ever going to provide deliberate support
projects that are based around a single source tree? Or is it deemed
that the single source tree customers are too few to bother with.

2. Has anyone else gone through the same difficulties as I seem to be
having - I'd love to hear of your strategies.

Ashley,

For what its worth, I've been porting a number of projects to M1 and M2 by breaking up single source trees into the multiple subprojects "expected" by Maven. So far I've found that to work very nicely and from my perspective it actually makes the code much easier to think about and manage.

I can't speak for the Maven developers, but I would think that the likelihood of Maven's being reworked to support multiple artifacts from a single source tree is low, unless for some reason a group decides to fork the code. I think that if I were you, and I wanted to get at least some of the advantages of Maven but retain a non-compliant single tree layout, I would scale back my expectations of using many of Maven's features and use the M2 provided Ant integrations to take advantage of as many Maven capabilities as were "easy" to access. Fighting one's toolset sounds like a most unpleasant task to me.

You might want to take a look at Javagen Jam, as it provides what I have found to be a really nice Maven to Ant integration, and it uses the Ant import task to create importable, reusable chunks of Ant code, which are not as expressive as Jelly, but can be very powerful. In addition you could look at using the Ant tasks presetdef and macrodef in concert with the import task to create higher level wrappers around existing Ant tasks.

You mentioned drive mapping, so I imagine that you are developing on Windows. I realize that it is pretty ridiculous of me to suggest that you move your development to a Unix box, but Unix supports soft links, which ought to make the task of simulating multiple source trees from a single source tree much easier.

As a possibility for the future, Trygve Laugstol is working on creating an embedded M2 implementation. M2 is much faster than M1, and Maven supports a -f <alternate-pom>.xml flag, so it might be possible to break your required processing into a set of poms and invoke them serially.

Again, I would want to caution you, very few people ever win fighting city hall. :-)

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to