[
https://issues.apache.org/jira/browse/HIVE-5610?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13804341#comment-13804341
]
Yin Huai commented on HIVE-5610:
--------------------------------
Not an expert on maven. Here are what I tried...
I first tried
{code}
mvn clean package -DskipTests
{code}
Then, I got the following error when maven was compiling Hive common
{code}
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on
project hive-common: Compilation failure: Compilation failure:
[ERROR]
/home/yhuai/Projects/Hive/hive-trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java:[43,36]
package org.apache.hadoop.hive.shims does not exist
[ERROR]
/home/yhuai/Projects/Hive/hive-trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java:[1027,5]
cannot find symbol
[ERROR] symbol : variable ShimLoader
[ERROR] location: class org.apache.hadoop.hive.conf.HiveConf
[ERROR]
/home/yhuai/Projects/Hive/hive-trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java:[1271,34]
cannot find symbol
[ERROR] symbol : variable ShimLoader
[ERROR] location: class org.apache.hadoop.hive.conf.HiveConf
[ERROR] -> [Help 1]
{code}
After I checked jars of shims, I found classes were not packed in those jars
because of the dir structure. So, I set source dirs for those pom files in
shims, e.g.
{code}
<build>
<sourceDirectory>${basedir}/../src/common-secure/java</sourceDirectory>
<testSourceDirectory>${basedir}/../src/common-secure/test</testSourceDirectory>
</build>
{code}
Then, I got errors when maven was compiling tests of common-secure. For example,
{code}
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile
(default-testCompile) on project common-secure: Compilation failure:
Compilation failure:
[ERROR]
/home/yhuai/Projects/Hive/hive-trunk/shims/common-secure/../src/common-secure/test/org/apache/hadoop/hive/thrift/TestDBTokenStore.java:[26,54]
package org.apache.hadoop.hive.metastore.HiveMetaStore does not exist
{code}
So, I asked maven to not compile tests
{code}
mvn clean install -Dmaven.test.skip=true
{code}
Then, I got
{code}
[ERROR] Failed to execute goal on project hive-service: Could not resolve
dependencies for project org.apache.hive:hive-service:jar:0.13.0-SNAPSHOT:
Could not find artifact org.apache.hive:hive-exec:jar:tests:0.13.0-SNAPSHOT ->
[Help 1]
{code}
Seems the scope of hive-exec:jar:tests:0.13.0-SNAPSHOT in hive-service is test.
Why did maven still try to resolve this dependency?
> Merge maven branch into trunk
> -----------------------------
>
> Key: HIVE-5610
> URL: https://issues.apache.org/jira/browse/HIVE-5610
> Project: Hive
> Issue Type: Sub-task
> Reporter: Brock Noland
> Assignee: Brock Noland
>
> With HIVE-5566 nearing completion we will be nearly ready to merge the maven
> branch to trunk. The following tasks will be done post-merge:
> * HIVE-5611 - Add assembly (i.e.) tar creation to pom
> * HIVE-5612 - Add ability to re-generate generated code stored in source
> control
> The merge process will be as follows:
> 1) svn merge ^/hive/branches/maven
> 2) Commit result
> 3) Modify the following line in maven-rollforward.sh:
> {noformat}
> mv $source $target
> {noformat}
> to
> {noformat}
> svn mv $source $target
> {noformat}
> 4) Execute maven-rollfward.sh
> 5) Commit result
> 6) Update trunk-mr1.properties and trunk-mr2.properties on the ptesting host,
> adding the following:
> {noformat}
> mavenEnvOpts = -Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128
> testCasePropertyName = test
> buildTool = maven
> unitTests.directories = ./
> {noformat}
> Notes:
> * To build everything you must:
> {noformat}
> $ mvn clean install -DskipTests
> $ cd itests
> $ mvn clean install -DskipTests
> {noformat}
> because itests (any tests that has cyclical dependencies or requires that the
> packages be built) is not part of the root reactor build.
--
This message was sent by Atlassian JIRA
(v6.1#6144)