If you take the axis archetype example
you have something like this :

parent-project
+-- pom.xml (packaging = pom, modules= jspg-core, jspg-webapp)
+-- jspg-core
|   +-- pom.xml (packaging = jar)
+-- jspg-webapp
    +-- pom.xml (packaging = war, dependency = jspg-core)

Do not forget to add the parent element in the child poms.

When you call mvn install in the parent pom directory,
Maven will install the parent pom in your local repository,
then it will compile, test, and install the pom AND jar of jspg-core in your
local repository
then it will compile, test, and install the pom AND war of jspg-webapp
(including the jspg-core.jar) in your local repository

Regards,

Raphaël

2006/4/6, Raymond Domingo <[EMAIL PROTECTED]>:
>
> Hi Piéroni Raphaël,
>
> Thank you for responding,
> it might be a solution...
>
> So if I understand you correctly I don't need to change my dir structure
> to do
> this, currently we have one large project which should remain this way for
> now.
>
> in /pom.xml (root pom) I will use <packaging>jar</packaging> this will be
> the
> spg.jar
>
> And in /subdir/of/root/pom.xml I will use <packaging>war</packaging> this
> will
> create my war, and by setting my parent in this pom it will include my jar
> from the parent pom.
>
> Did I understand this correclty, or do I also need to add dependencies to
> this
> pom ?
>
> Because I'm new to maven I still find it hard to use the dependency
> mechanishm. It's not completely clear to me if dependencies always need to
> be
> in a mvnrepository before they can be used, or if (this is what we need)
> the
> spg.jar just build can be used when packaging my war file without first
> releasing it in a mvnrepository.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to