avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom White (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AVRO-1417) trevni-avro:hadoop2 depends on avro-mapred:hadoop1
Date Fri, 20 Dec 2013 11:26:11 GMT

     [ https://issues.apache.org/jira/browse/AVRO-1417?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tom White updated AVRO-1417:
----------------------------

    Attachment: pom-workaround.xml
                pom.xml

The attached POM shows the problem.

{noformat}
mvn dependency:tree
...
[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ trevni-bug ---
[INFO] org.example:trevni-bug:jar:1.0.0
[INFO] \- org.apache.avro:trevni-avro:jar:hadoop2:1.7.5:compile
[INFO]    +- org.apache.avro:trevni-core:jar:1.7.5:compile
[INFO]    |  +- org.xerial.snappy:snappy-java:jar:1.0.5:compile
[INFO]    |  \- org.apache.commons:commons-compress:jar:1.4.1:compile
[INFO]    |     \- org.tukaani:xz:jar:1.0:compile
[INFO]    +- org.apache.avro:avro-mapred:jar:hadoop1:1.7.5:compile
[INFO]    |  +- org.apache.avro:avro-ipc:jar:1.7.5:compile
[INFO]    |  |  +- org.apache.avro:avro:jar:1.7.5:compile
[INFO]    |  |  |  \- com.thoughtworks.paranamer:paranamer:jar:2.3:compile
[INFO]    |  |  +- org.mortbay.jetty:jetty:jar:6.1.26:compile
[INFO]    |  |  +- org.mortbay.jetty:jetty-util:jar:6.1.26:compile
[INFO]    |  |  +- io.netty:netty:jar:3.4.0.Final:compile
[INFO]    |  |  +- org.apache.velocity:velocity:jar:1.7:compile
[INFO]    |  |  |  +- commons-collections:commons-collections:jar:3.2.1:compile
[INFO]    |  |  |  \- commons-lang:commons-lang:jar:2.4:compile
[INFO]    |  |  \- org.mortbay.jetty:servlet-api:jar:2.5-20081211:compile
[INFO]    |  +- org.apache.avro:avro-ipc:jar:tests:1.7.5:compile
[INFO]    |  +- org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile
[INFO]    |  \- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13:compile
[INFO]    \- org.slf4j:slf4j-api:jar:1.6.4:compile
{noformat}

The Avro artifacts are published correctly, but when other projects use the trevni-avro artifact
with the hadoop2 classifier, the avro-mapred dependency is the one with the hadoop1 classifier
since the hadoop2 profile in http://repo1.maven.org/maven2/org/apache/avro/trevni-avro/1.7.5/trevni-avro-1.7.5.pom
cannot be activated at dependency resolution time.

There is a simple workaround: specify the hadoop2 version of avro-mapred as an explicit dependency
(see pom-workaround.xml).

One way to fix this would be to publish artifacts with different version numbers (not classifiers)
for avro-mapred and trevni-avro. (This is what Crunch does.) 

> trevni-avro:hadoop2 depends on avro-mapred:hadoop1
> --------------------------------------------------
>
>                 Key: AVRO-1417
>                 URL: https://issues.apache.org/jira/browse/AVRO-1417
>             Project: Avro
>          Issue Type: Bug
>          Components: build, trevni
>            Reporter: Tom White
>         Attachments: pom-workaround.xml, pom.xml
>
>
> The problem is that classifiers are not propagated through the dependency tree, so {{org.apache.avro:trevni-avro:jar:hadoop2:1.7.5}}
will pull in {{org.apache.avro:avro-mapred:jar:hadoop1:1.7.5}}.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Mime
View raw message