| <!-- |
| |
| Licensed 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>traffic_router_rpm</artifactId> |
| <packaging>pom</packaging> |
| |
| <parent> |
| <groupId>com.comcast.cdn.traffic_control.traffic_router</groupId> |
| <artifactId>traffic_router</artifactId> |
| <version>4.1.0</version> |
| </parent> |
| |
| <scm> |
| <connection>scm:git:file://</connection> |
| <developerConnection>scm:git:file://</developerConnection> |
| </scm> |
| |
| <dependencies> |
| <!-- RPM plugin will not package artifacts without these defined dependencies --> |
| <dependency> |
| <groupId>com.comcast.cdn.traffic_control.traffic_router</groupId> |
| <artifactId>traffic_router_connector</artifactId> |
| <version>${project.parent.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>com.comcast.cdn.traffic_control.traffic_router</groupId> |
| <artifactId>traffic_router_shared</artifactId> |
| <version>${project.parent.version}</version> |
| </dependency> |
| <dependency> |
| <groupId>com.comcast.cdn.traffic_control.traffic_router</groupId> |
| <artifactId>ROOT</artifactId> |
| <version>${project.parent.version}</version> |
| <type>war</type> |
| </dependency> |
| </dependencies> |
| |
| <build> |
| <plugins> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>buildnumber-maven-plugin</artifactId> |
| <version>1.2</version> |
| <executions> |
| <execution> |
| <phase>initialize</phase> |
| <goals> |
| <goal>create</goal> |
| </goals> |
| </execution> |
| </executions> |
| <configuration> |
| <shortRevisionLength>8</shortRevisionLength> |
| <doCheck>false</doCheck> |
| <doUpdate>false</doUpdate> |
| <timestampFormat> |
| {0,date,yyyy-MM-dd} |
| </timestampFormat> |
| </configuration> |
| </plugin> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-enforcer-plugin</artifactId> |
| <version>1.4.1</version> |
| <executions> |
| <execution> |
| <phase>package</phase> |
| <id>enforce-environment-variable-is-set</id> |
| <goals> |
| <goal>enforce</goal> |
| </goals> |
| <configuration> |
| <rules> |
| <requireEnvironmentVariable> |
| <variableName>BUILD_NUMBER</variableName> |
| <variableName>BUILD_LOCK</variableName> |
| <variableName>TOMCAT_VERSION</variableName> |
| <variableName>TOMCAT_RELEASE</variableName> |
| <variableName>RHEL_VERSION</variableName> |
| <variableName>STARTUP_SCRIPT_DIR</variableName> |
| <variableName>STARTUP_SCRIPT_LOC</variableName> |
| </requireEnvironmentVariable> |
| </rules> |
| <fail>true</fail> |
| </configuration> |
| </execution> |
| </executions> |
| </plugin> |
| </plugins> |
| </build> |
| |
| <profiles> |
| <profile> |
| <id>rpm-build</id> |
| <activation> |
| <os> |
| <name>linux</name> |
| </os> |
| </activation> |
| <build> |
| <finalName>traffic_router</finalName> |
| <plugins> |
| <plugin> |
| <groupId>org.codehaus.mojo</groupId> |
| <artifactId>rpm-maven-plugin</artifactId> |
| <version>2.1.4</version> |
| <extensions>true</extensions> |
| <executions> |
| <execution> |
| <id>package-rpm</id> |
| <goals> |
| <goal>attached-rpm</goal> |
| </goals> |
| </execution> |
| </executions> |
| <configuration> |
| <group>Applications/Internet</group> |
| <name>${project.parent.artifactId}</name> |
| <release>${env.BUILD_NUMBER}.${env.RHEL_VERSION}</release> |
| <needarch>x86_64</needarch> |
| <mappings> |
| <mapping> |
| <directory>${deploy.dir}</directory> |
| <filemode>755</filemode> |
| <username>root</username> |
| <groupname>root</groupname> |
| </mapping> |
| <mapping> |
| <directory>${deploy.dir}/conf</directory> |
| <directoryIncluded>false</directoryIncluded> |
| <configuration>noreplace</configuration> |
| <filemode>755</filemode> |
| <username>root</username> |
| <groupname>root</groupname> |
| <sources> |
| <source> |
| <filter>true</filter> |
| <location>../core/src/main/conf</location> |
| </source> |
| </sources> |
| </mapping> |
| <mapping> |
| <directory>${deploy.dir}/var/log</directory> |
| <filemode>755</filemode> |
| <username>root</username> |
| <groupname>root</groupname> |
| </mapping> |
| <mapping> |
| <directory>${deploy.dir}/temp</directory> |
| <filemode>755</filemode> |
| <username>root</username> |
| <groupname>root</groupname> |
| </mapping> |
| <mapping> |
| <directory>${deploy.dir}/work</directory> |
| <filemode>755</filemode> |
| <username>root</username> |
| <groupname>root</groupname> |
| </mapping> |
| <mapping> |
| <directory>${deploy.dir}/db</directory> |
| <filemode>755</filemode> |
| <username>root</username> |
| <groupname>root</groupname> |
| </mapping> |
| <mapping> |
| <directory>${deploy.dir}/lib</directory> |
| <directoryIncluded>false</directoryIncluded> |
| <filemode>755</filemode> |
| <username>root</username> |
| <groupname>root</groupname> |
| <dependency> |
| <stripVersion>true</stripVersion> |
| <excludes> |
| <exclude>com.comcast.cdn.traffic_control.traffic_router:traffic_router_core</exclude> |
| </excludes> |
| </dependency> |
| </mapping> |
| <mapping> |
| <directory>${env.STARTUP_SCRIPT_DIR}</directory> |
| <directoryIncluded>false</directoryIncluded> |
| <filemode>644</filemode> |
| <username>root</username> |
| <groupname>root</groupname> |
| <sources> |
| <source> |
| <location>${env.STARTUP_SCRIPT_LOC}</location> |
| </source> |
| </sources> |
| </mapping> |
| <mapping> |
| <directory>${deploy.dir}/webapps</directory> |
| <directoryIncluded>false</directoryIncluded> |
| <filemode>755</filemode> |
| <username>root</username> |
| <groupname>root</groupname> |
| <dependency> |
| <stripVersion>true</stripVersion> |
| <includes> |
| <include>com.comcast.cdn.traffic_control.traffic_router:ROOT</include> |
| </includes> |
| </dependency> |
| </mapping> |
| </mappings> |
| <requires> |
| <require>java >= 1.8</require> |
| <require>tomcat = ${env.TOMCAT_VERSION}.${env.TOMCAT_RELEASE}-${env.BUILD_LOCK}</require> |
| <require>apr >= 1.4.8</require> |
| <require>tomcat-native >= 1.2.16</require> |
| </requires> |
| <obsoletes> |
| <obsolete>traffic_router < 3.0.0</obsolete> |
| </obsoletes> |
| |
| <pretransScriptlet> |
| <scriptFile>../core/src/main/scripts/pretrans.sh</scriptFile> |
| </pretransScriptlet> |
| <preScriptlet> |
| <scriptFile>../core/src/main/scripts/preinstall.sh</scriptFile> |
| </preScriptlet> |
| <postinstallScriptlet> |
| <scriptFile>../core/src/main/scripts/postinstall.sh</scriptFile> |
| </postinstallScriptlet> |
| <preremoveScriptlet> |
| <scriptFile>../core/src/main/scripts/preremove.sh</scriptFile> |
| </preremoveScriptlet> |
| </configuration> |
| </plugin> |
| </plugins> |
| </build> |
| </profile> |
| </profiles> |
| </project> |