| <?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"> |
| |
| <modelVersion>4.0.0</modelVersion> |
| |
| <parent> |
| <groupId>org.apache</groupId> |
| <artifactId>sqoop</artifactId> |
| <version>1.99.7</version> |
| </parent> |
| |
| <groupId>org.apache.sqoop</groupId> |
| <artifactId>sqoop-dist</artifactId> |
| <name>Sqoop Distribution</name> |
| <packaging>pom</packaging> |
| |
| <properties> |
| <hadoop.version>200</hadoop.version> |
| </properties> |
| |
| <dependencies> |
| <dependency> |
| <groupId>org.apache.sqoop</groupId> |
| <artifactId>sqoop-server</artifactId> |
| </dependency> |
| <dependency> |
| <groupId>org.apache.sqoop</groupId> |
| <artifactId>sqoop-shell</artifactId> |
| </dependency> |
| </dependencies> |
| |
| <profiles> |
| <!-- Build source distribution (activated by -Psource) --> |
| <profile> |
| <id>source</id> |
| <activation> |
| <activeByDefault>false</activeByDefault> |
| </activation> |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-antrun-plugin</artifactId> |
| <executions> |
| <execution> |
| <phase>package</phase> |
| <goals> |
| <goal>run</goal> |
| </goals> |
| <configuration> |
| <target> |
| <!-- Clean up --> |
| <delete dir="target/sqoop-${project.version}"/> |
| <delete file="target/sqoop-${project.version}.tar.gz"/> |
| |
| <!-- Create dist dir --> |
| <mkdir dir="target/sqoop-${project.version}"/> |
| |
| <!-- Copy sources over --> |
| <copy todir="target/sqoop-${project.version}" includeEmptyDirs="false" flatten="false"> |
| <fileset dir="../"> |
| <include name="**/*" /> |
| <exclude name="build/**" /> |
| <exclude name="**/target/**" /> |
| <exclude name=".git/**" /> |
| <exclude name="tags" /> |
| <exclude name="**/.project" /> |
| <exclude name="**/.classpath" /> |
| <exclude name="**/.settings/**" /> |
| </fileset> |
| </copy> |
| |
| <!-- Create final distribution tar --> |
| <tar destfile="target/sqoop-${project.version}.tar.gz" compression="gzip"> |
| <tarfileset dir="target/sqoop-${project.version}" prefix="sqoop-${project.version}" filemode="755"> |
| <include name="**/*.sh" /> |
| </tarfileset> |
| <tarfileset dir="target/sqoop-${project.version}" prefix="sqoop-${project.version}"> |
| <include name="**/*" /> |
| <exclude name="**/bin/*" /> |
| </tarfileset> |
| </tar> |
| </target> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| |
| <!-- Build binary distribution (activated by -Pbinary) --> |
| <profile> |
| <id>binary</id> |
| <activation> |
| <activeByDefault>false</activeByDefault> |
| </activation> |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-antrun-plugin</artifactId> |
| <executions> |
| <execution> |
| <phase>package</phase> |
| <goals> |
| <goal>run</goal> |
| </goals> |
| <configuration> |
| <target> |
| <!-- Clean up --> |
| <delete dir="target/sqoop-${project.version}-bin-hadoop${hadoop.version}"/> |
| <delete file="target/sqoop-${project.version}-bin-hadoop${hadoop.version}.tar.gz"/> |
| |
| <!-- Create dist dir --> |
| <mkdir dir="target/sqoop-${project.version}-bin-hadoop${hadoop.version}"/> |
| |
| <!-- Copy LICENSE, CHANGELOG, README and NOTICE over --> |
| <copy todir="target/sqoop-${project.version}-bin-hadoop${hadoop.version}" includeEmptyDirs="false" flatten="false"> |
| <fileset dir="../"> |
| <include name="**/LICENSE.txt" /> |
| <include name="**/CHANGELOG.txt" /> |
| <include name="**/README.txt" /> |
| <include name="**/NOTICE.txt" /> |
| </fileset> |
| </copy> |
| |
| <!-- Copy generated documentation --> |
| <copy todir="target/sqoop-${project.version}-bin-hadoop${hadoop.version}/docs" includeEmptyDirs="false" flatten="false"> |
| <fileset dir="../docs/target/site"> |
| <include name="**/*" /> |
| </fileset> |
| </copy> |
| |
| <copy todir="target/sqoop-${project.version}-bin-hadoop${hadoop.version}/server/lib"> |
| <fileset dir="../server/target/lib"> |
| <include name="*.jar" /> |
| </fileset> |
| </copy> |
| <copy file="../server/target/sqoop-server-${project.version}.jar" |
| toDir="target/sqoop-${project.version}-bin-hadoop${hadoop.version}/server/lib"/> |
| |
| <!-- Build shell client directory --> |
| <copy todir="target/sqoop-${project.version}-bin-hadoop${hadoop.version}/shell/lib"> |
| <fileset dir="../shell/target/lib"> |
| <include name="*.jar" /> |
| <exclude name="junit-*.jar" /> |
| <exclude name="mockito-*.jar" /> |
| </fileset> |
| </copy> |
| <copy file="../shell/target/sqoop-shell-${project.version}.jar" |
| toDir="target/sqoop-${project.version}-bin-hadoop${hadoop.version}/shell/lib"/> |
| |
| <!-- Build tools client directory --> |
| <copy todir="target/sqoop-${project.version}-bin-hadoop${hadoop.version}/tools/lib"> |
| <fileset dir="../tools/target/lib"> |
| <include name="*.jar" /> |
| </fileset> |
| </copy> |
| <copy file="../tools/target/sqoop-tools-${project.version}.jar" |
| toDir="target/sqoop-${project.version}-bin-hadoop${hadoop.version}/tools/lib"/> |
| |
| <!-- Build "conf" directory --> |
| <copy todir="target/sqoop-${project.version}-bin-hadoop${hadoop.version}/conf"> |
| <fileset dir="src/main/conf"/> |
| </copy> |
| |
| <!-- Build "bin" directory --> |
| <copy todir="target/sqoop-${project.version}-bin-hadoop${hadoop.version}/bin"> |
| <fileset dir="src/main/bin"/> |
| </copy> |
| <chmod dir="target/sqoop-${project.version}-bin-hadoop${hadoop.version}/bin" perm="ugo+x" includes="*"/> |
| |
| <!-- Finally create distribution tar --> |
| <tar destfile="target/sqoop-${project.version}-bin-hadoop${hadoop.version}.tar.gz" compression="gzip"> |
| <tarfileset dir="target/sqoop-${project.version}-bin-hadoop${hadoop.version}" prefix="sqoop-${project.version}-bin-hadoop${hadoop.version}" filemode="755"> |
| <include name="**/*.sh" /> |
| <include name="bin/sqoop2-*" /> |
| </tarfileset> |
| <tarfileset dir="target/sqoop-${project.version}-bin-hadoop${hadoop.version}" prefix="sqoop-${project.version}-bin-hadoop${hadoop.version}"> |
| <include name="**/*" /> |
| <exclude name="bin/sqoop2-*" /> |
| <exclude name="**/*.sh" /> |
| </tarfileset> |
| </tar> |
| </target> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| </profiles> |
| |
| </project> |