Hi all.
I have just finished to set up a multi-module project. The main
project artifactId is "arte". A lot of the dependency are my own
project so I wanted to have them listed as modules, mainly to obtain
the result that Eclipse project of arte is created referencing the
submodules project rather than the jars.
Now to accomplish this I have the pom.xml for arte, with packaging=jar
and in onother folder I have the multi-module pom, call it arte-super
that contains the multi-module specifications:
<modules>
<module>../parent</module>
<module>../jin-collections</module>
<module>../stuff</module>
<module>../jocker</module>
[...]
</modules>
I have used the so called flat project layout
(http://maven.apache.org/plugins/maven-eclipse-plugin/reactor.html)
Everything works. If I go in arte-super folder and write "mvn
eclipse:eclipse" the arte eclipse project is created the way I desire.
If I write "mvn install" all the packages in the modules are
installed. Very good.
I am wondering about two marginal things but you know, when you start
to seriously automate your project, tendency is to have a real clean
environment that allow the better comprehension of the whole.
First: the arte-super is a "parent" module? I mean, I use parent when
I want to use pom inheritance. When I have a pom packaged project that
just have modules definition, like arte-super, is it a parent project?
It seems to me that targets are different.
A parent project contains some commons definition like developers,
url, distribution-management, repositories and such.
The super project contains modules definition. They just share the
packaging=pom.
Maybe is just a detail, but I think is important to clarify the intent
and scope of every aspect of project comprehension.
Again, the folder layout for parent and super project. I have a flat
layout, so arte and arte-super as well as a common parent project for
many of my modules are in the same folder.
What I am thinking is that if a parent project should really stay
there, the super project should stay in a sub folder of the "buddy"
project. To explain: arte-super should stay in a subfolder of arte.
This is because they are intimate connected, they should stay under
the same SCM folder and be checked out together. Then you can choose
to use the super project or not, but you have the choice.
OK, these are my waken-up-too-early Saturday morning thoughts. I know
they sound a little maniacal but I really believe that giving a
concrete a precise meaning to things (parent/super) and standardize
every aspect of a complex project is really useful.
Have a good saturday :)
--
Daniele Dellafiore
http://ildella.wordpress.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]