You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Chris Wall <cw...@bea.com> on 2006/06/08 20:52:02 UTC

How to exclude modules from a build lifecycle?

In a mutli-level project, is there a way to exclude modules from a
build?  Our use case is that we want to minimize build lifecycle time
for developer check-ins by excluding less frequently changed modules.
For our full builds (nightly), we obviously want to include all modules.
 
An example would be:  Given that module A is the parent of module B
which has sub-modules 1 and 2, and the parent of module C which has
sub-modules 3 and 4, how might we exclude sub-modules 2 and sub-modules
4 when executing the build of module A.
 
Thanks.
 
-Chris
_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

Re: How to exclude modules from a build lifecycle?

Posted by Wendy Smoak <ws...@gmail.com>.
On 6/8/06, Chris Wall <cw...@bea.com> wrote:

> In a mutli-level project, is there a way to exclude modules from a
> build?  Our use case is that we want to minimize build lifecycle time
> for developer check-ins by excluding less frequently changed modules.
> For our full builds (nightly), we obviously want to include all modules.
>
> An example would be:  Given that module A is the parent of module B
> which has sub-modules 1 and 2, and the parent of module C which has
> sub-modules 3 and 4, how might we exclude sub-modules 2 and sub-modules
> 4 when executing the build of module A.

Profiles?  We (Struts) have some modules that can't be in the 'default
build' because they have dependencies that aren't freely available or
have incompatible licenses.

So 'mvn install' will not build those modules, but 'mvn install -Pextras' will.

HTH,
-- 
Wendy

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


Re: How to exclude modules from a build lifecycle?

Posted by Wayne Fay <wa...@gmail.com>.
Others have asked this question and I've not seen any responses, so
I'll assume there is no obvious/built-in way to exclude certain
modules from being built.

Here's a few alternatives I can think of off the top of my head...
1. Use no modules, only dependencies. Build everything independently.
This breaks the entire concept of parents, modules, full builds etc.
2. Create multiple pom.xml files for your parent. Only include the
specific modules you want to build in each one ie pom_mod1_only.xml
and then specify it when you run your build ie mvn -f
pom_mod1_only.xml. You will need to make sure the other modules have
been built and installed in your local repo prior to attempting this
partial build, of course.

Probably 2 is the best option for your situation.

Wayne

On 6/8/06, Chris Wall <cw...@bea.com> wrote:
> In a mutli-level project, is there a way to exclude modules from a
> build?  Our use case is that we want to minimize build lifecycle time
> for developer check-ins by excluding less frequently changed modules.
> For our full builds (nightly), we obviously want to include all modules.
>
> An example would be:  Given that module A is the parent of module B
> which has sub-modules 1 and 2, and the parent of module C which has
> sub-modules 3 and 4, how might we exclude sub-modules 2 and sub-modules
> 4 when executing the build of module A.
>
> Thanks.
>
> -Chris
> _______________________________________________________________________
> Notice:  This email message, together with any attachments, may contain
> information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
> entities,  that may be confidential,  proprietary,  copyrighted  and/or
> legally privileged, and is intended solely for the use of the individual
> or entity named in this message. If you are not the intended recipient,
> and have received this message in error, please immediately return this
> by email and then delete it.
>
>

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