| <!-- |
| 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"> |
| <modelVersion>4.0.0</modelVersion> |
| <artifactId>slider-assembly</artifactId> |
| <name>Apache Slider Binary Distribution</name> |
| <packaging>pom</packaging> |
| <description>Apache Slider is a tool for dynamically deploying distributed applications to an Apache YARN cluster. This module provides the binary redistributable.</description> |
| <parent> |
| <groupId>org.apache.slider</groupId> |
| <artifactId>slider</artifactId> |
| <version>0.90.0-incubating-SNAPSHOT</version> |
| </parent> |
| |
| |
| <properties> |
| <rpm.basedir>/usr/lib/slider</rpm.basedir> |
| <rpm.confdir>${rpm.basedir}/conf</rpm.confdir> |
| <rpm.bindir>${rpm.basedir}/bin</rpm.bindir> |
| <rpm.libdir>${rpm.basedir}/lib</rpm.libdir> |
| <rpm.agentdir>${rpm.basedir}/agent</rpm.agentdir> |
| <rpm.username>root</rpm.username> |
| <rpm.groupname>root</rpm.groupname> |
| <src.confdir>src/conf-hdp</src.confdir> |
| <src.libdir>${project.build.directory}/lib</src.libdir> |
| <src.agent.ini.dir>${project.build.directory}/../../slider-agent/conf</src.agent.ini.dir> |
| <python.ver>python >= 2.6</python.ver> |
| <executable.python>${project.basedir}/../slider-agent/src/test/python/python-wrap</executable.python> |
| <python.path.l>${project.basedir}/src/main/scripts:${project.basedir}/../slider-agent/src/test/python/mock:${project.basedir}/src/test/python/scripts</python.path.l> |
| <skipTests>false</skipTests> |
| </properties> |
| |
| <build> |
| <plugins> |
| <!--read in a build.properties file if defined--> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>properties-maven-plugin</artifactId> |
| <version>${maven.properties.version}</version> |
| <executions> |
| <execution> |
| <phase>initialize</phase> |
| <goals> |
| <goal>read-project-properties</goal> |
| </goals> |
| <configuration> |
| <quiet>true</quiet> |
| <files> |
| <file>build.properties</file> |
| <file>../build.properties</file> |
| </files> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>exec-maven-plugin</artifactId> |
| <version>${maven-exec-plugin.version}</version> |
| <executions> |
| <execution> |
| <configuration> |
| <executable>${executable.python}</executable> |
| <workingDirectory>src/test/python</workingDirectory> |
| <arguments> |
| <argument>unitTests.py</argument> |
| </arguments> |
| <environmentVariables> |
| <PYTHONPATH>${python.path.l}</PYTHONPATH> |
| </environmentVariables> |
| <skip>${skipTests}</skip> |
| </configuration> |
| <id>python-test</id> |
| <phase>test</phase> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <!-- pull in all dependencies --> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-dependency-plugin</artifactId> |
| <version>${maven-dependency-plugin.version}</version> |
| <executions> |
| <execution> |
| <id>copy-dependencies</id> |
| <phase>prepare-package</phase> |
| <goals> |
| <goal>copy-dependencies</goal> |
| </goals> |
| <configuration> |
| <outputDirectory>${project.build.directory}/lib</outputDirectory> |
| <overWriteReleases>false</overWriteReleases> |
| <overWriteSnapshots>true</overWriteSnapshots> |
| <overWriteIfNewer>true</overWriteIfNewer> |
| <!-- <tarLongFileFormat>gnu</tarLongFileFormat>--> |
| </configuration> |
| </execution> |
| <execution> |
| <!-- copy in the agent tar file --> |
| <id>copy</id> |
| <phase>prepare-package</phase> |
| <goals> |
| <goal>copy</goal> |
| </goals> |
| <configuration> |
| <artifactItems> |
| <artifactItem> |
| <groupId>org.apache.slider</groupId> |
| <artifactId>slider-agent</artifactId> |
| <type>tar.gz</type> |
| <overWrite>false</overWrite> |
| <outputDirectory>${project.build.directory}/agent</outputDirectory> |
| <destFileName>slider-agent.tar.gz</destFileName> |
| </artifactItem> |
| </artifactItems> |
| </configuration> |
| </execution> |
| <execution> |
| <!-- copy in the agent tar file --> |
| <id>copy-to-lib</id> |
| <phase>prepare-package</phase> |
| <goals> |
| <goal>copy</goal> |
| </goals> |
| <configuration> |
| <artifactItems> |
| <artifactItem> |
| <groupId>org.apache.slider</groupId> |
| <artifactId>slider-agent</artifactId> |
| <type>tar.gz</type> |
| <overWrite>false</overWrite> |
| <outputDirectory>${project.build.directory}/lib</outputDirectory> |
| <destFileName>slider-agent.tar.gz</destFileName> |
| </artifactItem> |
| </artifactItems> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-source-plugin</artifactId> |
| <version>${maven-source-plugin.version}</version> |
| <inherited>true</inherited> |
| <executions> |
| <execution> |
| <id>attach-sources</id> |
| <phase>verify</phase> |
| <goals> |
| <goal>jar</goal> |
| <goal>test-jar</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-enforcer-plugin</artifactId> |
| <version>${maven-enforcer-plugin.version}</version> |
| <inherited>false</inherited> |
| <configuration> |
| <rules> |
| <requireMavenVersion> |
| <version>${maven.version.range}</version> |
| </requireMavenVersion> |
| <requireJavaVersion> |
| <version>${project.java.src.version}</version> |
| </requireJavaVersion> |
| </rules> |
| </configuration> |
| <executions> |
| <execution> |
| <id>default</id> |
| <goals> |
| <goal>enforce</goal> |
| </goals> |
| <phase>validate</phase> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <!-- assemble the tar file --> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-assembly-plugin</artifactId> |
| <version>${maven-assembly-plugin.version}</version> |
| <executions> |
| <execution> |
| <id>make-dependency</id> |
| <phase>prepare-package</phase> |
| <goals> |
| <goal>single</goal> |
| </goals> |
| <configuration> |
| <tarLongFileMode>gnu</tarLongFileMode> |
| <descriptors> |
| <descriptor>src/assembly/slider-dependency.xml</descriptor> |
| </descriptors> |
| <finalName>slider</finalName> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-resources-plugin</artifactId> |
| <version>${maven-resources-plugin.version}</version> |
| <executions> |
| <execution> |
| <id>copy-dependency</id> |
| <phase>prepare-package</phase> |
| <goals> |
| <goal>copy-resources</goal> |
| </goals> |
| <configuration> |
| <outputDirectory>${project.build.directory}/lib</outputDirectory> |
| <overwrite>true</overwrite> |
| <resources> |
| <resource> |
| <directory>${project.build.directory}</directory> |
| <includes> |
| <include>slider-dependency.tar.gz</include> |
| </includes> |
| </resource> |
| </resources> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-assembly-plugin</artifactId> |
| <version>${maven-assembly-plugin.version}</version> |
| <executions> |
| <execution> |
| <id>make-assembly</id> |
| <phase>package</phase> |
| <goals> |
| <goal>single</goal> |
| </goals> |
| <configuration> |
| <tarLongFileMode>gnu</tarLongFileMode> |
| <descriptors> |
| <descriptor>src/assembly/slider-bin.xml</descriptor> |
| </descriptors> |
| <finalName>slider-${project.version}</finalName> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <!-- verification phase checks for files in the target assembly --> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-verifier-plugin</artifactId> |
| <version>${maven-verifier-plugin.version}</version> |
| <configuration> |
| <verificationFile>src/assembly/verifications.xml</verificationFile> |
| </configuration> |
| <executions> |
| <execution> |
| <id>main</id> |
| <phase>verify</phase> |
| <goals> |
| <goal>verify</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| |
| </plugins> |
| |
| |
| </build> |
| |
| <reporting> |
| <plugins> |
| |
| |
| |
| </plugins> |
| </reporting> |
| |
| <profiles> |
| <profile> |
| <id>Windows</id> |
| <activation> |
| <os><family>windows</family></os> |
| </activation> |
| <properties> |
| <executable.python>python</executable.python> |
| <python.path.l>${project.basedir}\src\main\scripts;${project.basedir}\..\slider-agent\src\test\python\mock;${project.basedir}\src\test\python\scripts</python.path.l> |
| </properties> |
| </profile> |
| |
| <profile> |
| <id>Linux</id> |
| <activation> |
| <os><family>!windows</family></os> |
| </activation> |
| <properties> |
| <executable.python>${project.basedir}/../slider-agent/src/test/python/python-wrap</executable.python> |
| <python.path.l>${project.basedir}/src/main/scripts:${project.basedir}/../slider-agent/src/test/python/mock:${project.basedir}/src/test/python/scripts</python.path.l> |
| </properties> |
| </profile> |
| <profile> |
| <id>rpm</id> |
| <build> |
| <plugins> |
| <!-- RPM --> |
| |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>rpm-maven-plugin</artifactId> |
| <version>${maven-rpm-plugin.version}</version> |
| <executions> |
| <execution> |
| <id>generate-rpm</id> |
| <goals> |
| <goal>rpm</goal> |
| </goals> |
| </execution> |
| </executions> |
| <configuration> |
| <license>http://www.apache.org/licenses/LICENSE-2.0</license> |
| <name>slider</name> |
| <version>${project.version}</version> |
| <!-- |
| <release>${project.version}</release> |
| --> |
| <!----> |
| <distribution /> |
| <group>Applications/Engineering</group> |
| <!--<icon>src/main/resources/icon.gif</icon>--> |
| <!--<packager>ASF</packager>--> |
| <prefix>${rpm.basedir}</prefix> |
| <!-- |
| <changelogFile>src/changelog</changelogFile> |
| --> |
| <!-- <defineStatements> |
| <defineStatement>_unpackaged_files_terminate_build 0</defineStatement> |
| </defineStatements>--> |
| <provides> |
| <provide>apache-slider</provide> |
| </provides> |
| <mappings> |
| <mapping> |
| <directory>${rpm.basedir}</directory> |
| <!-- RWXR.XR.X --> |
| <filemode>755</filemode> |
| |
| <username>${rpm.username}</username> |
| <groupname>${rpm.groupname}</groupname> |
| <sources> |
| |
| </sources> |
| </mapping> |
| |
| <!-- binaries --> |
| <mapping> |
| <directory>${rpm.bindir}</directory> |
| <!-- RWXR.XR.X --> |
| <filemode>0755</filemode> |
| <username>${rpm.username}</username> |
| <groupname>${rpm.groupname}</groupname> |
| <sources> |
| <source> |
| <location>src/main/scripts</location> |
| </source> |
| </sources> |
| </mapping> |
| |
| <!-- library --> |
| <mapping> |
| <directory>${rpm.libdir}</directory> |
| <!-- RWXR.XR.X --> |
| <filemode>755</filemode> |
| |
| <username>${rpm.username}</username> |
| <groupname>${rpm.groupname}</groupname> |
| <sources> |
| <source> |
| <location>${src.libdir}</location> |
| </source> |
| </sources> |
| </mapping> |
| |
| <!-- configuration --> |
| <mapping> |
| <directory>${rpm.confdir}</directory> |
| <configuration>true</configuration> |
| <filemode>0755</filemode> |
| <username>${rpm.username}</username> |
| <groupname>${rpm.groupname}</groupname> |
| <sources> |
| <source> |
| <location>${src.confdir}</location> |
| </source> |
| </sources> |
| </mapping> |
| |
| <!-- agent.ini --> |
| <mapping> |
| <directory>${rpm.agentdir}/conf</directory> |
| <configuration>true</configuration> |
| <filemode>0755</filemode> |
| <username>${rpm.username}</username> |
| <groupname>${rpm.groupname}</groupname> |
| <directoryIncluded>false</directoryIncluded> |
| <sources> |
| <source> |
| <location>${src.agent.ini.dir}</location> |
| <includes> |
| <include>*.ini |
| </include> |
| </includes> |
| </source> |
| </sources> |
| </mapping> |
| |
| <!-- needed to apply attribute to directory --> |
| <mapping> |
| <directory>${rpm.agentdir}</directory> |
| <filemode>0755</filemode> |
| <username>${rpm.username}</username> |
| <groupname>${rpm.groupname}</groupname> |
| <directoryIncluded>true</directoryIncluded> |
| </mapping> |
| |
| <mapping> |
| <directory>${rpm.agentdir}/conf</directory> |
| <filemode>0755</filemode> |
| <username>${rpm.username}</username> |
| <groupname>${rpm.groupname}</groupname> |
| <directoryIncluded>true</directoryIncluded> |
| </mapping> |
| |
| </mappings> |
| <!-- |
| Scripts. Very dangerous in RPMs unless you know exactly what you are doing. |
| It's very easy to break the uninstall process, in particular. |
| --> |
| <!-- |
| <preinstallScriptlet> |
| <script>echo "installing slider"</script> |
| </preinstallScriptlet> |
| --> |
| <!-- |
| <postinstallScriptlet> |
| <scriptFile>src/main/scripts/postinstall</scriptFile> |
| <fileEncoding>utf-8</fileEncoding> |
| </postinstallScriptlet> |
| --> |
| <!-- |
| <preremoveScriptlet> |
| <scriptFile>src/main/scripts/preremove</scriptFile> |
| <fileEncoding>utf-8</fileEncoding> |
| </preremoveScriptlet> |
| --> |
| </configuration> |
| </plugin> |
| |
| </plugins> |
| </build> |
| </profile> |
| |
| </profiles> |
| |
| <dependencies> |
| |
| <dependency> |
| <groupId>org.apache.slider</groupId> |
| <artifactId>slider-core</artifactId> |
| <version>${project.version}</version> |
| </dependency> |
| |
| <!-- |
| needed to order the build and ensure the agent tar is found |
| the test scope ensures that it isn't copied into the lib dir |
| --> |
| <dependency> |
| <groupId>org.apache.slider</groupId> |
| <artifactId>slider-agent</artifactId> |
| <version>${project.version}</version> |
| <scope>test</scope> |
| <type>tar.gz</type> |
| </dependency> |
| |
| <dependency> |
| <groupId>com.beust</groupId> |
| <artifactId>jcommander</artifactId> |
| </dependency> |
| |
| |
| <dependency> |
| <groupId>org.apache.hadoop</groupId> |
| <artifactId>hadoop-client</artifactId> |
| </dependency> |
| |
| </dependencies> |
| |
| |
| </project> |