You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Andrey Ilinykh <ai...@gmail.com> on 2008/11/17 02:50:37 UTC
How to share project?
Hello all!
I have several projects which share the same class library. I don't want to
release that library.
When I create pom file for my library I have to create <parent> element.
After that this library is not reusable any more. If I use eclipse, for
example, I would add dependency to parent project, I don't have to modify
library. How to do the same in maven?
Thank you,
Andrey
Re: How to share project?
Posted by "Walid \"jo\" Gedeon" <wg...@gmail.com>.
Hello Andrey, what do you mean by "After that this library is not reusable
any more"?
Without being sure I understand the situation fully, it looks like you want
your parent project to have a dependency to that library, and then have your
several projects extend that parent project's pom?
So I would say, instead of adding a dependency to the parent project, extend
it.
<project ...>
<groupId>...</groupId>
<artifactId>child-project</artifactId>
<parent>
<groupId>...</groupId>
<artifactId>parent-project</artifactId>
<version>...</version>
<relativePath>../pom.xml</relativePath>
</parent>
...
Please read more on that here:
http://maven.apache.org/guides/introduction/introduction-to-the-pom.html
HTH
w
On Mon, Nov 17, 2008 at 2:50 AM, Andrey Ilinykh <ai...@gmail.com> wrote:
> Hello all!
> I have several projects which share the same class library. I don't want to
> release that library.
> When I create pom file for my library I have to create <parent> element.
> After that this library is not reusable any more. If I use eclipse, for
> example, I would add dependency to parent project, I don't have to modify
> library. How to do the same in maven?
>
> Thank you,
> Andrey
>