Ok, I had some problems with source:jar plugin yesterday where because the pom was in the same directory as the source files, the com/... was ignored thus making the java source files top level in the source.jar file.

Yes I could branch the plugin locally and make it accept the package to prepend, but this is obviously less than ideal, and I'm noticing this sort of problem elsewhere. But this is just part of a bigger problem for me and so I have some questions to the maven community.

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.

I can think of two styles for tackling this problem. Firstly start off with a single source tree and then use a cunning system of drive mapping to make it look as though there are several source trees. Don't know how I'd filter just on the package of interest, but I probably don't care as I hate the idea of using the file system like this.

Or persuade Maven to just see a certain package, maybe with an Ant style includes filter. I think I've seen something like this in the docs, but I'm hoping I don't have to repeat it for all plugins - ie compiler jar etc. I'd like to tell a particular pom that: here is the filter, that is the world that you can see.

In fact I have written an eclipse plugin that creates an eclipse project with an includes filter that successfully reduces eclipse's view of my code, but I've based it on the pom being in the same directory as the code. I wonder if a better structure might be as follows:

com [foo.pom, bar.pom, baz.pom, foo.eclipse, bar.eclipse, baz.eclipse]
----acme
--------foo [MyApp.java, MyAppTest.java]
------------resources [pic.gif]
------------webapp [you know]
--------bar [MyApp.java, MyAppTest.java]
------------resources [pic.gif]
------------webapp [you know]
--------baz [MyApp.java, MyAppTest.java]
------------resources [pic.gif]
------------webapp [you know]

My first attempt had the eclipse and pom files in the package itself, but neither eclipse or maven play nicely with that. So I think to stand any chance they would need to occupy the same namespace, top level or com.

Before I spend time on it, would this work??

Apologies for the long winded post, especially if there is a simple answer that says: 'here's what you should do' but I haven't seen anything in the docs that offers any clues.

Thanks
AW

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

Reply via email to