123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437 |
- <?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.3.0-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.3.0-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.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>
- <agent.install.dir>/usr/lib/python2.6/site-packages/ambari_agent</agent.install.dir>
- <resmgmt.install.dir>/usr/lib/python2.6/site-packages/resource_management</resmgmt.install.dir>
- <jinja.install.dir>/usr/lib64/python2.6/site-packages/jinja2</jinja.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>
- <python.ver>python >= 2.6</python.ver>
- </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>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <version>1.8</version>
- <executions>
- <execution>
- <id>parse-version</id>
- <phase>validate</phase>
- <goals>
- <goal>parse-version</goal>
- </goals>
- </execution>
- <execution>
- <id>regex-property</id>
- <goals>
- <goal>regex-property</goal>
- </goals>
- <configuration>
- <name>ambariVersion</name>
- <value>${project.version}</value>
- <regex>-SNAPSHOT</regex>
- <replacement></replacement>
- <failIfNoMatch>false</failIfNoMatch>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <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}/../ambari-common/src/main/python:${project.basedir}/src/main/python/ambari_agent:${project.basedir}/src/main/python/resource_management:${project.basedir}/src/main/puppet/modules/hdp-hadoop/files:$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>
- <!-- unbinds rpm creation from maven lifecycle -->
- <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>
- <scriptFile>src/main/package/rpm/preremove.sh</scriptFile>
- <fileEncoding>utf-8</fileEncoding>
- </preremoveScriptlet>
- <needarch>x86_64</needarch>
- <autoRequires>false</autoRequires>
- <mappings>
- <mapping>
- <directory>${agent.install.dir}</directory>
- <sources>
- <source>
- <location>${project.build.directory}/${project.artifactId}-${project.version}/ambari_agent</location>
- </source>
- </sources>
- </mapping>
- <mapping>
- <directory>${resmgmt.install.dir}</directory>
- <sources>
- <source>
- <location>${project.build.directory}/${project.artifactId}-${project.version}/resource_management</location>
- </source>
- </sources>
- </mapping>
- <mapping>
- <directory>${lib.dir}</directory>
- <filemode>755</filemode>
- <username>root</username>
- <groupname>root</groupname>
- <sources>
- <source>
- <location>${project.build.directory}/lib</location>
- </source>
- </sources>
- </mapping>
- <mapping>
- <directory>${jinja.install.dir}</directory>
- <sources>
- <source>
- <location>${project.basedir}/../ambari-common/src/main/python/jinja2/jinja2</location>
- <excludes>
- <exclude>${project.basedir}/../ambari-common/src/main/python/jinja2/jinja2/testsuite</exclude>
- </excludes>
- </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>/var/lib/${project.artifactId}/upgrade_stack</directory>
- <filemode>755</filemode>
- <username>root</username>
- <groupname>root</groupname>
- <sources>
- <source>
- <location>src/main/upgrade_stack</location>
- </source>
- </sources>
- </mapping>
- <mapping>
- <directory>/etc/ambari-agent/conf</directory>
- <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>
- <filter>true</filter>
- </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>
- <mapping>
- <directory>/etc/rc.d/init.d</directory>
- <filemode>755</filemode>
- <username>root</username>
- <groupname>root</groupname>
- <sources>
- <source>
- <location>etc/init.d/ambari-agent</location>
- </source>
- </sources>
- </mapping>
- <mapping>
- <directory>/var/lib/${project.artifactId}/data</directory>
- <filemode>755</filemode>
- <username>root</username>
- <groupname>root</groupname>
- <sources>
- <source>
- <location>../version</location>
- <filter>true</filter>
- </source>
- </sources>
- </mapping>
- <mapping>
- <!-- TODO: Remove when we introduce metadata downloading by agent-->
- <directory>/var/lib/ambari-agent/cache/stacks</directory>
- <sources>
- <source>
- <location>../ambari-server/src/main/resources/stacks</location>
- </source>
- </sources>
- </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>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>buildnumber-maven-plugin</artifactId>
- <version>${buildnumber-maven-plugin-version}</version>
- <configuration>
- <urlScm>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-ambari.git</urlScm>
- </configuration>
- <executions>
- <execution>
- <phase>validate</phase>
- <goals>
- <goal>create</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- <extensions>
- <extension>
- <groupId>org.apache.maven.wagon</groupId>
- <artifactId>wagon-ssh-external</artifactId>
- </extension>
- </extensions>
- </build>
- </project>
|