| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| 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/xsd/maven-4.0.0.xsd"> |
| <parent> |
| <artifactId>tajo-project</artifactId> |
| <groupId>org.apache.tajo</groupId> |
| <version>0.12.0-SNAPSHOT</version> |
| <relativePath>../tajo-project</relativePath> |
| </parent> |
| <modelVersion>4.0.0</modelVersion> |
| <artifactId>tajo-dist</artifactId> |
| <description>Tajo Distribution</description> |
| <name>Tajo Distribution</name> |
| <packaging>jar</packaging> |
| |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.rat</groupId> |
| <artifactId>apache-rat-plugin</artifactId> |
| <executions> |
| <execution> |
| <phase>verify</phase> |
| <goals> |
| <goal>check</goal> |
| </goals> |
| </execution> |
| </executions> |
| <configuration> |
| <excludes> |
| <exclude>src/main/conf/workers</exclude> |
| <exclude>src/main/conf/storage-site.json.template</exclude> |
| </excludes> |
| </configuration> |
| </plugin> |
| </plugins> |
| </build> |
| |
| <dependencies> |
| <dependency> |
| <groupId>org.apache.tajo</groupId> |
| <artifactId>tajo-common</artifactId> |
| <scope>provided</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.tajo</groupId> |
| <artifactId>tajo-rpc-protobuf</artifactId> |
| <scope>provided</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.tajo</groupId> |
| <artifactId>tajo-ws-rs</artifactId> |
| <scope>provided</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.tajo</groupId> |
| <artifactId>tajo-catalog-server</artifactId> |
| <scope>provided</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.tajo</groupId> |
| <artifactId>tajo-core</artifactId> |
| <scope>provided</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.tajo</groupId> |
| <artifactId>tajo-storage-common</artifactId> |
| <scope>provided</scope> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.tajo</groupId> |
| <artifactId>tajo-storage-hdfs</artifactId> |
| <scope>provided</scope> |
| </dependency> |
| </dependencies> |
| |
| <profiles> |
| <profile> |
| <id>dist</id> |
| <activation> |
| <activeByDefault>false</activeByDefault> |
| <property> |
| <name>tar</name> |
| </property> |
| </activation> |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-antrun-plugin</artifactId> |
| <executions> |
| <execution> |
| <id>dist</id> |
| <phase>prepare-package</phase> |
| <goals> |
| <goal>run</goal> |
| </goals> |
| <configuration> |
| <target> |
| <echo file="${project.build.directory}/dist-layout-stitching.sh"> |
| run() { |
| echo "\$ ${@}" |
| "${@}" |
| res=$? |
| if [ $res != 0 ]; then |
| echo |
| echo "Failed!" |
| echo |
| exit $res |
| fi |
| } |
| |
| ROOT=`cd ${basedir}/..;pwd` |
| echo |
| echo "Current directory `pwd`" |
| echo |
| run rm -rf tajo-${project.version} |
| run mkdir tajo-${project.version} |
| run cd tajo-${project.version} |
| run cp -r $ROOT/tajo-common/target/tajo-common-${project.version}/* . |
| run cp -r $ROOT/tajo-rpc/target/tajo-rpc-${project.version}/* . |
| run cp -r $ROOT/tajo-algebra/target/tajo-algebra-${project.version}/* . |
| run cp -r $ROOT/tajo-plan/target/tajo-plan-${project.version}/* . |
| run cp -r $ROOT/tajo-client/target/tajo-client-${project.version}/* . |
| run cp -r $ROOT/tajo-client-example/target/tajo-client-example-${project.version}/* . |
| run cp -r $ROOT/tajo-cli/target/tajo-cli-${project.version}/* . |
| run cp -r $ROOT/tajo-catalog/target/tajo-catalog-${project.version}/* . |
| run cp -r $ROOT/tajo-storage/target/tajo-storage-${project.version}/* . |
| run cp -r $ROOT/tajo-sql-parser/target/tajo-sql-parser-${project.version}/* . |
| run cp -r $ROOT/tajo-storage/tajo-storage-jdbc/target/tajo-storage-jdbc-${project.version}.jar . |
| run cp -r $ROOT/tajo-storage/tajo-storage-pgsql/target/tajo-storage-pgsql-${project.version}.jar . |
| run cp -r $ROOT/tajo-pullserver/target/tajo-pullserver-${project.version}.jar . |
| run cp -r $ROOT/tajo-metrics/target/tajo-metrics-${project.version}.jar . |
| run cp -r $ROOT/tajo-core/target/tajo-core-${project.version}.jar . |
| run cp -r $ROOT/tajo-core/target/lib . |
| run cp -r ${project.basedir}/src/main/bin . |
| run cp -r ${project.basedir}/src/main/conf . |
| run rm -rf lib/tajo-*-${project.version}.jar |
| |
| run mkdir hive |
| run mv lib/hive-*.jar hive/ |
| |
| run mkdir -p share/jdbc-dist |
| run cp -r $ROOT/tajo-jdbc/target/tajo-jdbc-${project.version}-jar-with-dependencies.jar ./share/jdbc-dist/tajo-jdbc-${project.version}.jar |
| |
| run mkdir -p extlib |
| |
| if [ -f $ROOT/tajo-catalog/tajo-catalog-drivers/tajo-hive/target/lib/parquet-hive-bundle-*.jar ] |
| then |
| run cp -r $ROOT/tajo-catalog/tajo-catalog-drivers/tajo-hive/target/lib/parquet-hive-bundle-*.jar lib/ |
| echo |
| echo "Tajo installed parquet-hive-bundle library at: ${project.build.directory}/tajo-${project.version}" |
| echo |
| fi |
| |
| echo |
| echo "Tajo dist layout available at: ${project.build.directory}/tajo-${project.version}" |
| echo |
| </echo> |
| <exec executable="sh" dir="${project.build.directory}" failonerror="true"> |
| <arg line="./dist-layout-stitching.sh" /> |
| </exec> |
| <chmod dir="${project.build.directory}/tajo-${project.version}/bin" perm="ugo+rx" includes="**/*.sh,tajo,tajo-dump,tsql" /> |
| </target> |
| </configuration> |
| </execution> |
| <execution> |
| <id>tar</id> |
| <phase>package</phase> |
| <goals> |
| <goal>run</goal> |
| </goals> |
| <configuration> |
| <target if="tar"> |
| <echo file="${project.build.directory}/dist-tar-stitching.sh"> |
| run() { |
| echo "\$ ${@}" |
| "${@}" |
| res=$? |
| if [ $res != 0 ]; then |
| echo |
| echo "Failed!" |
| echo |
| exit $res |
| fi |
| } |
| |
| run tar czf tajo-${project.version}.tar.gz tajo-${project.version} |
| echo |
| echo "Tajo dist tar available at: ${project.build.directory}/tajo-${project.version}.tar.gz" |
| echo |
| </echo> |
| <exec executable="sh" dir="${project.build.directory}" failonerror="true"> |
| <arg line="./dist-tar-stitching.sh" /> |
| </exec> |
| </target> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| <profile> |
| <id>visualize</id> |
| <activation> |
| <activeByDefault>false</activeByDefault> |
| </activation> |
| <dependencies> |
| <dependency> |
| <groupId>org.apache.hadoop</groupId> |
| <artifactId>hadoop-yarn-common</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.hadoop</groupId> |
| <artifactId>hadoop-common</artifactId> |
| <exclusions> |
| <exclusion> |
| <groupId>commons-el</groupId> |
| <artifactId>commons-el</artifactId> |
| </exclusion> |
| <exclusion> |
| <groupId>tomcat</groupId> |
| <artifactId>jasper-runtime</artifactId> |
| </exclusion> |
| <exclusion> |
| <groupId>tomcat</groupId> |
| <artifactId>jasper-compiler</artifactId> |
| </exclusion> |
| <exclusion> |
| <groupId>org.mortbay.jetty</groupId> |
| <artifactId>jsp-2.1-jetty</artifactId> |
| </exclusion> |
| </exclusions> |
| </dependency> |
| </dependencies> |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>exec-maven-plugin</artifactId> |
| <executions> |
| <execution> |
| <phase>compile</phase> |
| <goals> |
| <goal>java</goal> |
| </goals> |
| <configuration> |
| <classpathScope>test</classpathScope> |
| <mainClass>org.apache.hadoop.yarn.state.VisualizeStateMachine</mainClass> |
| <arguments> |
| <argument>Tajo</argument> |
| <argument>org.apache.tajo.querymaster.Query, |
| org.apache.tajo.querymaster.Stage, |
| org.apache.tajo.querymaster.Task, |
| org.apache.tajo.querymaster.TaskAttempt |
| </argument> |
| <argument>Tajo.gv</argument> |
| </arguments> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| </profiles> |
| </project> |