phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Purtell (JIRA)" <>
Subject [jira] [Updated] (PHOENIX-1272) Avoid pulling in unintended HBase dependencies in phoenix-core
Date Mon, 22 Sep 2014 18:54:34 GMT


Andrew Purtell updated PHOENIX-1272:
    Attachment: PHOENIX-1272.patch

Attached patch changes hbase-testing-util to test scope and makes it optional, and adds hbase-server
as a dependency of phoenix-core, also marked as optional (or we won't compile).

According to Maven docs "If a user wants to use functionality related to an optional dependency,
they will have to redeclare that optional dependency in their own project." So the dependency
on hbase-server hopefully won't propagate.

Someone with a better handle on Maven then I should review.

> Avoid pulling in unintended HBase dependencies in phoenix-core
> --------------------------------------------------------------
>                 Key: PHOENIX-1272
>                 URL:
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: Andrew Purtell
>            Assignee: Andrew Purtell
>         Attachments: PHOENIX-1272.patch
> I think Phoenix might be pulling in all of the other HBase modules because phoenix-core
specifies the 'hbase-testing-util' HBase module as a dependency, and not at test scope:
> {noformat}
>       <dependencies>
>           <dependency>
>             <groupId>org.apache.hbase</groupId>
>             <artifactId>hbase-testing-util</artifactId>
>             <exclusions>
>               <exclusion>
>                 <groupId>org.jruby</groupId>
>                 <artifactId>jruby-complete</artifactId>
>               </exclusion>
>             </exclusions>
>           </dependency>
>         ...
> {noformat}
> hbase-testing-util doesn't contain any code. It is a module you can use that will pull
in everything needed to start up mini cluster tests, all of the HBase modules including hbase-server
and the compat modules, with compile scope. Maven doc says about compile scope: "This is the
default scope, used if none is specified. Compile dependencies are available in all classpaths
of a project. Furthermore, those dependencies are propagated to dependent projects."
> Other test dependencies in the phoenix-core POM are included at test scope and tagged
as optional, e.g.
> {noformat}
>   <dependency>
>     <groupId>org.apache.hadoop</groupId>
>     <artifactId>hadoop-test</artifactId>
>     <optional>true</optional>
>     <scope>test</scope>
>  </dependency>
> {noformat}
> Perhaps the same should be done for hbase-testing-util ?

This message was sent by Atlassian JIRA

View raw message