Author: travis
Date: Wed Sep 19 20:43:50 2012
New Revision: 1387748
URL: http://svn.apache.org/viewvc?rev=1387748&view=rev
Log:
HCATALOG-461 Refactor server-extensions as a subproject
Added:
incubator/hcatalog/trunk/server-extensions/
incubator/hcatalog/trunk/server-extensions/build.xml
incubator/hcatalog/trunk/server-extensions/pom.xml
incubator/hcatalog/trunk/server-extensions/src/
incubator/hcatalog/trunk/server-extensions/src/main/
incubator/hcatalog/trunk/server-extensions/src/main/java/
incubator/hcatalog/trunk/server-extensions/src/main/java/org/
incubator/hcatalog/trunk/server-extensions/src/main/java/org/apache/
incubator/hcatalog/trunk/server-extensions/src/main/java/org/apache/hcatalog/
incubator/hcatalog/trunk/server-extensions/src/main/java/org/apache/hcatalog/listener/
incubator/hcatalog/trunk/server-extensions/src/main/java/org/apache/hcatalog/listener/NotificationListener.java
- copied unchanged from r1387706,
incubator/hcatalog/trunk/src/java/org/apache/hcatalog/listener/NotificationListener.java
incubator/hcatalog/trunk/server-extensions/src/test/
incubator/hcatalog/trunk/server-extensions/src/test/java/
incubator/hcatalog/trunk/server-extensions/src/test/java/org/
incubator/hcatalog/trunk/server-extensions/src/test/java/org/apache/
incubator/hcatalog/trunk/server-extensions/src/test/java/org/apache/hcatalog/
incubator/hcatalog/trunk/server-extensions/src/test/java/org/apache/hcatalog/listener/
incubator/hcatalog/trunk/server-extensions/src/test/java/org/apache/hcatalog/listener/TestMsgBusConnection.java
- copied unchanged from r1387706,
incubator/hcatalog/trunk/src/test/org/apache/hcatalog/listener/TestMsgBusConnection.java
incubator/hcatalog/trunk/server-extensions/src/test/java/org/apache/hcatalog/listener/TestNotificationListener.java
- copied unchanged from r1387706,
incubator/hcatalog/trunk/src/test/org/apache/hcatalog/listener/TestNotificationListener.java
Removed:
incubator/hcatalog/trunk/src/java/org/apache/hcatalog/listener/NotificationListener.java
incubator/hcatalog/trunk/src/test/org/apache/hcatalog/listener/TestMsgBusConnection.java
incubator/hcatalog/trunk/src/test/org/apache/hcatalog/listener/TestNotificationListener.java
Modified:
incubator/hcatalog/trunk/CHANGES.txt
incubator/hcatalog/trunk/ant/deploy.xml
incubator/hcatalog/trunk/build-common.xml
incubator/hcatalog/trunk/build.xml
incubator/hcatalog/trunk/hcatalog-pig-adapter/build.xml
incubator/hcatalog/trunk/ivy.xml
incubator/hcatalog/trunk/webhcat/java-client/build.xml
incubator/hcatalog/trunk/webhcat/svr/build.xml
Modified: incubator/hcatalog/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/incubator/hcatalog/trunk/CHANGES.txt?rev=1387748&r1=1387747&r2=1387748&view=diff
==============================================================================
--- incubator/hcatalog/trunk/CHANGES.txt (original)
+++ incubator/hcatalog/trunk/CHANGES.txt Wed Sep 19 20:43:50 2012
@@ -38,6 +38,8 @@ Trunk (unreleased changes)
HCAT-427 Document storage-based authorization (lefty via gates)
IMPROVEMENTS
+ HCAT-461 Refactor server-extensions as a subproject (traviscrawford)
+
HCAT-500 HCatStorer should honor user-specified path for external tables
(pengfeng via traviscrawford)
HCAT-493 Convert classes with 2 space indentation to 4 space indentation for
consistent style (amalakar via traviscrawford)
Modified: incubator/hcatalog/trunk/ant/deploy.xml
URL:
http://svn.apache.org/viewvc/incubator/hcatalog/trunk/ant/deploy.xml?rev=1387748&r1=1387747&r2=1387748&view=diff
==============================================================================
--- incubator/hcatalog/trunk/ant/deploy.xml (original)
+++ incubator/hcatalog/trunk/ant/deploy.xml Wed Sep 19 20:43:50 2012
@@ -20,13 +20,50 @@
<project xmlns:ivy="antlib:org.apache.ivy.ant"
xmlns:artifact="artifact:org.apache.maven.artifact.ant">
- <target name="mvn-init" unless="mvn-init.complete">
- <get
src="${mvnrepo}/org/apache/maven/maven-ant-tasks/${maven-ant-tasks.version}/maven-ant-tasks-${maven-ant-tasks.version}.jar"
-
dest="${path.to.basedir}/build/maven-ant-tasks-${maven-ant-tasks.version}.jar"
usetimestamp="true" skipexisting="true"/>
- <taskdef resource="org/apache/maven/artifact/ant/antlib.xml"
- uri="artifact:org.apache.maven.artifact.ant"
-
classpath="${path.to.basedir}/build/maven-ant-tasks-${maven-ant-tasks.version}.jar"/>
- <property name="mvn-init.complete" value="true"/>
- </target>
+ <target name="mvn-init" unless="mvn-init.complete">
+ <echo message="${ant.project.name}"/>
+ <get
src="${mvnrepo}/org/apache/maven/maven-ant-tasks/${maven-ant-tasks.version}/maven-ant-tasks-${maven-ant-tasks.version}.jar"
+
dest="${path.to.basedir}/build/maven-ant-tasks-${maven-ant-tasks.version}.jar"
+ usetimestamp="true"
+ skipexisting="true"/>
+ <taskdef resource="org/apache/maven/artifact/ant/antlib.xml"
+ uri="artifact:org.apache.maven.artifact.ant"
+
classpath="${path.to.basedir}/build/maven-ant-tasks-${maven-ant-tasks.version}.jar"/>
+ <property name="mvn-init.complete" value="true"/>
+ </target>
+
+ <target name="_check-mvn-dependencies" unless="mvn-dependencies.complete">
+ <available property="mvn-dependencies.complete"
+ file="${build.dir}/lib/.mvn-dependencies.complete"/>
+ </target>
+
+ <!-- Only resolve dependencies if not already copied to lib dir. We copy
+ dependencies into the build dir rather than directly using files from the
+ local maven repo to match how ivy dependencies work. This is necessary for
+ targets like javadoc that need a comprehensive set of all dependencies
+ that would otherwise be unavailable at the top-level build file. -->
+ <target name="mvn-dependencies"
+ depends="mvn-init,_check-mvn-dependencies"
+ unless="mvn-dependencies.complete">
+ <echo message="${ant.project.name}"/>
+
+ <artifact:dependencies pathId="mvn.compile.classpath" scopes="compile">
+ <pom file="pom.xml"/>
+ </artifact:dependencies>
+ <mkdir dir="${build.dir}/lib/compile"/>
+ <copy todir="${build.dir}/lib/compile">
+ <path refid="mvn.compile.classpath"/>
+ </copy>
+
+ <artifact:dependencies pathId="mvn.test.classpath" scopes="compile,
test">
+ <pom file="pom.xml"/>
+ </artifact:dependencies>
+ <mkdir dir="${build.dir}/lib/test"/>
+ <copy todir="${build.dir}/lib/test">
+ <path refid="mvn.test.classpath"/>
+ </copy>
+
+ <touch file="${build.dir}/lib/.mvn-dependencies.complete"/>
+ </target>
</project>
Modified: incubator/hcatalog/trunk/build-common.xml
URL:
http://svn.apache.org/viewvc/incubator/hcatalog/trunk/build-common.xml?rev=1387748&r1=1387747&r2=1387748&view=diff
==============================================================================
--- incubator/hcatalog/trunk/build-common.xml (original)
+++ incubator/hcatalog/trunk/build-common.xml Wed Sep 19 20:43:50 2012
@@ -77,7 +77,7 @@
<echo message="${ant.project.name}"/>
<jar jarfile="${build.dir}/${jar.name}" basedir="${build.classes}"/>
<artifact:install
file="${build.dir}/${ant.project.name}-${hcatalog.version}.jar">
- <artifact:pom
file="${build.dir}/ivy/${ant.project.name}-${hcatalog.version}.pom"/>
+ <artifact:pom file="${pom.file}"/>
</artifact:install>
</target>
Modified: incubator/hcatalog/trunk/build.xml
URL:
http://svn.apache.org/viewvc/incubator/hcatalog/trunk/build.xml?rev=1387748&r1=1387747&r2=1387748&view=diff
==============================================================================
--- incubator/hcatalog/trunk/build.xml (original)
+++ incubator/hcatalog/trunk/build.xml Wed Sep 19 20:43:50 2012
@@ -127,12 +127,6 @@
<replace file="${build.ivy.dir}/hcatalog-core-${hcatalog.version}.pom"
token="artifactId>hcatalog"
value="artifactId>hcatalog-core"/>
-
- <copy file="${pom.file}" overwrite="true"
-
tofile="${build.ivy.dir}/hcatalog-server-extensions-${hcatalog.version}.pom"/>
- <replace
file="${build.ivy.dir}/hcatalog-server-extensions-${hcatalog.version}.pom"
- token="artifactId>hcatalog"
- value="artifactId>hcatalog-server-extensions"/>
</target>
<target name="init" depends="ivy-retrieve,mvn-init">
@@ -169,26 +163,12 @@
<!--
================================================================================
- Build server side code, mainly listener.
+ Build all jars
================================================================================
-->
- <target name="server-extensions" depends="compile-src">
- <jar
jarfile="${build.dir}/${ant.project.name}/${ant.project.name}-server-extensions-${hcatalog.version}.jar"
- basedir="${build.classes}"
-
includes="org/apache/hcatalog/listener/**,org/apache/hcatalog/metadata/**"/>
- <artifact:install
-
file="${build.dir}/${ant.project.name}/${ant.project.name}-server-extensions-${hcatalog.version}.jar">
- <artifact:pom
file="${build.ivy.dir}/hcatalog-server-extensions-${hcatalog.version}.pom"/>
- </artifact:install>
- </target>
-
- <!--
-
================================================================================
- Build both clientjar and server-extensions
-
================================================================================
- -->
- <target name="jar"
depends="checkstyle,shims,clientjar,server-extensions,jar-storage-handlers">
+ <target name="jar"
depends="checkstyle,shims,clientjar,jar-storage-handlers">
<ant target="jar" dir="hcatalog-pig-adapter" inheritAll="false"/>
+ <ant target="jar" dir="server-extensions" inheritAll="false"/>
<ant target="jar" dir="webhcat/svr" inheritAll="false"/>
<ant target="jar" dir="webhcat/java-client" inheritAll="false"/>
@@ -197,6 +177,7 @@
<jar jarfile="${build.dir}/${ant.project.name}/${hcatalog.jar}">
<zipfileset
src="${build.dir}/${ant.project.name}/${hcatalog.core.jar}"/>
<zipfileset
src="hcatalog-pig-adapter/build/hcatalog-pig-adapter-${hcatalog.version}.jar"/>
+ <zipfileset
src="server-extensions/build/hcatalog-server-extensions-${hcatalog.version}.jar"/>
</jar>
</target>
@@ -247,6 +228,7 @@
<target name="test" depends="compile-test" description="run unit tests">
<_junit srcDir="${basedir}/src/test"/>
<ant target="test" dir="hcatalog-pig-adapter" inheritAll="false"/>
+ <ant target="test" dir="server-extensions" inheritAll="false"/>
<ant target="test" dir="webhcat/svr" inheritAll="false"/>
<ant target="test" dir="webhcat/java-client" inheritAll="false"/>
<ant target="test" dir="storage-handlers" inheritAll="false"
useNativeBasedir="true"/>
@@ -256,6 +238,7 @@
description="run unit tests and generate code coverage reports">
<_junit srcDir="${basedir}/src/test"/>
<ant target="_test-with-clover" dir="hcatalog-pig-adapter"
inheritAll="false"/>
+ <ant target="_test-with-clover" dir="server-extensions"
inheritAll="false"/>
<ant target="_test-with-clover" dir="webhcat/svr" inheritAll="false"/>
<ant target="_test-with-clover" dir="webhcat/java-client"
inheritAll="false"/>
<!-- storage-handlers do not have coverage as they have not
@@ -288,6 +271,7 @@
classPathRef="compile.classpath"/>
<ant target="findbugs" dir="hcatalog-pig-adapter" inheritAll="false"/>
+ <ant target="findbugs" dir="server-extensions" inheritAll="false"/>
<ant target="findbugs" dir="webhcat/svr" inheritAll="false"/>
<ant target="findbugs" dir="webhcat/java-client" inheritAll="false"/>
</target>
@@ -303,6 +287,7 @@
<delete dir="${build.dir}"/>
<delete dir="${test.warehouse.dir}"/>
<ant target="clean" dir="hcatalog-pig-adapter" inheritAll="false"/>
+ <ant target="clean" dir="server-extensions" inheritAll="false"/>
<ant target="clean" dir="webhcat/svr" inheritAll="false"/>
<ant target="clean" dir="webhcat/java-client" inheritAll="false"/>
<ant target="clean" dir="storage-handlers" inheritAll="false"
useNativeBasedir="true"/>
@@ -342,10 +327,12 @@
failonerror="true">
<packageset dir="${src.dir}"/>
<packageset dir="hcatalog-pig-adapter/src/main/java"/>
+ <packageset dir="server-extensions/src/main/java"/>
<packageset dir="webhcat/svr/src/main/java"/>
<packageset dir="webhcat/java-client/src/main/java"/>
<classpath>
<path refid="uber.classpath"/>
+ <fileset dir="server-extensions/build/lib/compile"/>
</classpath>
<group title="hcatalog" packages="org.apache.hcatalog.*"/>
</javadoc>
@@ -389,6 +376,9 @@
<fileset dir="hcatalog-pig-adapter/build">
<include name="hcatalog-*.jar"/>
</fileset>
+ <fileset dir="server-extensions/build">
+ <include name="hcatalog-*.jar"/>
+ </fileset>
<fileset dir="webhcat/svr/build">
<include name="webhcat-*.jar"/>
</fileset>
@@ -479,6 +469,7 @@
<tarfileset dir="${basedir}" mode="644"
prefix="${ant.project.name}-src-${hcatalog.version}">
<include name="conf/**"/>
<include name="hcatalog-pig-adapter/**"/>
+ <include name="server-extensions/**"/>
<include name="webhcat/**"/>
<include name="ivy/**"/>
<exclude name="ivy/*.jar"/>
Modified: incubator/hcatalog/trunk/hcatalog-pig-adapter/build.xml
URL:
http://svn.apache.org/viewvc/incubator/hcatalog/trunk/hcatalog-pig-adapter/build.xml?rev=1387748&r1=1387747&r2=1387748&view=diff
==============================================================================
--- incubator/hcatalog/trunk/hcatalog-pig-adapter/build.xml (original)
+++ incubator/hcatalog/trunk/hcatalog-pig-adapter/build.xml Wed Sep 19 20:43:50
2012
@@ -21,6 +21,8 @@
<property name="path.to.basedir" value="${basedir}/.."/>
<import file="../build-common.xml"/>
+ <property name="pom.file"
location="${build.dir}/ivy/${ant.project.name}-${hcatalog.version}.pom"/>
+
<path id="compile.class.path">
<fileset dir="${build.dir}/ivy/lib/default" includes="*.jar"/>
</path>
Modified: incubator/hcatalog/trunk/ivy.xml
URL:
http://svn.apache.org/viewvc/incubator/hcatalog/trunk/ivy.xml?rev=1387748&r1=1387747&r2=1387748&view=diff
==============================================================================
--- incubator/hcatalog/trunk/ivy.xml (original)
+++ incubator/hcatalog/trunk/ivy.xml Wed Sep 19 20:43:50 2012
@@ -37,18 +37,7 @@
<dependencies>
<!-- hadoop20 dependencies -->
<dependency org="org.apache.pig" name="pig" rev="${pig.version}"
conf="default->*"/>
- <dependency org="org.apache.hadoop" name="hadoop-tools"
rev="${hadoop20.version}" conf="default->*">
- <exclude org="commons-daemon" module="commons-daemon"/>
- </dependency>
- <dependency org="org.apache.hadoop" name="hadoop-test"
rev="${hadoop20.version}" conf="test->*">
- <exclude org="commons-daemon" module="commons-daemon"/>
- </dependency>
-
- <dependency org="javax.jms" name="jms" rev="${jms.version}"/>
- <dependency org="org.apache.activemq" name="activemq-core"
rev="${activemq.version}">
- <exclude org="org.springframework"/>
- </dependency>
- <dependency org="org.apache.activemq" name="kahadb"
rev="${activemq.version}"/>
+ <dependency org="org.apache.hadoop" name="hadoop-tools"
rev="${hadoop20.version}" conf="default->*"/>
<dependency org="javax.management.j2ee" name="management-api"
rev="${javax-mgmt.version}"/>
<dependency org="org.codehaus.jackson" name="jackson-mapper-asl"
rev="${jackson.version}"/>
<dependency org="org.codehaus.jackson" name="jackson-core-asl"
rev="${jackson.version}"/>
Added: incubator/hcatalog/trunk/server-extensions/build.xml
URL:
http://svn.apache.org/viewvc/incubator/hcatalog/trunk/server-extensions/build.xml?rev=1387748&view=auto
==============================================================================
--- incubator/hcatalog/trunk/server-extensions/build.xml (added)
+++ incubator/hcatalog/trunk/server-extensions/build.xml Wed Sep 19 20:43:50
2012
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+ 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.
+-->
+
+<project name="hcatalog-server-extensions">
+ <property name="path.to.basedir" value="${basedir}/.."/>
+ <property name="pom.file" location="pom.xml"/>
+
+ <import file="../build-common.xml"/>
+
+ <path id="compile.class.path">
+ <fileset dir="${build.dir}/lib/compile"/>
+ </path>
+
+ <path id="test.class.path">
+ <fileset dir="${build.dir}/lib/test"/>
+ <dirset dir="${basedir}/../build/test/classes"/>
+ <dirset dir="${build.dir}/classes"/>
+ <dirset dir="${build.dir}/test/classes"/>
+ </path>
+
+ <path id="findbugs.class.path">
+ <fileset dir="${build.dir}/lib/compile"/>
+ </path>
+
+ <!-- Use Maven (instead of Ivy) for dependencies. -->
+ <target name="ivy-retrieve" depends="mvn-dependencies"/>
+
+</project>
Added: incubator/hcatalog/trunk/server-extensions/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/hcatalog/trunk/server-extensions/pom.xml?rev=1387748&view=auto
==============================================================================
--- incubator/hcatalog/trunk/server-extensions/pom.xml (added)
+++ incubator/hcatalog/trunk/server-extensions/pom.xml Wed Sep 19 20:43:50 2012
@@ -0,0 +1,83 @@
+<!--
+ 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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <parent>
+ <groupId>org.apache.hcatalog</groupId>
+ <artifactId>hcatalog</artifactId>
+ <version>${hcatalog.version}</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.hcatalog</groupId>
+ <artifactId>hcatalog-server-extensions</artifactId>
+ <packaging>jar</packaging>
+ <version>${hcatalog.version}</version>
+ <name>server-extensions</name>
+ <url>http://maven.apache.org</url>
+
+ <dependencies>
+ <dependency>
+ <groupId>javax.jms</groupId>
+ <artifactId>jms</artifactId>
+ <version>${jms.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>activemq-core</artifactId>
+ <version>${activemq.version}</version>
+ <scope>compile</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.activemq</groupId>
+ <artifactId>kahadb</artifactId>
+ <version>${activemq.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hcatalog</groupId>
+ <artifactId>hcatalog-core</artifactId>
+ <version>${hcatalog.version}</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <!-- test scope -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-test</artifactId>
+ <version>${hadoop20.version}</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
Modified: incubator/hcatalog/trunk/webhcat/java-client/build.xml
URL:
http://svn.apache.org/viewvc/incubator/hcatalog/trunk/webhcat/java-client/build.xml?rev=1387748&r1=1387747&r2=1387748&view=diff
==============================================================================
--- incubator/hcatalog/trunk/webhcat/java-client/build.xml (original)
+++ incubator/hcatalog/trunk/webhcat/java-client/build.xml Wed Sep 19 20:43:50
2012
@@ -18,8 +18,10 @@
<project name="webhcat-java-client">
<property name="path.to.basedir" location="${basedir}/../.."/>
-
<import file="../../build-common.xml"/>
+
+ <property name="pom.file"
location="${build.dir}/ivy/${ant.project.name}-${hcatalog.version}.pom"/>
+
<path id="compile.class.path">
<fileset dir="${build.dir}/ivy/lib/default" includes="*.jar"/>
</path>
Modified: incubator/hcatalog/trunk/webhcat/svr/build.xml
URL:
http://svn.apache.org/viewvc/incubator/hcatalog/trunk/webhcat/svr/build.xml?rev=1387748&r1=1387747&r2=1387748&view=diff
==============================================================================
--- incubator/hcatalog/trunk/webhcat/svr/build.xml (original)
+++ incubator/hcatalog/trunk/webhcat/svr/build.xml Wed Sep 19 20:43:50 2012
@@ -18,9 +18,10 @@
<project name="webhcat">
<property name="path.to.basedir" location="${basedir}/../.."/>
-
<import file="../../build-common.xml"/>
+ <property name="pom.file"
location="${build.dir}/ivy/${ant.project.name}-${hcatalog.version}.pom"/>
+
<path id="compile.class.path">
<fileset dir="${build.dir}/ivy/lib/default" includes="*.jar"/>
</path>