You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by Jeff Hammerbacher <ha...@cloudera.com> on 2010/05/18 10:47:24 UTC

Adding new dependencies to HBase trunk

Hey,

I'm a total Maven n00b, and I'm trying to add Avro's latest release as a
dependency for HBase as part of HBASE-2400. I've opened up the top-level
pom.xml, added the <dependency> information for Avro, and tried to run mvn
-DskipTests install. The compilation fails, since some of my new files use
Avro classes, and for some reason the Avro jar is not downloaded (it does
not show up in ~/.m2/repository/...).

You can see the precise change I made to pom.xml at
http://github.com/hammer/hbase-trunk-with-avro/commit/92c0e08b52cc9b41f28d26cb571ac1511f457c76#diff-9
.

Could anyone with more Maven knowledge help me debug this build issue, or at
least give me some pointers on where to look?

Thanks,
Jeff

Re: Adding new dependencies to HBase trunk

Posted by Jeff Hammerbacher <ha...@cloudera.com>.
Hey Lars,

That seemed to work. I added an entry to the HBase Maven primer:
http://wiki.apache.org/hadoop/Hbase/MavenPrimer#newjar. Feel free to clarify
with the reason this works.

Thanks,
Jeff

On Tue, May 18, 2010 at 2:23 AM, Lars Francke <la...@gmail.com>wrote:

> > Could anyone with more Maven knowledge help me debug this build issue, or
> at
> > least give me some pointers on where to look?
>
> That's a simple thing to fix: You have added the dependencies to the
> "dependencyManagement" section. That just tells other modules that use
> this pom "Hey, if you want one of these dependencies I've already
> configured everything for you so you don't have to specify a version
> or the excludes.". But it is a "template" you have to add those
> dependencies to a <dependency> section somewhere. At the moment the
> easiest thing to do (as we'll move around the maven stuff anyway) is
> to just move all the dependencies you've defined in the top-level pom
> to the core/pom.xml file's <dependency> section[1]
>
> I hope that helps.
>
> Cheers,
> Lars
>
> [1]
> http://github.com/hammer/hbase-trunk-with-avro/blob/trunk/core/pom.xml#L162
>

Re: Adding new dependencies to HBase trunk

Posted by Lars Francke <la...@gmail.com>.
> Could anyone with more Maven knowledge help me debug this build issue, or at
> least give me some pointers on where to look?

That's a simple thing to fix: You have added the dependencies to the
"dependencyManagement" section. That just tells other modules that use
this pom "Hey, if you want one of these dependencies I've already
configured everything for you so you don't have to specify a version
or the excludes.". But it is a "template" you have to add those
dependencies to a <dependency> section somewhere. At the moment the
easiest thing to do (as we'll move around the maven stuff anyway) is
to just move all the dependencies you've defined in the top-level pom
to the core/pom.xml file's <dependency> section[1]

I hope that helps.

Cheers,
Lars

[1] http://github.com/hammer/hbase-trunk-with-avro/blob/trunk/core/pom.xml#L162