Repository: hive
Updated Branches:
  refs/heads/master 189d3fec2 -> 57f40f71f


HIVE-20451 Metastore client and server tarball issues (Alexander Kolbasov via 
Alan Gates)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/57f40f71
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/57f40f71
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/57f40f71

Branch: refs/heads/master
Commit: 57f40f71ff9275458e743aad0ca460dff2291a4a
Parents: 189d3fe
Author: Alan Gates <ga...@hortonworks.com>
Authored: Fri Aug 31 14:03:09 2018 -0700
Committer: Alan Gates <ga...@hortonworks.com>
Committed: Fri Aug 31 14:03:09 2018 -0700

----------------------------------------------------------------------
 .../tools/TestSchemaToolCatalogOps.java         |   7 ++
 standalone-metastore/metastore-common/pom.xml   |  36 +++----
 .../metastore-common/src/assembly/bin.xml       | 108 -------------------
 .../metastore-common/src/assembly/src.xml       |  53 ---------
 standalone-metastore/metastore-server/pom.xml   |   4 +-
 .../metastore-server/src/assembly/src.xml       |  53 ---------
 standalone-metastore/metastore-tools/pom.xml    |  16 +++
 standalone-metastore/pom.xml                    |  32 +++++-
 standalone-metastore/src/assembly/src.xml       |  55 ++++++++++
 9 files changed, 124 insertions(+), 240 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/57f40f71/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/tools/TestSchemaToolCatalogOps.java
----------------------------------------------------------------------
diff --git 
a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/tools/TestSchemaToolCatalogOps.java
 
b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/tools/TestSchemaToolCatalogOps.java
index 42eb979..43c0b96 100644
--- 
a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/tools/TestSchemaToolCatalogOps.java
+++ 
b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/metastore/tools/TestSchemaToolCatalogOps.java
@@ -44,6 +44,7 @@ import org.junit.Test;
 
 import java.io.File;
 import java.io.IOException;
+import java.io.PrintStream;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.Set;
@@ -56,6 +57,8 @@ public class TestSchemaToolCatalogOps {
   private static HiveConf conf;
   private IMetaStoreClient client;
   private static String testMetastoreDB;
+  private static PrintStream errStream;
+  private static PrintStream outStream;
   private static String argsBase;
 
   @BeforeClass
@@ -76,6 +79,8 @@ public class TestSchemaToolCatalogOps {
     String passWord = MetastoreConf.getPassword(conf, 
MetastoreConf.ConfVars.PWD);
     schemaTool.setUserName(userName);
     schemaTool.setPassWord(passWord);
+    errStream = System.err;
+    outStream = System.out;
 
     argsBase = "-dbType derby -userName " + userName + " -passWord " + 
passWord + " ";
     execute(new SchemaToolTaskInit(), "-initSchema"); // Pre-install the 
database so all the tables are there.
@@ -87,6 +92,8 @@ public class TestSchemaToolCatalogOps {
     if (metaStoreDir.exists()) {
       FileUtils.forceDeleteOnExit(metaStoreDir);
     }
+    System.setOut(outStream);
+    System.setErr(errStream);
   }
 
   @Before

http://git-wip-us.apache.org/repos/asf/hive/blob/57f40f71/standalone-metastore/metastore-common/pom.xml
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/pom.xml 
b/standalone-metastore/metastore-common/pom.xml
index 334adf8..b05d434 100644
--- a/standalone-metastore/metastore-common/pom.xml
+++ b/standalone-metastore/metastore-common/pom.xml
@@ -446,28 +446,6 @@
       <!-- TODO MS-SPLIT javadoc plugin -->
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-assembly-plugin</artifactId>
-        <version>${maven.assembly.plugin.version}</version>
-        <executions>
-          <execution>
-            <id>assemble</id>
-            <phase>package</phase>
-            <goals>
-              <goal>single</goal>
-            </goals>
-            <configuration>
-              <finalName>apache-hive-metastore-${project.version}</finalName>
-              <descriptors>
-                <descriptor>src/assembly/bin.xml</descriptor>
-                <descriptor>src/assembly/src.xml</descriptor>
-              </descriptors>
-              <tarLongFileMode>gnu</tarLongFileMode>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-enforcer-plugin</artifactId>
         <executions>
           <execution>
@@ -618,6 +596,20 @@
           <sourceDirectory>${basedir}/src/main/java</sourceDirectory>
         </configuration>
       </plugin>
+      <plugin>
+        <!-- Suppress source assembly -->
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>assemble</id>
+            <phase>none</phase>
+            <goals>
+              <goal>single</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>
 

http://git-wip-us.apache.org/repos/asf/hive/blob/57f40f71/standalone-metastore/metastore-common/src/assembly/bin.xml
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/assembly/bin.xml 
b/standalone-metastore/metastore-common/src/assembly/bin.xml
deleted file mode 100644
index 5992a48..0000000
--- a/standalone-metastore/metastore-common/src/assembly/bin.xml
+++ /dev/null
@@ -1,108 +0,0 @@
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<assembly
-  xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2";
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-  
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
 http://maven.apache.org/xsd/assembly-1.1.2.xsd";>
-
-  <id>bin</id>
-
-  <formats>
-    <format>dir</format>
-    <format>tar.gz</format>
-  </formats>
-
-  <baseDirectory>apache-hive-metastore-${project.version}-bin</baseDirectory>
-
-  <dependencySets>
-    <dependencySet>
-      <outputDirectory>lib</outputDirectory>
-      <unpack>false</unpack>
-      <useProjectArtifact>true</useProjectArtifact>
-      <useStrictFiltering>true</useStrictFiltering>
-      <useTransitiveFiltering>true</useTransitiveFiltering>
-      <excludes>
-        <exclude>org.apache.hadoop:*</exclude>
-        <exclude>org.slf4j:*</exclude>
-        <exclude>log4j:*</exclude>
-      </excludes>
-    </dependencySet>
-  </dependencySets>
-
-  <fileSets>
-    <fileSet>
-      <directory>${project.basedir}</directory>
-      <excludes>
-        <exclude>target/**</exclude>
-        <exclude>.classpath</exclude>
-        <exclude>.project</exclude>
-        <exclude>.settings/**</exclude>
-        <exclude>lib/**</exclude>
-      </excludes>
-
-      <includes>
-        <include>README.txt</include>
-        <include>LICENSE</include>
-        <include>NOTICE</include>
-      </includes>
-      <outputDirectory>/</outputDirectory>
-    </fileSet>
-
-    <fileSet>
-      <directory>${project.basedir}/binary-package-licenses</directory>
-      <includes>
-        <include>/*</include>
-      </includes>
-      <excludes>
-        <exclude>/README</exclude>
-      </excludes>
-      <outputDirectory>binary-package-licenses</outputDirectory>
-    </fileSet>
-
-    <fileSet>
-      <directory>${project.basedir}/src/gen/thrift/gen-php</directory>
-      <includes>
-        <include>**/*</include>
-      </includes>
-      <outputDirectory>lib/php/packages/hive_metastore</outputDirectory>
-    </fileSet>
-
-    <fileSet>
-      
<directory>${project.basedir}/src/gen/thrift/gen-py/hive_metastore</directory>
-      <fileMode>755</fileMode>
-       <includes>
-        <include>**/*</include>
-      </includes>
-      <outputDirectory>lib/py/hive_metastore</outputDirectory>
-    </fileSet>
-
-    <fileSet>
-      <directory>${project.basedir}/src/main/resources/</directory>
-      <fileMode>644</fileMode>
-      <includes>
-        <include>metastore-log4j2.properties</include>
-      </includes>
-      <outputDirectory>conf</outputDirectory>
-    </fileSet>
-  </fileSets>
-
-
-</assembly>
-

http://git-wip-us.apache.org/repos/asf/hive/blob/57f40f71/standalone-metastore/metastore-common/src/assembly/src.xml
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-common/src/assembly/src.xml 
b/standalone-metastore/metastore-common/src/assembly/src.xml
deleted file mode 100644
index a240544..0000000
--- a/standalone-metastore/metastore-common/src/assembly/src.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<assembly
-  xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2";
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-  
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
 http://maven.apache.org/xsd/assembly-1.1.2.xsd";>
-
-  <id>src</id>
-
-  <formats>
-    <format>tar.gz</format>
-  </formats>
-
-  <baseDirectory>apache-hive-metastore-${project.version}-src</baseDirectory>
-
-  <fileSets>
-    <fileSet>
-      <directory>${project.basedir}</directory>
-
-      <excludes>
-        <exclude>target/**</exclude>
-      </excludes>
-
-      <includes>
-        <include>.checkstyle</include>
-        <include>.gitattributes</include>
-        <include>.gitignore</include>
-        <include>LICENSE</include>
-        <include>NOTICE</include>
-        <include>pom.xml</include>
-        <include>src/**/*</include>
-      </includes>
-      <outputDirectory>/</outputDirectory>
-    </fileSet>
-  </fileSets>
-</assembly>

http://git-wip-us.apache.org/repos/asf/hive/blob/57f40f71/standalone-metastore/metastore-server/pom.xml
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-server/pom.xml 
b/standalone-metastore/metastore-server/pom.xml
index 14ea9ce..0244641 100644
--- a/standalone-metastore/metastore-server/pom.xml
+++ b/standalone-metastore/metastore-server/pom.xml
@@ -457,7 +457,6 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-assembly-plugin</artifactId>
-        <version>${maven.assembly.plugin.version}</version>
         <executions>
           <execution>
             <id>assemble</id>
@@ -466,10 +465,9 @@
               <goal>single</goal>
             </goals>
             <configuration>
-              <finalName>apache-hive-metastore-${project.version}</finalName>
+              
<finalName>apache-${project.artifactId}-${project.version}</finalName>
               <descriptors>
                 <descriptor>src/assembly/bin.xml</descriptor>
-                <descriptor>src/assembly/src.xml</descriptor>
               </descriptors>
               <tarLongFileMode>gnu</tarLongFileMode>
             </configuration>

http://git-wip-us.apache.org/repos/asf/hive/blob/57f40f71/standalone-metastore/metastore-server/src/assembly/src.xml
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-server/src/assembly/src.xml 
b/standalone-metastore/metastore-server/src/assembly/src.xml
deleted file mode 100644
index a240544..0000000
--- a/standalone-metastore/metastore-server/src/assembly/src.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-
-<assembly
-  xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2";
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-  
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
 http://maven.apache.org/xsd/assembly-1.1.2.xsd";>
-
-  <id>src</id>
-
-  <formats>
-    <format>tar.gz</format>
-  </formats>
-
-  <baseDirectory>apache-hive-metastore-${project.version}-src</baseDirectory>
-
-  <fileSets>
-    <fileSet>
-      <directory>${project.basedir}</directory>
-
-      <excludes>
-        <exclude>target/**</exclude>
-      </excludes>
-
-      <includes>
-        <include>.checkstyle</include>
-        <include>.gitattributes</include>
-        <include>.gitignore</include>
-        <include>LICENSE</include>
-        <include>NOTICE</include>
-        <include>pom.xml</include>
-        <include>src/**/*</include>
-      </includes>
-      <outputDirectory>/</outputDirectory>
-    </fileSet>
-  </fileSets>
-</assembly>

http://git-wip-us.apache.org/repos/asf/hive/blob/57f40f71/standalone-metastore/metastore-tools/pom.xml
----------------------------------------------------------------------
diff --git a/standalone-metastore/metastore-tools/pom.xml 
b/standalone-metastore/metastore-tools/pom.xml
index dd721cb..5b2af62 100644
--- a/standalone-metastore/metastore-tools/pom.xml
+++ b/standalone-metastore/metastore-tools/pom.xml
@@ -125,6 +125,22 @@
         </plugin>
       </plugins>
     </pluginManagement>
+    <plugins>
+      <!-- Suppress source assembly -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>assemble</id>
+            <phase>none</phase>
+            <goals>
+              <goal>single</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
   </build>
 
 </project>

http://git-wip-us.apache.org/repos/asf/hive/blob/57f40f71/standalone-metastore/pom.xml
----------------------------------------------------------------------
diff --git a/standalone-metastore/pom.xml b/standalone-metastore/pom.xml
index 83f5a9e..4ff92b3 100644
--- a/standalone-metastore/pom.xml
+++ b/standalone-metastore/pom.xml
@@ -43,7 +43,7 @@
     <maven.compiler.target>1.8</maven.compiler.target>
     
<maven.compiler.useIncrementalCompilation>false</maven.compiler.useIncrementalCompilation>
     <maven.repo.local>${settings.localRepository}</maven.repo.local>
-    <maven.assembly.plugin.version>2.3</maven.assembly.plugin.version>
+    <maven.assembly.plugin.version>3.1.0</maven.assembly.plugin.version>
     <maven.exec.plugin.version>1.6.0</maven.exec.plugin.version>
 
     <!-- Test Properties -->
@@ -316,6 +316,11 @@
     <pluginManagement>
       <plugins>
         <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <version>${maven.assembly.plugin.version}</version>
+        </plugin>
+        <plugin>
           <groupId>org.apache.rat</groupId>
           <artifactId>apache-rat-plugin</artifactId>
           <version>0.10</version>
@@ -350,6 +355,31 @@
         </plugin>
       </plugins>
     </pluginManagement>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-assembly-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>assemble</id>
+            <phase>package</phase>
+            <goals>
+              <goal>single</goal>
+            </goals>
+            <configuration>
+              
<finalName>apache-${project.artifactId}-${project.version}</finalName>
+              <formats>
+                <format>tar.gz</format>
+              </formats>
+              <descriptors>
+                <descriptor>src/assembly/src.xml</descriptor>
+              </descriptors>
+              <tarLongFileMode>gnu</tarLongFileMode>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
   </build>
 
 </project>

http://git-wip-us.apache.org/repos/asf/hive/blob/57f40f71/standalone-metastore/src/assembly/src.xml
----------------------------------------------------------------------
diff --git a/standalone-metastore/src/assembly/src.xml 
b/standalone-metastore/src/assembly/src.xml
new file mode 100644
index 0000000..7861f1c
--- /dev/null
+++ b/standalone-metastore/src/assembly/src.xml
@@ -0,0 +1,55 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<assembly
+  xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/2.0.0";
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/2.0.0
 http://maven.apache.org/xsd/assembly-2.0.0.xsd";>
+
+  <id>src</id>
+
+  <formats>
+    <format>tar.gz</format>
+  </formats>
+
+  
<baseDirectory>apache-${project.artifactId}-${project.version}-src</baseDirectory>
+
+  <fileSets>
+    <fileSet>
+      <directory>${project.basedir}</directory>
+      <includes>
+        <include>DEV-README</include>
+        <include>README*</include>
+        <include>LICENSE*</include>
+        <include>NOTICE*</include>
+        <include>pom.xml</include>
+      </includes>
+      <useDefaultExcludes>true</useDefaultExcludes>
+    </fileSet>
+    <fileSet>
+      <directory>${project.basedir}</directory>
+      <useDefaultExcludes>true</useDefaultExcludes>
+      <excludes>
+        <exclude>**/*.log</exclude>
+        <exclude>**/*.iml</exclude>
+        <exclude>**/${project.build.directory}/**</exclude>
+      </excludes>
+    </fileSet>
+  </fileSets>
+</assembly>

Reply via email to