You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Daniel Beland <dc...@gmail.com> on 2007/04/23 13:11:07 UTC

how to exclude modules

Hi,


I have some questions about aggregation modules in maven2.

Let me explain how we were working with maven 1.1 and why I don`t fully
understand how we should work with maven 2.

We have some maven 1 multi-projects saved in CVS as a single project.
A developer checks out the complete project in 1 operation.

Most of the time, it consists of N jar artifacts to be included in a webapp.
Since we do not modify all the N artifacts but just a subset of them between
each release, we would work intensively with the
maven.multiproject.excludesproperty to set only the projects we want
to build between each release
(projects that are SNAPSHOT and are needed in the webapp project.xml, and it
means we reset the value to all projects every time we release a beta).
Since the rest is already released (be it production version or previous
unchanged beta), there is no need to compile and deploy them again the next
time.

Now in maven 2, there is no such property.
After a release, everything is put back to SNAPSHOT, even all the
dependencies in the webapp pom (as I understand it would do).
How can I release a project and have only each artifact's current version
set to SNAPSHOT, but have the webapp dependencies left to the just released
version?
(Keep in mind I didn't release an aggregation module with inter-dependencies
yet and maybe it is not what it does).

How can I have something similar to maven.multiproject.excludes?
Should I comment the modules I don't want to compile in the pom?


Finally, is it in your opinion better to simply have N projects in CVS other
than a big aggregation project to achieve what I want?
(But would still use the same parent pom, I would just release each
sub-module independently and have better control on what to release each
time).
My only concern with that is the major refactoring of the CVS modules and
losing all the file history.

Thanks for your input,
Daniel

Re: how to exclude modules

Posted by Daniel Beland <dc...@gmail.com>.
1- I know, but sadly it is not enough to justify the move to my manager! :(

2- Good idea, I can define a profile per module + 1 for all, and enable only
the specific profiles I need.

My only problem is that the release plugin will still update all
dependencies to SNAPSHOT in my webapp pom, I'm not sure I like that idea,
maybe I can patch the plugin to work differently!


Thanks for your help!


On 23/04/07, Wayne Fay <wa...@gmail.com> wrote:
>
> 1. Move to Subversion. File refactoring does not lose history.
>
> 2. There is no module excludes. Instead we have a notion of profiles
> in M2. So you would set your default in the top parent pom.xml to have
> say either zero or very few modules defined, and then in a separate
> profile (call it "all"), you would have all modules listed.
>
> Thus when you normally built your project from the top parent dir,
> only the default modules would be built. But then when you specified
> -Pall, all your modules would be built.
>
> Perhaps this gives you something to think about. I'm not sure if it
> solves all your problems.
>
> Wayne
>
> On 4/23/07, Daniel Beland <dc...@gmail.com> wrote:
> > Hi,
> >
> >
> > I have some questions about aggregation modules in maven2.
> >
> > Let me explain how we were working with maven 1.1 and why I don`t fully
> > understand how we should work with maven 2.
> >
> > We have some maven 1 multi-projects saved in CVS as a single project.
> > A developer checks out the complete project in 1 operation.
> >
> > Most of the time, it consists of N jar artifacts to be included in a
> webapp.
> > Since we do not modify all the N artifacts but just a subset of them
> between
> > each release, we would work intensively with the
> > maven.multiproject.excludesproperty to set only the projects we want
> > to build between each release
> > (projects that are SNAPSHOT and are needed in the webapp project.xml,
> and it
> > means we reset the value to all projects every time we release a beta).
> > Since the rest is already released (be it production version or previous
> > unchanged beta), there is no need to compile and deploy them again the
> next
> > time.
> >
> > Now in maven 2, there is no such property.
> > After a release, everything is put back to SNAPSHOT, even all the
> > dependencies in the webapp pom (as I understand it would do).
> > How can I release a project and have only each artifact's current
> version
> > set to SNAPSHOT, but have the webapp dependencies left to the just
> released
> > version?
> > (Keep in mind I didn't release an aggregation module with
> inter-dependencies
> > yet and maybe it is not what it does).
> >
> > How can I have something similar to maven.multiproject.excludes?
> > Should I comment the modules I don't want to compile in the pom?
> >
> >
> > Finally, is it in your opinion better to simply have N projects in CVS
> other
> > than a big aggregation project to achieve what I want?
> > (But would still use the same parent pom, I would just release each
> > sub-module independently and have better control on what to release each
> > time).
> > My only concern with that is the major refactoring of the CVS modules
> and
> > losing all the file history.
> >
> > Thanks for your input,
> > Daniel
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: how to exclude modules

Posted by Wayne Fay <wa...@gmail.com>.
1. Move to Subversion. File refactoring does not lose history.

2. There is no module excludes. Instead we have a notion of profiles
in M2. So you would set your default in the top parent pom.xml to have
say either zero or very few modules defined, and then in a separate
profile (call it "all"), you would have all modules listed.

Thus when you normally built your project from the top parent dir,
only the default modules would be built. But then when you specified
-Pall, all your modules would be built.

Perhaps this gives you something to think about. I'm not sure if it
solves all your problems.

Wayne

On 4/23/07, Daniel Beland <dc...@gmail.com> wrote:
> Hi,
>
>
> I have some questions about aggregation modules in maven2.
>
> Let me explain how we were working with maven 1.1 and why I don`t fully
> understand how we should work with maven 2.
>
> We have some maven 1 multi-projects saved in CVS as a single project.
> A developer checks out the complete project in 1 operation.
>
> Most of the time, it consists of N jar artifacts to be included in a webapp.
> Since we do not modify all the N artifacts but just a subset of them between
> each release, we would work intensively with the
> maven.multiproject.excludesproperty to set only the projects we want
> to build between each release
> (projects that are SNAPSHOT and are needed in the webapp project.xml, and it
> means we reset the value to all projects every time we release a beta).
> Since the rest is already released (be it production version or previous
> unchanged beta), there is no need to compile and deploy them again the next
> time.
>
> Now in maven 2, there is no such property.
> After a release, everything is put back to SNAPSHOT, even all the
> dependencies in the webapp pom (as I understand it would do).
> How can I release a project and have only each artifact's current version
> set to SNAPSHOT, but have the webapp dependencies left to the just released
> version?
> (Keep in mind I didn't release an aggregation module with inter-dependencies
> yet and maybe it is not what it does).
>
> How can I have something similar to maven.multiproject.excludes?
> Should I comment the modules I don't want to compile in the pom?
>
>
> Finally, is it in your opinion better to simply have N projects in CVS other
> than a big aggregation project to achieve what I want?
> (But would still use the same parent pom, I would just release each
> sub-module independently and have better control on what to release each
> time).
> My only concern with that is the major refactoring of the CVS modules and
> losing all the file history.
>
> Thanks for your input,
> Daniel
>

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