[
https://issues.apache.org/jira/browse/PHOENIX-3139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15404944#comment-15404944
]
Sergey Soldatov commented on PHOENIX-3139:
------------------------------------------
[~apurtell] we need it because it's not a single jar with phoenix classes, but
the fat jar with all dependencies. Compilation artifact is supposed to be
phoenix-hive-<vershion>.jar while the fat jar (assembly) is
phoenix-<version>-hive.jar:
{noformat}
-rw-r--r-- 1 ssoldatov staff 63581842 Aug 2 15:41
phoenix-4.8.0-HBase-1.2-SNAPSHOT-hive.jar
-rw-r--r-- 1 ssoldatov staff 80310 Aug 2 15:41
phoenix-hive-4.8.0-HBase-1.2-SNAPSHOT-sources.jar
-rw-r--r-- 1 ssoldatov staff 40529 Aug 2 15:41
phoenix-hive-4.8.0-HBase-1.2-SNAPSHOT-tests.jar
-rw-r--r-- 1 ssoldatov staff 119511 Aug 2 15:41
phoenix-hive-4.8.0-HBase-1.2-SNAPSHOT.jar
{noformat}
I'm building it using {{mvn clean package}} and never saw that problem. How do
you build it?
> phoenix-hive assembly target overwrites input jar
> -------------------------------------------------
>
> Key: PHOENIX-3139
> URL: https://issues.apache.org/jira/browse/PHOENIX-3139
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 4.8.0
> Reporter: Andrew Purtell
>
> There is a maven-assembly-plugin target in the phoenix-hive module POM not
> present in other extension module POMs like for phoenix-pig or phoenix-flume.
> This assembly target creates a jar-with-dependencies assembly as
> phoenix-hive/target/phoenix-<version>-hive.jar. I think that path is also an
> implicit input to the assembly as the output of the earlier compile phase. I
> say that because I see the build failing with an odd error:
> {noformat}
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-assembly-plugin:2.5.2:single
> (make-jar-with-dependencies) on project phoenix-hive:
> Failed to create assembly:
> Error creating assembly archive jar-with-dependencies:
> Problem creating jar:
> jar:file:/.../phoenix-hive/target/phoenix-hive-<version>.jar!/org/apache/phoenix/hive/mapreduce/PhoenixRecordWriter.class:
> JAR entry org/apache/phoenix/hive/mapreduce/PhoenixRecordWriter.class not
> found in /.../phoenix-hive/target/phoenix-hive-<version>.jar -
> {noformat}
> Makes sense that the archiver can't find a class file in a jar if a writer is
> racing with a reader on the same file.
> What was the intent here? Commenting out the maven-assembly-plugin
> instructions in the phoenix-hive POM fixes (or at least avoids) this problem.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)