commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz" <>
Subject Re: [primitives][collections] primitive collections and PROPOSAL
Date Mon, 08 Sep 2003 08:45:16 GMT
Anton Tagunov wrote:
> Hello Stephen!
> SC>  commons-collections.jar - all Object collections (no primitives)
> SC>  commons-collections-primitive.jar - all primitive collections (no Objects)
> SC> Thus, no package changes, just an additional jar giving users the choice as
> SC> to what they want.
> SC> If you are happy with this approach, then I will make it so in the release.
> SC> Ant shouldn't be a problem, although I'd love to know how Maven copes with
> SC> cases like this ;-)
> Have never done this myself but have read megabytes of talks about
> this on all kinds of lists. The verdict is that you need to have two
> projects in maven sence. Two project.xml (or maven.xml?) files.

You can have a single project with subprojects, using one maven.xml to 
get the multi-project build to work.  I did this recently in the sandbox 
commons-naming component.  I followed these examples provided in an 
earlier post by Eric Pugh:   (maven build-all)  (maven build)

To do it without using Jelly script to execute things manually, the only 
way that I could see to make it work was to break the source tree into 
branches corresponding to the subprojects. So, for example, if you want 
to build org.apache.commons.collection.* (minus primitives) and 
org.apache.commons.collections.primitives.* separately, you would need 
to move from collections/src/... to collections/core/src and 
collections/primitives/src and move the primitives code to the 
primitives tree.  Assuming that core does not depend on primitives, but 
primitives does depend on core, you could add the core jar as a 
dependency in the primitives project.xml and the build should work. 
This is more or less exactly what I did when splitting the resource 
factories out from the core naming stuff in [naming].  I am no maven 
expert, so there is a good chance that there is an easier way to do 
this.  As long as you can split things up as above, however, the 
maven.xml and project.xml setup is very simple.

I would be interested to know if anyone knows a simpler, less disruptive 
approach to make this kind of thing work in maven.

> No other way.
> Anton
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message