On Jul 29, 2008, at 18:52, Mina R Waheeb wrote:
>
> There is another methodology to create a flat structure for all the
> system components and use the idea of svn:externals to link em all as
> described below.
>
> |--- REPO
> |---- comp1.sub.component1
> |---- comp2.sub2.component1
> |---- branches/
> |---- tags/
> |---- trunk/
> |---- pom.xml
> |---- src
> |---- project ()
> |---- pom.xml (Maven project descriptor)
> |---- component 1 (external link to REPO/
> comp2.sub2.component1/trunk)
Go flat, if you can.
repo:
project/
trunk/
pom.xml
tags/
branches/
component1/
trunk/
pom.xml
src
tags/
branches/
component2/
trunk/
pom.xml
tags/
branches/
component2.sub1/
trunk/
pom.xml
tags/
branches/
component2.sub1.sub
trunk/
pom.xml
src
tags/
branches/
In this way, each maven project becomes its own little repository. I
find keeping the structure flat like this simplifies a number of
things. It also works better than nested projects when used with a
combination of m2eclipse + subclipse.
The problem, of course, is that you'll want to be able to refer form
parent poms to their children since it looks like you're doing
multi-module builds. You can use relative paths to your sub-modules:
component2.sub1/pom.xml :
...
<modules>
<module>../component2.sub1.sub
...
</modules>
...
Now that means that you've got to get all your checkouts as siblings.
You could solve this by either scripting the checkout:
for p in project component1 component2 component2.sub1 \
component2.sub1.sub
do
svn co svn://repo/$p/trunk $p
done
Or, you could establish a special class of multi-module checkout
folders using svn externals.
repo:
...
buildbranches/ +---------------+
trunk <--- | svn:externals |
+----------------------------------------------------+
| project svn://repo/project/trunk |
| component1 svn://repo/component1/trunk |
| ... |
| component2.sub1.sub svn://repo/component2.sub1.sub |
+----------------------------------------------------+
When you pull a logical branch across multiple components, it will
result in one svn branch in for each of the components. (These
branches will just all have the same name.) You could use a
buildbranch to pull these together to make it easier to check them out
together.
Anyway, those are my thoughts. This is how I would do it. In fact,
this is how I am doing it. Though I hasten to add that I'm still a
relative beginner in trying to make maven + subclipse + m2eclipse play
nice at the office.
// Ben
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-07-31 09:55:14 CEST