Repository: phoenix Updated Branches: refs/heads/master 5f3d3892f -> 5df1b728e
PHOENIX-1885 Fix packaging for query server Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/5df1b728 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/5df1b728 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/5df1b728 Branch: refs/heads/master Commit: 5df1b728e1d9da9660f912c26aeb986b9e72140a Parents: 5f3d389 Author: Nick Dimiduk <[email protected]> Authored: Fri Apr 17 18:42:39 2015 -0700 Committer: Nick Dimiduk <[email protected]> Committed: Fri Apr 17 18:42:39 2015 -0700 ---------------------------------------------------------------------- bin/phoenix_utils.py | 14 +++++-- .../components/all-common-dependencies.xml | 1 + .../src/build/components/all-common-files.xml | 6 +-- .../src/build/components/all-common-jars.xml | 30 ++++++++++++-- phoenix-assembly/src/build/src.xml | 4 +- phoenix-server-client/pom.xml | 4 +- .../src/build/query-server-thin-client.xml | 40 ------------------- phoenix-server-client/src/build/thin-client.xml | 41 ++++++++++++++++++++ 8 files changed, 86 insertions(+), 54 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/5df1b728/bin/phoenix_utils.py ---------------------------------------------------------------------- diff --git a/bin/phoenix_utils.py b/bin/phoenix_utils.py index 055bea6..182cdf3 100755 --- a/bin/phoenix_utils.py +++ b/bin/phoenix_utils.py @@ -49,7 +49,9 @@ def findFileInPathWithoutRecursion(pattern, path): return "" def setPath(): - PHOENIX_CLIENT_JAR_PATTERN = "phoenix-*-client*.jar" + PHOENIX_CLIENT_JAR_PATTERN = "phoenix-*-client.jar" + PHOENIX_THIN_CLIENT_JAR_PATTERN = "phoenix-*-thin-client.jar" + PHOENIX_QUERYSERVER_JAR_PATTERN = "phoenix-server-*-runnable.jar" PHOENIX_TESTS_JAR_PATTERN = "phoenix-core-*-tests*.jar" global current_dir current_dir = os.path.dirname(os.path.abspath(__file__)) @@ -64,13 +66,19 @@ def setPath(): global testjar testjar = find(PHOENIX_TESTS_JAR_PATTERN, phoenix_test_jar_path) global phoenix_queryserver_jar - phoenix_queryserver_jar = find("phoenix-server-*-runnable.jar", os.path.join(current_dir, "..", "phoenix-server", "target", "*")) + phoenix_queryserver_jar = find(PHOENIX_QUERYSERVER_JAR_PATTERN, os.path.join(current_dir, "..", "phoenix-server", "target", "*")) global phoenix_thin_client_jar - phoenix_thin_client_jar = find("phoenix-*-query-server-thin-client.jar", os.path.join(current_dir, "..", "phoenix-server-client", "target", "*")) + phoenix_thin_client_jar = find(PHOENIX_THIN_CLIENT_JAR_PATTERN, os.path.join(current_dir, "..", "phoenix-server-client", "target", "*")) if phoenix_client_jar == "": phoenix_client_jar = findFileInPathWithoutRecursion(PHOENIX_CLIENT_JAR_PATTERN, os.path.join(current_dir, "..")) + if phoenix_thin_client_jar == "": + phoenix_thin_client_jar = findFileInPathWithoutRecursion(PHOENIX_THIN_CLIENT_JAR_PATTERN, os.path.join(current_dir, "..")) + + if phoenix_queryserver_jar == "": + phoenix_queryserver_jar = findFileInPathWithoutRecursion(PHOENIX_QUERYSERVER_JAR_PATTERN, os.path.join(current_dir, "..", "lib")) + if testjar == "": testjar = findFileInPathWithoutRecursion(PHOENIX_TESTS_JAR_PATTERN, os.path.join(current_dir, "..")) http://git-wip-us.apache.org/repos/asf/phoenix/blob/5df1b728/phoenix-assembly/src/build/components/all-common-dependencies.xml ---------------------------------------------------------------------- diff --git a/phoenix-assembly/src/build/components/all-common-dependencies.xml b/phoenix-assembly/src/build/components/all-common-dependencies.xml index f6a2eda..2cc7a9d 100644 --- a/phoenix-assembly/src/build/components/all-common-dependencies.xml +++ b/phoenix-assembly/src/build/components/all-common-dependencies.xml @@ -44,6 +44,7 @@ <include>org.cloudera.htrace:htrace-core</include> <include>io.netty:netty</include> <include>commons-codec:commons-codec</include> + <include>org.apache.calcite:calcite-avatica*</include> </includes> </dependencySet> <!-- Separate dependency set to just pull in the jackson stuff since its test http://git-wip-us.apache.org/repos/asf/phoenix/blob/5df1b728/phoenix-assembly/src/build/components/all-common-files.xml ---------------------------------------------------------------------- diff --git a/phoenix-assembly/src/build/components/all-common-files.xml b/phoenix-assembly/src/build/components/all-common-files.xml index c9e4691..cd5260f 100644 --- a/phoenix-assembly/src/build/components/all-common-files.xml +++ b/phoenix-assembly/src/build/components/all-common-files.xml @@ -48,8 +48,8 @@ <fileMode>0644</fileMode> <directoryMode>0755</directoryMode> <excludes> - <exclude>*.py/</exclude> - <exclude>*.sh/</exclude> + <exclude>*.py*</exclude> + <exclude>*.sh*</exclude> </excludes> </fileSet> <fileSet> @@ -77,4 +77,4 @@ <directoryMode>0755</directoryMode> </fileSet> </fileSets> -</component> \ No newline at end of file +</component> http://git-wip-us.apache.org/repos/asf/phoenix/blob/5df1b728/phoenix-assembly/src/build/components/all-common-jars.xml ---------------------------------------------------------------------- diff --git a/phoenix-assembly/src/build/components/all-common-jars.xml b/phoenix-assembly/src/build/components/all-common-jars.xml index 769e28f..bed9f25 100644 --- a/phoenix-assembly/src/build/components/all-common-jars.xml +++ b/phoenix-assembly/src/build/components/all-common-jars.xml @@ -32,6 +32,14 @@ <include>phoenix-*-mapreduce.jar</include> </includes> </fileSet> + <fileSet> + <directory>${project.basedir}/../phoenix-server-client/target/</directory> + <outputDirectory>/</outputDirectory> + <includes> + <include>phoenix-*-thin-client.jar</include> + </includes> + <fileMode>0644</fileMode> + </fileSet> <!-- This is only necessary until maven fixes the intra-project dependency bug in maven 3.0. Until then, we have to include the jars for sub-projects explicitly. Otherwise, test jars are pulled in wrongly. @@ -66,9 +74,6 @@ <includes> <include>phoenix-*.jar</include> </includes> - <excludes> - <exclude></exclude> - </excludes> <fileMode>0644</fileMode> </fileSet> <fileSet> @@ -77,8 +82,25 @@ <includes> <include>phoenix-*.jar</include> </includes> + <fileMode>0644</fileMode> + </fileSet> + <fileSet> + <directory>${project.basedir}/../phoenix-server/target/</directory> + <outputDirectory>lib</outputDirectory> + <includes> + <include>phoenix-*.jar</include> + </includes> + <fileMode>0644</fileMode> + </fileSet> + <fileSet> + <directory>${project.basedir}/../phoenix-server-client/target/</directory> + <outputDirectory>lib</outputDirectory> + <includes> + <include>phoenix-*.jar</include> + </includes> <excludes> - <exclude></exclude> + <!-- this one goes in project root instead --> + <exclude>phoenix-*-thin-client.jar</exclude> </excludes> <fileMode>0644</fileMode> </fileSet> http://git-wip-us.apache.org/repos/asf/phoenix/blob/5df1b728/phoenix-assembly/src/build/src.xml ---------------------------------------------------------------------- diff --git a/phoenix-assembly/src/build/src.xml b/phoenix-assembly/src/build/src.xml index e23af76..5dc92a8 100644 --- a/phoenix-assembly/src/build/src.xml +++ b/phoenix-assembly/src/build/src.xml @@ -98,8 +98,8 @@ <fileMode>0644</fileMode> <directoryMode>0755</directoryMode> <excludes> - <exclude>*.py/</exclude> - <exclude>*.sh/</exclude> + <exclude>*.py*</exclude> + <exclude>*.sh*</exclude> </excludes> </fileSet> <fileSet> http://git-wip-us.apache.org/repos/asf/phoenix/blob/5df1b728/phoenix-server-client/pom.xml ---------------------------------------------------------------------- diff --git a/phoenix-server-client/pom.xml b/phoenix-server-client/pom.xml index 60a4c40..4d6fd45 100644 --- a/phoenix-server-client/pom.xml +++ b/phoenix-server-client/pom.xml @@ -39,7 +39,7 @@ <attach>false</attach> <finalName>phoenix-${project.version}</finalName> <descriptors> - <descriptor>src/build/query-server-thin-client.xml</descriptor> + <descriptor>src/build/thin-client.xml</descriptor> </descriptors> </configuration> </execution> @@ -54,7 +54,7 @@ <artifactId>calcite-avatica</artifactId> </dependency> <dependency> - <!-- TODO: don't really want to depend on sqlline, but our bin scripts are primitive --> + <!-- a dependency for the thin-client uberjar --> <groupId>sqlline</groupId> <artifactId>sqlline</artifactId> </dependency> http://git-wip-us.apache.org/repos/asf/phoenix/blob/5df1b728/phoenix-server-client/src/build/query-server-thin-client.xml ---------------------------------------------------------------------- diff --git a/phoenix-server-client/src/build/query-server-thin-client.xml b/phoenix-server-client/src/build/query-server-thin-client.xml deleted file mode 100644 index f456904..0000000 --- a/phoenix-server-client/src/build/query-server-thin-client.xml +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version='1.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.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> - <id>query-server-thin-client</id> - <!-- All the dependencies (unpacked) necessary to run phoenix from a single, stand-alone jar --> - <formats> - <format>jar</format> - </formats> - <includeBaseDirectory>false</includeBaseDirectory> - <dependencySets> - <dependencySet> - <outputDirectory>/</outputDirectory> - <useProjectArtifact>true</useProjectArtifact> - <unpack>true</unpack> - <scope>runtime</scope> - </dependencySet> - </dependencySets> -</assembly> http://git-wip-us.apache.org/repos/asf/phoenix/blob/5df1b728/phoenix-server-client/src/build/thin-client.xml ---------------------------------------------------------------------- diff --git a/phoenix-server-client/src/build/thin-client.xml b/phoenix-server-client/src/build/thin-client.xml new file mode 100644 index 0000000..5865395 --- /dev/null +++ b/phoenix-server-client/src/build/thin-client.xml @@ -0,0 +1,41 @@ +<?xml version='1.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.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> + + <id>thin-client</id> + <!-- All the dependencies (unpacked) necessary to run phoenix from a single, stand-alone jar --> + <formats> + <format>jar</format> + </formats> + <includeBaseDirectory>false</includeBaseDirectory> + <dependencySets> + <dependencySet> + <outputDirectory>/</outputDirectory> + <useProjectArtifact>true</useProjectArtifact> + <unpack>true</unpack> + <scope>runtime</scope> + </dependencySet> + </dependencySets> +</assembly>
