| <?xml version="1.0"?> |
| <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"> |
| <!-- |
| 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. |
| --> |
| <parent> |
| <groupId>org.apache.ambari</groupId> |
| <artifactId>ambari-project</artifactId> |
| <version>1.2.2-SNAPSHOT</version> |
| <relativePath>../ambari-project</relativePath> |
| </parent> |
| <modelVersion>4.0.0</modelVersion> |
| <groupId>org.apache.ambari</groupId> |
| <artifactId>ambari-agent</artifactId> |
| <packaging>pom</packaging> |
| <version>1.2.2-SNAPSHOT</version> |
| <name>Ambari Agent</name> |
| <description>Ambari Agent</description> |
| <properties> |
| <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| <final.name>${project.artifactId}-${project.version}</final.name> |
| <package.release>1</package.release> |
| <package.prefix>/usr</package.prefix> |
| <package.conf.dir>/etc/ambari-agent/conf</package.conf.dir> |
| <package.log.dir>/var/log/ambari-agent</package.log.dir> |
| <package.pid.dir>/var/run/ambari-agent</package.pid.dir> |
| <skipTests>false</skipTests> |
| <facter.tar>http://downloads.puppetlabs.com/facter/facter-1.6.10.tar.gz</facter.tar> |
| <puppet.tar>http://downloads.puppetlabs.com/puppet/puppet-2.7.9.tar.gz</puppet.tar> |
| <install.dir>/usr/lib/python2.6/site-packages/ambari_agent</install.dir> |
| <ruby.tar>http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.15/repos/centos6/ruby-1.8.7-p370.tar.gz</ruby.tar> |
| <lib.dir>/usr/lib/ambari-agent/lib</lib.dir> |
| </properties> |
| <profiles> |
| <profile> |
| <id>suse11</id> |
| <properties> |
| <ruby.tar>http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.15/repos/suse11/ruby-1.8.7-p370.tar.gz</ruby.tar> |
| </properties> |
| </profile> |
| <profile> |
| <id>centos5</id> |
| <properties> |
| <ruby.tar>http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.15/repos/centos5/ruby-1.8.7-p370.tar.gz</ruby.tar> |
| </properties> |
| </profile> |
| </profiles> |
| <build> |
| <plugins> |
| <plugin> |
| <artifactId>maven-compiler-plugin</artifactId> |
| <version>3.0</version> |
| </plugin> |
| <plugin> |
| <artifactId>maven-assembly-plugin</artifactId> |
| <configuration> |
| <tarLongFileMode>gnu</tarLongFileMode> |
| <descriptors> |
| <descriptor>src/packages/tarball/all.xml</descriptor> |
| </descriptors> |
| </configuration> |
| <executions> |
| <execution> |
| <id>build-tarball</id> |
| <phase>prepare-package</phase> |
| <goals> |
| <goal>single</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>exec-maven-plugin</artifactId> |
| <version>1.2</version> |
| <executions> |
| <execution> |
| <configuration> |
| <executable>python2.6</executable> |
| <workingDirectory>src/test/python</workingDirectory> |
| <arguments> |
| <argument>unitTests.py</argument> |
| </arguments> |
| <environmentVariables> |
| <PYTHONPATH>${project.basedir}/../ambari-common/src/test/python:${project.basedir}/src/main/python/ambari_agent:$PYTHONPATH</PYTHONPATH> |
| </environmentVariables> |
| <skip>${skipTests}</skip> |
| </configuration> |
| <id>python-test</id> |
| <phase>test</phase> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| </execution> |
| <execution> |
| <configuration> |
| <executable>python2.6</executable> |
| <workingDirectory>target/ambari-agent-${project.version}</workingDirectory> |
| <arguments> |
| <argument>${project.basedir}/src/main/python/setup.py</argument> |
| <argument>clean</argument> |
| <argument>bdist_dumb</argument> |
| </arguments> |
| <environmentVariables> |
| <PYTHONPATH>target/ambari-agent-${project.version}:$PYTHONPATH</PYTHONPATH> |
| </environmentVariables> |
| </configuration> |
| <id>python-package</id> |
| <phase>package</phase> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>rpm-maven-plugin</artifactId> |
| <version>2.0.1</version> |
| <executions> |
| <execution> |
| <phase>none</phase> |
| <goals> |
| <goal>rpm</goal> |
| </goals> |
| </execution> |
| </executions> |
| <configuration> |
| <copyright>2012, Apache Software Foundation</copyright> |
| <group>Development</group> |
| <description>Maven Recipe: RPM Package.</description> |
| <requires> |
| <require>openssl</require> |
| <require>zlib</require> |
| <require>${python.ver}</require> |
| </requires> |
| <postinstallScriptlet> |
| <scriptFile>src/main/package/rpm/postinstall.sh</scriptFile> |
| <fileEncoding>utf-8</fileEncoding> |
| </postinstallScriptlet> |
| <preinstallScriptlet> |
| <scriptFile>src/main/package/rpm/preinstall.sh</scriptFile> |
| <fileEncoding>utf-8</fileEncoding> |
| </preinstallScriptlet> |
| <preremoveScriptlet> |
| <script>mv /etc/ambari-agent/conf /etc/ambari-agent/conf.save</script> |
| </preremoveScriptlet> |
| |
| <needarch>x86_64</needarch> |
| <autoRequires>false</autoRequires> |
| <mappings> |
| <mapping> |
| <directory>${install.dir}</directory> |
| <sources> |
| <source> |
| <location>${project.build.directory}/${project.artifactId}-${project.version}/ambari_agent</location> |
| </source> |
| </sources> |
| </mapping> |
| <mapping> |
| <directory>${lib.dir}</directory> |
| <sources> |
| <source> |
| <location>${project.build.directory}/lib</location> |
| </source> |
| </sources> |
| </mapping> |
| <mapping> |
| <directory>${lib.dir}/examples</directory> |
| <filemode>755</filemode> |
| <username>root</username> |
| <groupname>root</groupname> |
| <sources> |
| <source> |
| <location>src/examples</location> |
| </source> |
| </sources> |
| </mapping> |
| <mapping> |
| <directory>/var/lib/${project.artifactId}/puppet</directory> |
| <filemode>755</filemode> |
| <username>root</username> |
| <groupname>root</groupname> |
| <sources> |
| <source> |
| <location>src/main/puppet</location> |
| </source> |
| </sources> |
| </mapping> |
| <mapping> |
| <directory>${package.conf.dir}</directory> |
| <configuration>true</configuration> |
| <filemode>755</filemode> |
| <username>root</username> |
| <groupname>root</groupname> |
| <sources> |
| <source> |
| <location>conf/unix/ambari-agent.ini</location> |
| </source> |
| </sources> |
| </mapping> |
| <mapping> |
| <directory>/usr/sbin</directory> |
| <filemode>755</filemode> |
| <username>root</username> |
| <groupname>root</groupname> |
| <sources> |
| <source> |
| <location>conf/unix/ambari-agent</location> |
| </source> |
| </sources> |
| </mapping> |
| <mapping> |
| <directory>/var/lib/ambari-agent</directory> |
| <filemode>700</filemode> |
| <username>root</username> |
| <groupname>root</groupname> |
| <sources> |
| <source> |
| <location>conf/unix/ambari-env.sh</location> |
| </source> |
| </sources> |
| </mapping> |
| <mapping> |
| <directory>${package.pid.dir}</directory> |
| <filemode>755</filemode> |
| <username>root</username> |
| <groupname>root</groupname> |
| </mapping> |
| <mapping> |
| <directory>/var/lib/${project.artifactId}/data</directory> |
| <filemode>755</filemode> |
| <username>root</username> |
| <groupname>root</groupname> |
| </mapping> |
| <mapping> |
| <directory>/var/lib/${project.artifactId}/keys</directory> |
| <filemode>755</filemode> |
| <username>root</username> |
| <groupname>root</groupname> |
| </mapping> |
| <mapping> |
| <directory>${package.log.dir}</directory> |
| <filemode>755</filemode> |
| <username>root</username> |
| <groupname>root</groupname> |
| </mapping> |
| <mapping> |
| <directory>/var/ambari-agent</directory> |
| <filemode>755</filemode> |
| <username>root</username> |
| <groupname>root</groupname> |
| </mapping> |
| <!-- --> |
| </mappings> |
| </configuration> |
| </plugin> |
| <plugin> |
| <groupId>com.github.goldin</groupId> |
| <artifactId>copy-maven-plugin</artifactId> |
| <version>0.2.5</version> |
| <executions> |
| <execution> |
| <id>create-archive</id> |
| <phase>package</phase> |
| <goals> |
| <goal>copy</goal> |
| </goals> |
| <configuration> |
| <resources> |
| <resource> |
| <targetPath>${project.build.directory}/lib</targetPath> |
| <file>${ruby.tar}</file> |
| <unpack>true</unpack> |
| </resource> |
| <resource> |
| <targetPath>${project.build.directory}/lib</targetPath> |
| <file>${facter.tar}</file> |
| <unpack>true</unpack> |
| </resource> |
| <resource> |
| <targetPath>${project.build.directory}/lib</targetPath> |
| <file>${puppet.tar}</file> |
| <unpack>true</unpack> |
| </resource> |
| </resources> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.rat</groupId> |
| <artifactId>apache-rat-plugin</artifactId> |
| <configuration> |
| <excludes> |
| <exclude>src/examples/*</exclude> |
| <exclude>src/test/python/dummy*.txt</exclude> |
| <exclude>src/main/python/ambari_agent/imports.txt</exclude> |
| <exclude>src/main/puppet/modules/stdlib/**</exclude> |
| <exclude>**/*.erb</exclude> |
| <exclude>**/*.json</exclude> |
| </excludes> |
| </configuration> |
| </plugin> |
| </plugins> |
| <extensions> |
| <extension> |
| <groupId>org.apache.maven.wagon</groupId> |
| <artifactId>wagon-ssh-external</artifactId> |
| </extension> |
| </extensions> |
| </build> |
| </project> |