Hi,
I'm refactoring a build system for a fairly large product based on
roughly 50 maven projects and I'm trying to understand the correct way
to configure the relationships between my POM's. I understand the basic
how it works from reading the manual but now I'm looking for the "why".
The product have several sub features which are packages as JARs and
WARs in EARs in RPMs. The JARs and the WARs has a many to one
relationship with the EARs. The EARs has a one to one relationship to
the RPMs. Each sub feature is a RPM. I want to achieve a system where I
can invoke a mvn package on any level (JAR/WAR, EAR or RPM) in a sub
feature and trigger a complete rebuild on required components, rather
then fetching them for the repository (mainly to ensure that the code is
freshly complied but this might be an ancient way of thinking?). The sub
features has well-defined interfaces between each other and is also
developed by different teams spread across multiple time zones, so I
think that using a repository there and not enforcing recompilation is
the way to go.
If I understand correctly (and what my testing has shown me) is that the
only way to trigger a recompilation is by using the <modules> tag (I
would have thought this could be done by <dependency> +
<scope>compile</scope> but it doesn't seams to work for me). If I where
to use the <modules>-tag in the RPM to point out EAR and in the EAR to
point out several JARs and WARs it would force me to specific each
project type as pom, rather then jar, ear, war and rpm, so this seams
wrong to me. I have also tried to create a aggregating POM specifying
the JARs, WARs, EAR and RPM as <modules> which works if I do mvn package
on the aggregating POM, but not on the, for example, RPM (it won't
compile the JAR, WAR & EAR).
Using the parent tag obviously won't achieve the effect I'm looking for,
as the parent can't know what child projects it has, and therefore won't
compile them (even if the child projects the inherit certain behavior
from the parent, which is helpful).
So I guess my question is, is it possible to achieve the typ of POM
relationships that I'm looking for? Or am I misunderstanding some basic
feature in Maven? Or am I undervaluing the whole repository
architecture, even for projects that are so closely related as the
JAR/WAR->EAR->RPM dependency chain?
Thanks in advanced for any help, kindly
Andreas
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email