You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by BRUNOT Sébastien <Se...@vizzavi.fr> on 2003/07/08 14:05:55 UTC

Multiple source module to build one deployment unit in one step.. .

Hi,

Do you see a way to achieve with maven the build of one deployment unit
(jar, war, ear...), the sources of which beeing dispatched in multiples cvs
modules... All that without using dependencies ?

<module CVS 1>
<module CVS 2>  ====> MAVEN ====> Deployment unit (myDU.1.0.ear)
<module CVS 3>

I know it looks like a strange question, but i just want to make sure maven
isn't designed for this kind of behaviour (in maven, one deployment unit is
one cvs module, and eventually other deployment units delared via
dependencies, isn't it ?)...

Sebastien BRUNOT 

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


Re[2]: Multiple source module to build one deployment unit in one step.. .

Posted by Anton Tagunov <at...@mail.cnt.ru>.
Err.. I have forgotten the last stroke to CVSROOT/modules.
Now the full set of directives looks like

fake11 -d fake/sub1          pr1/sub1 subsub11 subsub12
fake12 -d fake/sub2/subsub21 pr1/sub2/subsub21 \
 subsubsub211 \
 subsubsub212 \
 subsubsub213
fake2  -d fake/sub3 pr2/sub3
fake -a fake11 fake12 fake2

AT> and now you can do
AT>     cvs co fake

now, you _really_ can do it :)

(of course the sample has not been run, but I have
tested similar things, and smth along this lines
is used in a real project I'm working with).

Cheers, Anton


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


Re: Multiple source module to build one deployment unit in one step.. .

Posted by Anton Tagunov <at...@mail.cnt.ru>.
Hello Sebastien!

BS> I know it looks like a strange question, but i just want to make sure maven
BS> isn't designed for this kind of behaviour (in maven, one deployment unit is
BS> one cvs module, and eventually other deployment units delared via
BS> dependencies, isn't it ?)...

You can probably use cvs features to make
fragments of several projects appear to be
one project.

You do it by 'co'-ing CVSROOT/modules, editing
it and 'ci'-ing it in.

Here is a sample. Imagine you have projects
pr1 and pr2 and the following directory structure
under them:

pr1
 |
 +--sub1
 |   |
 |   +----subsub11
 |   |
 |   +----subsub12
 |   |
 |   +----subsub13
 |
 +--sub2
     |
     +----subsub21
             |
             +------subsubsub211
             |
             +------subsubsub212
             |
             +------subsubsub213
             |
             +------subsubsub214

pr2
 |
 +--sub3
 |
 +--sub4

I'll show how to construct the "virtual"
project fake with the following dir structure


fake
 |
 +--sub1
 |   |
 |   +----subsub11
 |   |
 |   +----subsub12
 |
 +--sub2
 |   |
 |   +----subsub21
 |           |
 |           +------subsubsub211
 |           |
 |           +------subsubsub212
 |           |
 |           +------subsubsub213
 |
 +--sub3


to do it you put the following directives into
CVSROOT/modules:

fake11 -d fake/sub1          pr1/sub1 subsub11 subsub12
fake12 -d fake/sub2/subsub21 pr1/sub2/subsub21 \
 subsubsub211 \
 subsubsub212 \
 subsubsub213
fake2  -d fake/sub3 pr2/sub3

and now you can do

    cvs co fake

and really get it :-)

Naturally with the argument of -d option you can
move the "mounting points" around your "fake" tree.

Directories from pr1 and pr2 (or even inside pr1)
may overlap. I guess there's some rule for which
version will win. Also in the overlap case I'm
not sure as to how the 'ci' command is handled
(it does work, just not sure where actually the
file will be ci-ined. I guess there's a rule for
that and probably experiment will help to learn
that.

Note that can not have a "real" project called
"fake" at the same time.

My mail can't give more details but the docs on cvs
(available for instance from
http://www.cvshome.org/docs/)
are quite simple and quick to read. (You will
probably learn enough in 2-3 hours.) Note that
windows port of cvs operating on the :local:
repository ignores the CVSROOT/modules file,
but the *nix ones don't (at least Linux one
does not :-)

This all being said, I have not yet answered
the question about multiple repositories for
maven. But I haven't learned Maven enough
to say if it's a good or a bad idea and etc.

-Anton


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