4 Copyright 2017 ZTE Corporation.
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
19 <project xmlns="http://maven.apache.org/POM/4.0.0"
20 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
23 <groupId>org.onap.holmes.rule-management</groupId>
24 <artifactId>holmes-rulemgt-parent</artifactId>
25 <version>1.2.4-SNAPSHOT</version>
28 <artifactId>holmes-rulemgt-standalone</artifactId>
29 <modelVersion>4.0.0</modelVersion>
30 <name>holmes-rulemgt/holmes-rulemgt-standalone</name>
31 <packaging>pom</packaging>
34 <holmes.rule.project.version>${project.version}</holmes.rule.project.version>
35 <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
36 <build.number>${maven.build.timestamp}</build.number>
42 <artifactId>maven-resources-plugin</artifactId>
45 <id>copy-resources-${linux64id}</id>
46 <phase>process-resources</phase>
48 <goal>copy-resources</goal>
51 <outputDirectory>${linux64outputdir}</outputDirectory>
54 <directory>src/main/assembly/</directory>
55 <filtering>false</filtering>
57 <include>**/*</include>
60 <exclude>**/*.bat</exclude>
61 <exclude>Dockerfile</exclude>
65 <directory>../rulemgt/src/main/resources</directory>
66 <filtering>false</filtering>
69 <overwrite>true</overwrite>
73 <id>copy-resources-${win64id}</id>
74 <phase>process-resources</phase>
76 <goal>copy-resources</goal>
79 <outputDirectory>${win64outputdir}</outputDirectory>
82 <directory>src/main/assembly/</directory>
83 <filtering>false</filtering>
85 <include>**/*</include>
88 <exclude>**/*.sh</exclude>
89 <exclude>Dockerfile</exclude>
93 <directory>../rulemgt/src/main/resources</directory>
94 <filtering>false</filtering>
97 <overwrite>true</overwrite>
101 <id>copy-dockerfile</id>
102 <phase>process-resources</phase>
104 <goal>copy-resources</goal>
107 <outputDirectory>target/version</outputDirectory>
110 <directory>src/main/assembly/</directory>
111 <filtering>false</filtering>
113 <include>Dockerfile</include>
117 <overwrite>true</overwrite>
121 <id>copy-nginx-conf-file</id>
122 <phase>process-resources</phase>
124 <goal>copy-resources</goal>
127 <outputDirectory>target/version</outputDirectory>
130 <directory>src/main/assembly/</directory>
131 <filtering>false</filtering>
133 <include>nginx.conf</include>
134 <include>**/holmes-frontend*.*</include>
135 <include>**/*.pem</include>
139 <overwrite>true</overwrite>
145 <groupId>org.apache.maven.plugins</groupId>
146 <artifactId>maven-dependency-plugin</artifactId>
149 <id>copy-artifacts-${linux64id}</id>
153 <phase>prepare-package</phase>
157 <groupId>org.onap.holmes.rule-management</groupId>
158 <artifactId>holmes-rulemgt</artifactId>
160 <overWrite>true</overWrite>
161 <outputDirectory>${linux64outputdir}</outputDirectory>
162 <destFileName>holmes-rulemgt.jar</destFileName>
165 <groupId>org.onap.holmes.rule-management</groupId>
166 <artifactId>holmes-rulemgt-frontend</artifactId>
168 <overWrite>true</overWrite>
169 <outputDirectory>target/version</outputDirectory>
170 <destFileName>holmes-rulemgt-frontend-${project.version}.tar.gz</destFileName>
176 <id>copy-artifacts-${win64id}</id>
180 <phase>prepare-package</phase>
184 <groupId>org.onap.holmes.rule-management</groupId>
185 <artifactId>holmes-rulemgt</artifactId>
187 <overWrite>true</overWrite>
188 <outputDirectory>${win64outputdir}</outputDirectory>
189 <destFileName>holmes-rulemgt.jar</destFileName>
192 <groupId>org.onap.holmes.rule-management</groupId>
193 <artifactId>holmes-rulemgt-frontend</artifactId>
195 <overWrite>true</overWrite>
196 <outputDirectory>target/version</outputDirectory>
197 <destFileName>holmes-rulemgt-frontend-${project.version}.tar.gz</destFileName>
205 <groupId>org.apache.maven.plugins</groupId>
206 <artifactId>maven-assembly-plugin</artifactId>
212 <descriptor>linux64-assembly.xml</descriptor>
214 <appendAssemblyId>true</appendAssemblyId>
215 <outputDirectory>target/version</outputDirectory>
217 <phase>package</phase>
219 <goal>attached</goal>
226 <descriptor>win64-assembly.xml</descriptor>
228 <appendAssemblyId>true</appendAssemblyId>
229 <outputDirectory>target/version</outputDirectory>
231 <phase>package</phase>
233 <goal>attached</goal>
239 <groupId>org.codehaus.groovy.maven</groupId>
240 <artifactId>gmaven-plugin</artifactId>
243 <phase>validate</phase>
249 println project.properties['holmes.rule.project.version'];
251 if (project.properties['holmes.rule.project.version'] != null) {
252 versionArray = project.properties['holmes.rule.project.version'].split('-');
255 project.properties['project.docker.latesttag.version'] = versionArray[0] + "-STAGING-latest";
256 project.properties['project.docker.latesttag.version.with.timestamp'] = versionArray[0] + "-STAGING-${build.number}";
258 println 'New Tag for docker:' +
259 project.properties['project.docker.latesttag.version'];
274 <groupId>io.fabric8</groupId>
275 <artifactId>docker-maven-plugin</artifactId>
276 <version>0.16.5</version>
277 <inherited>false</inherited>
281 <name>onap/holmes/rule-management</name>
283 <cleanup>try</cleanup>
284 <dockerFileDir>${basedir}/target/version/</dockerFileDir>
285 <dockerFile>${basedir}/target/version/Dockerfile</dockerFile>
287 <tag>${project.version}</tag>
288 <tag>${project.version}-${build.number}</tag>
289 <tag>${project.docker.latesttag.version}</tag>
290 <tag>${project.docker.latesttag.version.with.timestamp}</tag>
298 <id>generate-images</id>
299 <phase>package</phase>
307 <phase>deploy</phase>
322 <groupId>org.onap.holmes.rule-management</groupId>
323 <artifactId>holmes-rulemgt</artifactId>
324 <version>${project.version}</version>
327 <groupId>org.onap.holmes.rule-management</groupId>
328 <artifactId>holmes-rulemgt-frontend</artifactId>
329 <version>${project.version}</version>