| <?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.slider</groupId> |
| <artifactId>slider</artifactId> |
| <version>0.92.0-incubating-SNAPSHOT</version> |
| </parent> |
| <modelVersion>4.0.0</modelVersion> |
| <artifactId>slider-agent</artifactId> |
| <packaging>pom</packaging> |
| <name>Slider Agent</name> |
| <description>Slider Agent</description> |
| <properties> |
| <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| <final.name>${project.artifactId}-${project.version}</final.name> |
| <package.release>1</package.release> |
| <skipTests>false</skipTests> |
| <python.ver>python >= 2.6</python.ver> |
| <executable.python>${project.build.directory}/test/python-wrap</executable.python> |
| <python.path.l>${project.build.directory}/src/jinja2:${project.build.directory}/test:${project.build.directory}/src:${project.build.directory}/src/agent:${project.build.directory}/src/resource_management:${project.build.directory}/test/agent:${project.build.directory}/test/resource_management:${project.build.directory}/src/kazoo</python.path.l> |
| </properties> |
| <build> |
| <plugins> |
| |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-assembly-plugin</artifactId> |
| <configuration> |
| <tarLongFileMode>gnu</tarLongFileMode> |
| <descriptor>src/packages/tarball/all.xml</descriptor> |
| <appendAssemblyId>false</appendAssemblyId> |
| </configuration> |
| <executions> |
| <execution> |
| <id>build-tarball</id> |
| <phase>package</phase> |
| <goals> |
| <goal>single</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| |
| <!-- Copy src/main/python into target/src and src/test/python into target/test --> |
| <!-- This helps us keep the Maven workspace clean (no .pyc files laying around) --> |
| <plugin> |
| <artifactId>maven-resources-plugin</artifactId> |
| <version>${maven-resources-plugin.version}</version> |
| <executions> |
| <execution> |
| <id>copy-resources</id> |
| <phase>generate-resources</phase> |
| <goals> |
| <goal>copy-resources</goal> |
| </goals> |
| <configuration> |
| <outputDirectory>${basedir}/target/src</outputDirectory> |
| <resources> |
| <resource> |
| <directory>${basedir}/src/main/python</directory> |
| </resource> |
| </resources> |
| </configuration> |
| </execution> |
| <execution> |
| <id>copy-test-resources</id> |
| <phase>generate-test-resources</phase> |
| <goals> |
| <goal>copy-resources</goal> |
| </goals> |
| <configuration> |
| <outputDirectory>${basedir}/target/test</outputDirectory> |
| <resources> |
| <resource> |
| <directory>${basedir}/src/test/python</directory> |
| </resource> |
| </resources> |
| </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>${project.build.directory}/test</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> |
| |
| |
| </plugins> |
| |
| <extensions> |
| <extension> |
| <groupId>org.apache.maven.wagon</groupId> |
| <artifactId>wagon-ssh-external</artifactId> |
| </extension> |
| </extensions> |
| </build> |
| |
| <profiles> |
| <profile> |
| <id>Windows</id> |
| <activation> |
| <os><family>windows</family></os> |
| </activation> |
| <properties> |
| <executable.python>python</executable.python> |
| <python.path.l>${project.build.directory}\src\jinja2;${project.build.directory}\test;${project.build.directory}\src;${project.build.directory}\src\agent;${project.build.directory}\src\resource_management;${project.build.directory}\test\agent;${project.build.directory}\test\resource_management;${project.build.directory}\src\kazoo</python.path.l> |
| </properties> |
| </profile> |
| |
| <profile> |
| <id>Linux</id> |
| <activation> |
| <os><family>!windows</family></os> |
| </activation> |
| <build> |
| <!-- The maven-resources-plugin doesn't preserve file permissions (MRESOURCES-132), chmod python-wrap before running the tests --> |
| <plugins> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>exec-maven-plugin</artifactId> |
| <version>${maven-exec-plugin.version}</version> |
| <executions> |
| <execution> |
| <configuration> |
| <executable>chmod</executable> |
| <arguments> |
| <argument>+x</argument> |
| <argument>${executable.python}</argument> |
| </arguments> |
| </configuration> |
| <id>chmod-python-wrap</id> |
| <phase>test-compile</phase> |
| <goals> |
| <goal>exec</goal> |
| </goals> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| |
| </profile> |
| <profile> |
| <id>rat</id> |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.rat</groupId> |
| <artifactId>apache-rat-plugin</artifactId> |
| <version>${apache-rat-plugin.version}</version> |
| <executions> |
| <execution> |
| <id>check-licenses</id> |
| <goals> |
| <goal>check</goal> |
| </goals> |
| </execution> |
| </executions> |
| <configuration> |
| <excludes> |
| <exclude>DEPENDENCIES</exclude> |
| <exclude>src/test/python/agent/dummy_output_error.txt</exclude> |
| <exclude>src/test/python/agent/dummy_output_good.txt</exclude> |
| <!-- jinja2 files (BSD license) --> |
| <exclude>src/main/python/jinja2/**</exclude> |
| <!-- mock files (BSD license) --> |
| <exclude>src/test/python/mock/**</exclude> |
| <!-- kazoo files (Apache License, Version 2.0) --> |
| <exclude>src/main/python/kazoo/**</exclude> |
| </excludes> |
| </configuration> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| </profiles> |
| </project> |