If this was me I would create a new pom, which would be the parent for
the 3 libraries, I would then also build at that level.

e.g.
~/mavenprojects/pom.xml (packaging pom)
~/mavenprojects/myLib1/pom.xml (packaging jar)
~/mavenprojects/myLib2/pom.xml (packaging jar)
~/mavenprojects/myLib3/pom.xml (packaging jar)

Basically that is how every project I've worked on works. You have to
define the parent and relative Path correctly in the lib projects, and
add modules into the parent pom. Basically one pom per thing,
sometimes over kill but often easier then scaling projects up or
moving between projects.

We have ~65 pom on my main project, ~15 are pom's to logically group
functionaility, some are simply a single wsdl or xsd, others are the
jpa layer.

Others might have different views but that is how I'd do it.

On 15 October 2012 12:51, Lucio Crusca <lu...@sulweb.org> wrote:
> Hello *,
>
> I'm new to maven. I'd like to mavenize three projects of mine. Let's say they
> are myLib1, myLib2 and myLib3. My directory structure is
>
> ~/mavenprojects/myLib1
> ~/mavenprojects/myLib2
> ~/mavenprojects/myLib3
>
> myLib3 depends on myLib1 and myLib2; myLib2 depends only on myLib1. The three
> libraries are in development stage, so I change their code very often. I need
> a maven setup that, when compiling myLib3, automatically compiles myLib1 and
> myLib2 also, if their source code has been changed, and recreates respective
> jars. The same goes for myLib2 in respect to its myLib1 dependency.
>
> I've tried adding myLib1 as a module of myLib2 in myLib2 pom file, but then I
> had to change the packaging to "pom", which stopped maven from compiling and
> packaging myLib2.
>
> Then I considered adding the compiled jars as dependencies, but in this case I
> don't have a maven repository to query, and I don't want to manually install
> myLib1 and myLib2 jars, since that would keep maven from recompiling the
> respective sources.
>
> What's the correct solution in my case?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>

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

Reply via email to