|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | + Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | + you may not use this file except in compliance with the License. |
| 5 | + You may obtain a copy of the License at |
| 6 | +
|
| 7 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +
|
| 9 | + Unless required by applicable law or agreed to in writing, software |
| 10 | + distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | + See the License for the specific language governing permissions and |
| 13 | + limitations under the License. See accompanying LICENSE file. |
| 14 | +--> |
| 15 | +<project xmlns="http://maven.apache.org/POM/4.0.0" |
| 16 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 17 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 |
| 18 | + http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 19 | + |
| 20 | + <modelVersion>4.0.0</modelVersion> |
| 21 | + |
| 22 | + <parent> |
| 23 | + <groupId>com.intel.qat</groupId> |
| 24 | + <artifactId>qat-parent</artifactId> |
| 25 | + <version>1.0.0</version> |
| 26 | + <relativePath>../pom.xml</relativePath> |
| 27 | + </parent> |
| 28 | + |
| 29 | + <artifactId>assembly</artifactId> |
| 30 | + <description>QATCodec Release Package Builder</description> |
| 31 | + <name>QATCodec Package Builder</name> |
| 32 | + <packaging>pom</packaging> |
| 33 | + |
| 34 | + <properties> |
| 35 | + <parcel.version>${project.version}</parcel.version> |
| 36 | + </properties> |
| 37 | + |
| 38 | + <build> |
| 39 | + <plugins> |
| 40 | + <plugin> |
| 41 | + <artifactId>maven-resources-plugin</artifactId> |
| 42 | + <configuration> |
| 43 | + <encoding>UTF-8</encoding> |
| 44 | + </configuration> |
| 45 | + <executions> |
| 46 | + <execution> |
| 47 | + <id>create-parcel-meta-data</id> |
| 48 | + <phase>compile</phase> |
| 49 | + <goals> |
| 50 | + <goal>copy-resources</goal> |
| 51 | + </goals> |
| 52 | + <configuration> |
| 53 | + <outputDirectory>${project.build.directory}/meta</outputDirectory> |
| 54 | + <resources> |
| 55 | + <resource> |
| 56 | + <directory>${project.parent.basedir}/assembly/src/main/assembly/meta</directory> |
| 57 | + <filtering>true</filtering> |
| 58 | + <includes> |
| 59 | + <include>filelist.json</include> |
| 60 | + <include>qatcodec_env.sh</include> |
| 61 | + <include>parcel.json</include> |
| 62 | + </includes> |
| 63 | + </resource> |
| 64 | + </resources> |
| 65 | + </configuration> |
| 66 | + </execution> |
| 67 | + </executions> |
| 68 | + </plugin> |
| 69 | + <plugin> |
| 70 | + <groupId>org.apache.maven.plugins</groupId> |
| 71 | + <artifactId>maven-assembly-plugin</artifactId> |
| 72 | + <configuration> |
| 73 | + <finalName>QATCODEC-${parcel.version}</finalName> |
| 74 | + <descriptor>src/main/assembly/assembly.xml</descriptor> |
| 75 | + </configuration> |
| 76 | + <executions> |
| 77 | + <execution> |
| 78 | + <id>make-parcels</id> |
| 79 | + <phase>package</phase> |
| 80 | + <goals> |
| 81 | + <goal>single</goal> |
| 82 | + </goals> |
| 83 | + </execution> |
| 84 | + </executions> |
| 85 | + </plugin> |
| 86 | + <plugin> |
| 87 | + <groupId>com.coderplus.maven.plugins</groupId> |
| 88 | + <artifactId>copy-rename-maven-plugin</artifactId> |
| 89 | + <executions> |
| 90 | + <execution> |
| 91 | + <id>rename-parcel</id> |
| 92 | + <phase>package</phase> |
| 93 | + <goals> |
| 94 | + <goal>copy</goal> |
| 95 | + </goals> |
| 96 | + <configuration> |
| 97 | + <fileSets> |
| 98 | + <fileSet> |
| 99 | + <sourceFile>${project.build.directory}/QATCODEC-${parcel.version}.tar.gz</sourceFile> |
| 100 | + <destinationFile>${project.build.directory}/QATCODEC-${parcel.version}-el6.parcel</destinationFile> |
| 101 | + </fileSet> |
| 102 | + <fileSet> |
| 103 | + <sourceFile>${project.build.directory}/QATCODEC-${parcel.version}.tar.gz</sourceFile> |
| 104 | + <destinationFile>${project.build.directory}/QATCODEC-${parcel.version}-el7.parcel</destinationFile> |
| 105 | + </fileSet> |
| 106 | + </fileSets> |
| 107 | + </configuration> |
| 108 | + </execution> |
| 109 | + </executions> |
| 110 | + </plugin> |
| 111 | + <plugin> |
| 112 | + <groupId>com.googlecode.maven-download-plugin</groupId> |
| 113 | + <artifactId>maven-download-plugin</artifactId> |
| 114 | + <executions> |
| 115 | + <execution> |
| 116 | + <id>download-cm_ext</id> |
| 117 | + <phase>package</phase> |
| 118 | + <goals> |
| 119 | + <goal>wget</goal> |
| 120 | + </goals> |
| 121 | + <configuration> |
| 122 | + <url>https://github.com/cloudera/cm_ext/archive/master.zip</url> |
| 123 | + <unpack>true</unpack> |
| 124 | + <targetDirectory>${project.build.directory}</targetDirectory> |
| 125 | + </configuration> |
| 126 | + </execution> |
| 127 | + </executions> |
| 128 | + </plugin> |
| 129 | + <plugin> |
| 130 | + <groupId>org.codehaus.mojo</groupId> |
| 131 | + <artifactId>exec-maven-plugin</artifactId> |
| 132 | + <executions> |
| 133 | + <execution> |
| 134 | + <id>make-parcel-manifests</id> |
| 135 | + <phase>package</phase> |
| 136 | + <goals> |
| 137 | + <goal>exec</goal> |
| 138 | + </goals> |
| 139 | + <configuration> |
| 140 | + <executable>python</executable> |
| 141 | + <workingDirectory>${project.build.directory}</workingDirectory> |
| 142 | + <arguments> |
| 143 | + <argument>${project.build.directory}/cm_ext-master/make_manifest/make_manifest.py</argument> |
| 144 | + <argument>${project.build.directory}</argument> |
| 145 | + </arguments> |
| 146 | + </configuration> |
| 147 | + </execution> |
| 148 | + <execution> |
| 149 | + <id>make-checksum-signatures</id> |
| 150 | + <phase>verify</phase> |
| 151 | + <goals> |
| 152 | + <goal>exec</goal> |
| 153 | + </goals> |
| 154 | + <configuration> |
| 155 | + <executable>bash</executable> |
| 156 | + <workingDirectory>${project.build.directory}</workingDirectory> |
| 157 | + <arguments> |
| 158 | + <argument>${project.parent.basedir}/assembly/src/main/bash/create-release</argument> |
| 159 | + <argument>${project.build.directory}/QATCODEC-${parcel.version}.tar.gz</argument> |
| 160 | + </arguments> |
| 161 | + </configuration> |
| 162 | + </execution> |
| 163 | + </executions> |
| 164 | + </plugin> |
| 165 | + <plugin> |
| 166 | + <groupId>org.apache.maven.plugins</groupId> |
| 167 | + <artifactId>maven-antrun-plugin</artifactId> |
| 168 | + <executions> |
| 169 | + <execution> |
| 170 | + <id>make-release-package</id> |
| 171 | + <phase>package</phase> |
| 172 | + <goals> |
| 173 | + <goal>run</goal> |
| 174 | + </goals> |
| 175 | + <configuration> |
| 176 | + <tasks> |
| 177 | + <move file="${project.build.directory}/QATCODEC-${parcel.version}-el6.parcel" |
| 178 | + todir="${project.build.directory}/QATCODEC-${parcel.version}/QATCODEC-${parcel.version}/parcel" /> |
| 179 | + <move file="${project.build.directory}/QATCODEC-${parcel.version}-el7.parcel" |
| 180 | + todir="${project.build.directory}/QATCODEC-${parcel.version}/QATCODEC-${parcel.version}/parcel" /> |
| 181 | + <move file="${project.build.directory}/manifest.json" |
| 182 | + todir="${project.build.directory}/QATCODEC-${parcel.version}/QATCODEC-${parcel.version}/parcel" /> |
| 183 | + <delete file="${project.build.directory}/QATCODEC-${parcel.version}.tar.gz" /> |
| 184 | + <copy file="src/main/resources/ReadMe-nonCDH.txt" |
| 185 | + tofile="${project.build.directory}/QATCODEC-${parcel.version}/QATCODEC-${parcel.version}/QATCODEC-${parcel.version}/ReadMe.txt" /> |
| 186 | + <copy file="src/main/resources/ReadMe.txt" |
| 187 | + todir="${project.build.directory}/QATCODEC-${parcel.version}/QATCODEC-${parcel.version}" /> |
| 188 | + <move todir="${project.build.directory}/QATCODEC-${parcel.version}/QATCODEC-${parcel.version}/QATCODEC-${parcel.version}"> |
| 189 | + <fileset dir="${project.build.directory}/QATCODEC-${parcel.version}/QATCODEC-${parcel.version}/lib/hadoop/lib"> |
| 190 | + <include name="*.jar"/> |
| 191 | + </fileset> |
| 192 | + <fileset dir="${project.build.directory}/QATCODEC-${parcel.version}/QATCODEC-${parcel.version}/lib/hadoop/lib/native"> |
| 193 | + <include name="*.so"/> |
| 194 | + </fileset> |
| 195 | + <fileset dir="${project.build.directory}/QATCODEC-${parcel.version}/QATCODEC-${parcel.version}/lib/spark/lib"> |
| 196 | + <include name="*.jar"/> |
| 197 | + </fileset> |
| 198 | + </move> |
| 199 | + <delete dir="${project.build.directory}/QATCODEC-${parcel.version}/QATCODEC-${parcel.version}/lib" /> |
| 200 | + <delete dir="${project.build.directory}/QATCODEC-${parcel.version}/QATCODEC-${parcel.version}/meta" /> |
| 201 | + <tar destfile="${project.build.directory}/QATCODEC-${parcel.version}.tar.gz" |
| 202 | + basedir="${project.build.directory}/QATCODEC-${parcel.version}" |
| 203 | + compression="gzip" /> |
| 204 | + </tasks> |
| 205 | + </configuration> |
| 206 | + </execution> |
| 207 | + </executions> |
| 208 | + </plugin> |
| 209 | + </plugins> |
| 210 | + </build> |
| 211 | +</project> |
| 212 | + |
0 commit comments