This is an automated email from the ASF dual-hosted git repository.
pvary pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push:
new f9ef4eeb60 HIVE-26093 Deduplicate
org.apache.hadoop.hive.metastore.annotation package-info.java (Peter Vary
reviewed by Stamatis Zampetakis) (#3168)
f9ef4eeb60 is described below
commit f9ef4eeb605302e42ebda196a901f865bee0efb4
Author: pvary <[email protected]>
AuthorDate: Mon Apr 11 14:04:41 2022 +0200
HIVE-26093 Deduplicate org.apache.hadoop.hive.metastore.annotation
package-info.java (Peter Vary reviewed by Stamatis Zampetakis) (#3168)
---
.gitignore | 2 -
pom.xml | 2 +-
.../hive/metastore/utils/MetastoreVersionInfo.java | 0
standalone-metastore/metastore-server/pom.xml | 17 ----
.../src/main/resources/saveVersion.sh | 91 ----------------------
standalone-metastore/pom.xml | 23 ++++++
6 files changed, 24 insertions(+), 111 deletions(-)
diff --git a/.gitignore b/.gitignore
index b421ed4912..e6b54e9161 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,9 +20,7 @@ target/
conf/hive-default.xml.template
.DS_Store
.factorypath
-standalone-metastore/src/gen/version
standalone-metastore/metastore-common/src/gen/version
-standalone-metastore/metastore-server/src/gen/version
kafka-handler/src/test/gen
**/.vscode/
/.recommenders/
diff --git a/pom.xml b/pom.xml
index 8f60e798b0..05394698a1 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1813,7 +1813,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
- <additionalparam>-Xdoclint:none</additionalparam>
+ <doclint>none</doclint>
<useStandardDocletOptions>false</useStandardDocletOptions>
</configuration>
<executions>
diff --git
a/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/utils/MetastoreVersionInfo.java
b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetastoreVersionInfo.java
similarity index 100%
rename from
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/utils/MetastoreVersionInfo.java
rename to
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/utils/MetastoreVersionInfo.java
diff --git a/standalone-metastore/metastore-server/pom.xml
b/standalone-metastore/metastore-server/pom.xml
index 624f667c86..a50e9bc416 100644
--- a/standalone-metastore/metastore-server/pom.xml
+++ b/standalone-metastore/metastore-server/pom.xml
@@ -474,23 +474,6 @@
</target>
</configuration>
</execution>
- <execution>
- <id>generate-version-annotation</id>
- <phase>generate-sources</phase>
- <configuration>
- <target>
- <exec executable="bash" failonerror="true">
- <arg value="${basedir}/src/main/resources/saveVersion.sh"/>
- <arg value="${project.version}"/>
- <arg value="${hive.version.shortname}"/>
- <arg value="${basedir}/src"/>
- </exec>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
<execution>
<id>setup-metastore-scripts</id>
<phase>process-test-resources</phase>
diff --git
a/standalone-metastore/metastore-server/src/main/resources/saveVersion.sh
b/standalone-metastore/metastore-server/src/main/resources/saveVersion.sh
deleted file mode 100755
index 0d1a463fdd..0000000000
--- a/standalone-metastore/metastore-server/src/main/resources/saveVersion.sh
+++ /dev/null
@@ -1,91 +0,0 @@
-#!/usr/bin/env bash
-
-# 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.
-
-
-# This file is used to generate the package-info.java class that
-# records the version, revision, branch, user, timestamp, and url
-unset LANG
-unset LC_CTYPE
-unset LC_TIME
-version=$1
-shortversion=$2
-src_dir=$3
-revision=$4
-branch=$5
-url=$6
-user=`whoami`
-date=`date`
-dir=`pwd`
-cwd=`dirname $dir`
-if [ "$revision" = "" ]; then
- if git rev-parse HEAD 2>/dev/null > /dev/null ; then
- revision=`git log -1 --pretty=format:"%H"`
- hostname=`hostname`
- branch=`git branch | sed -n -e 's/^* //p'`
- url="git://${hostname}${cwd}"
- elif [ -d .svn ]; then
- revision=`svn info ../ | sed -n -e 's/Last Changed Rev: \(.*\)/\1/p'`
- url=`svn info ../ | sed -n -e 's/^URL: \(.*\)/\1/p'`
- # Get canonical branch (branches/X, tags/X, or trunk)
- branch=`echo $url | sed -n -e 's,.*\(branches/.*\)$,\1,p' \
- -e 's,.*\(tags/.*\)$,\1,p' \
- -e 's,.*trunk$,trunk,p'`
- else
- revision="Unknown"
- branch="Unknown"
- url="file://$cwd"
- fi
-fi
-if [ "$branch" = "" ]; then
- branch="Unknown"
-fi
-if [ "$url" = "" ]; then
- url="file://$cwd"
-fi
-
-if [ -x /sbin/md5 ]; then
- md5="/sbin/md5"
-else
- md5="md5sum"
-fi
-
-srcChecksum=`find ../ -name '*.java' | grep -v generated-sources | LC_ALL=C
sort | xargs $md5 | $md5 | cut -d ' ' -f 1`
-
-mkdir -p $src_dir/gen/version/org/apache/hadoop/hive/metastore/annotation
-
-# In Windows, all the following string ends with \r, need to get rid of them
-branch=`echo $branch | tr -d '\r'`
-user=`echo $user | tr -d '\r'`
-date=`echo $date | tr -d '\r'`
-url=`echo $url | tr -d '\r'`
-srcChecksum=`echo $srcChecksum | tr -d '\r'`
-
-cat << EOF | \
- sed -e "s/VERSION/$version/" -e "s/SHORTVERSION/$shortversion/" \
- -e "s/USER/$user/" -e "s/DATE/$date/" \
- -e "s|URL|$url|" -e "s/REV/$revision/" \
- -e "s|BRANCH|$branch|" -e "s/SRCCHECKSUM/$srcChecksum/" \
- >
$src_dir/gen/version/org/apache/hadoop/hive/metastore/annotation/package-info.java
-/*
- * Generated by saveVersion.sh
- */
-@MetastoreVersionAnnotation(version="VERSION", shortVersion="SHORTVERSION",
- revision="REV", branch="BRANCH",
- user="USER", date="DATE", url="URL",
- srcChecksum="SRCCHECKSUM")
-package org.apache.hadoop.hive.metastore.annotation;
-EOF
diff --git a/standalone-metastore/pom.xml b/standalone-metastore/pom.xml
index 55a2213763..b5ee81fb0a 100644
--- a/standalone-metastore/pom.xml
+++ b/standalone-metastore/pom.xml
@@ -531,6 +531,29 @@
</os>
</activation>
</profile>
+ <profile>
+ <id>javadoc</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <doclint>none</doclint>
+ <useStandardDocletOptions>false</useStandardDocletOptions>
+ </configuration>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
<profile>
<id>spotbugs</id>
<build>