maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barrie Treloar <>
Subject Re: Tell maven to not have the parent pom as a dependency?
Date Fri, 12 Sep 2014 05:53:47 GMT
On 12 September 2014 12:55, Kevin Burton <> wrote:

> I have an OSS module in a multi-module maven project.
> I want to post this to a public repo… it’s open source.
> The problem is that the parent module is not OSS.
> When I setup a <dependency> it pulls in my OSS module just fine, but then
> it tries to pull down the parent module, which isn’t in the repo, and
> breaks.
> The parent pom isn’t really a dependency… so I’d like it to not need it
> is this possible?

As Dan says, make it a stand alone project.
i.e. Dont make it a module.

Being a module has a special meaning - "treat this as part of a bigger
It also help with syntatic sugar by allowing you to run one command at the
top and have it propogate into all the modules.

To be complete a module has nothing to do with dependencies or dependency

The reason your OSS module is pulling in the parent is not because of
dependency, but because of inheritance of the parent hierarchy.

Usually all modules are released together and will share version
If they are released independently then you normally wont make them
modules, and their version identifiers can do their own thing.
There is a recent post "Maintaining versions in a multi-module project"
that Stephen answers, you might also want to search the archives on this
topic as well.

A parent pom can be used in two ways; 1) to share common information i.e.
"inheritance" 2) keep related artifacts together to make working on a bug
that traverses artifacts easier i.e "aggregation"

In your case I dont think you need to use aggregation, you just need to
pull out the OSS artifact into its own stand alone location and then
include it as a normal dependency in your non-OSS project.

If you find that you are also fixing bugs in the OSS project at the same
time you are working on the non-OSS one, then you might want to create an
aggregate pom that has two modules (one OSS, the other non-OSS) so that you
can run maven commands in one place against both projects. Stephen Connolly
has some stuff somewhere about that I think.
The freely availble Maven books might also go into this in more detail, but
it tends to be a more advanced feature not well described.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message