I have used profiles activated by the presence of the pom.xml file in
the sub-module

so you have

if A/pom.xml exists then add module A
if B/pom.xml exists then add module B

-Stephen

On 9 November 2010 20:59, Ben Caradoc-Davies
<ben.caradoc-dav...@csiro.au> wrote:
> You can use profiles to enable the optional building of submodules (you can
> use a top-level aggregating pom if the projects are distinct). Note that, if
> you have built a module locally, maven will use the version from your local
> repo if it is newer than a deployed version. If not built locally, maven
> will download the dependency from a remote repo. I think this is what you
> want.
>
> When you run maven, specify -P options to enable profiles to turn on
> optional submodules. You can have multiple profiles active at once:
> http://maven.apache.org/guides/introduction/introduction-to-profiles.html
>
> As an example, GeoTools and GeoServer use profiles to enable the building of
> optional plugins. Here is the pom for unsupported GeoTools plugins:
> http://svn.osgeo.org/geotools/trunk/modules/unsupported/pom.xml
>
> A similar technique is used for GeoServer extensions:
> https://svn.codehaus.org/geoserver/trunk/src/extension/pom.xml
>
> Kind regards,
> Ben.
>
> On 10/11/10 06:36, KARR, DAVID (ATTSI) wrote:
>>
>>  I currently work on a large enterprise app built with Ant.  The app is
>> divided into several projects divided into functional areas.  In order
>> to build the entire EAR, all of the projects have to be built, even if
>> you're only working on a single one of those projects.
>>
>> I'm examining how we could make this work better if we were using Maven.
>>
>> I guess a straightforward implementation of this would have a main
>> project POM that specifies all the subprojects as submodules, and also
>> their artifacts as dependencies.
>>
>> It almost seems to me that what I need is the ability to have the main
>> POM be somewhat "dynamic", such that if I'm only working on a single one
>> of those subprojects, but I need to assemble the EAR containing all of
>> the artifacts, then the projects that I don't have checked out would get
>> their submodule entry temporarily deleted, and I would get their
>> artifacts from the intranet repo.
>>
>> I would be using m2eclipse.
>>
>> Does any of this make sense?
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
>> For additional commands, e-mail: users-h...@maven.apache.org
>>
>>
>
>
> --
> Ben Caradoc-Davies <ben.caradoc-dav...@csiro.au>
> Software Engineering Team Leader
> CSIRO Earth Science and Resource Engineering
> Australian Resources Research Centre
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to