Bumped the version to 1.2.6
[holmes/engine-management.git] / engine-d-standalone / pom.xml
1 <?xml version="1.0"?>
2 <!--
3
4     Copyright 2017 ZTE Corporation.
5
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
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
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.
17
18 -->
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">
22     <parent>
23         <groupId>org.onap.holmes.engine-management</groupId>
24         <artifactId>holmes-engine-parent</artifactId>
25         <version>1.2.6-SNAPSHOT</version>
26     </parent>
27
28     <artifactId>holmes-engine-d-standalone</artifactId>
29     <modelVersion>4.0.0</modelVersion>
30     <name>holmes-engine/holmes-engine-d-standalone</name>
31     <packaging>pom</packaging>
32
33     <properties>
34         <holmes.engine.project.version>${project.version}</holmes.engine.project.version>
35         <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
36         <build.number>${maven.build.timestamp}</build.number>
37     </properties>
38
39     <build>
40         <plugins>
41             <plugin>
42                 <artifactId>maven-resources-plugin</artifactId>
43                 <executions>
44                     <execution>
45                         <id>copy-resources-${linux64id}</id>
46                         <phase>process-resources</phase>
47                         <goals>
48                             <goal>copy-resources</goal>
49                         </goals>
50                         <configuration>
51                             <outputDirectory>${linux64outputdir}</outputDirectory>
52                             <resources>
53                                 <resource>
54                                     <directory>src/main/assembly/</directory>
55                                     <filtering>false</filtering>
56                                     <includes>
57                                         <include>**/*</include>
58                                     </includes>
59                                     <excludes>
60                                         <exclude>**/*.bat</exclude>
61                                     </excludes>
62                                 </resource>
63                                 <resource>
64                                     <directory>../engine-d/src/main/resources</directory>
65                                     <filtering>false</filtering>
66                                 </resource>
67                             </resources>
68                             <overwrite>true</overwrite>
69                         </configuration>
70                     </execution>
71                     <execution>
72                         <id>copy-resources-${win64id}</id>
73                         <phase>process-resources</phase>
74                         <goals>
75                             <goal>copy-resources</goal>
76                         </goals>
77                         <configuration>
78                             <outputDirectory>${win64outputdir}</outputDirectory>
79                             <resources>
80                                 <resource>
81                                     <directory>src/main/assembly/</directory>
82                                     <filtering>false</filtering>
83                                     <includes>
84                                         <include>**/*</include>
85                                     </includes>
86                                     <excludes>
87                                         <exclude>**/*.sh</exclude>
88                                     </excludes>
89                                 </resource>
90                                 <resource>
91                                     <directory>../engine-d/src/main/resources</directory>
92                                     <filtering>false</filtering>
93                                 </resource>
94                             </resources>
95                             <overwrite>true</overwrite>
96                         </configuration>
97                     </execution>
98                     <execution>
99                         <id>copy-dockerfile</id>
100                         <phase>process-resources</phase>
101                         <goals>
102                             <goal>copy-resources</goal>
103                         </goals>
104                         <configuration>
105                             <outputDirectory>target/version</outputDirectory>
106                             <resources>
107                                 <resource>
108                                     <directory>src/main/assembly/</directory>
109                                     <filtering>false</filtering>
110                                     <includes>
111                                         <include>Dockerfile</include>
112                                     </includes>
113                                 </resource>
114                             </resources>
115                             <overwrite>true</overwrite>
116                         </configuration>
117                     </execution>
118                 </executions>
119             </plugin>
120             <plugin>
121                 <groupId>org.apache.maven.plugins</groupId>
122                 <artifactId>maven-dependency-plugin</artifactId>
123                 <executions>
124                     <execution>
125                         <id>copy-jar-${linux64id}</id>
126                         <goals>
127                             <goal>copy</goal>
128                         </goals>
129                         <phase>prepare-package</phase>
130                         <configuration>
131                             <artifactItems>
132                                 <artifactItem>
133                                     <groupId>org.onap.holmes.engine-management</groupId>
134                                     <artifactId>holmes-engine-d</artifactId>
135                                     <type>jar</type>
136                                     <overWrite>true</overWrite>
137                                     <outputDirectory>${linux64outputdir}</outputDirectory>
138                                     <destFileName>holmes-engine-d.jar</destFileName>
139                                 </artifactItem>
140                             </artifactItems>
141                         </configuration>
142                     </execution>
143                     <execution>
144                         <id>copy-jar-${win64id}</id>
145                         <goals>
146                             <goal>copy</goal>
147                         </goals>
148                         <phase>prepare-package</phase>
149                         <configuration>
150                             <artifactItems>
151                                 <artifactItem>
152                                     <groupId>org.onap.holmes.engine-management</groupId>
153                                     <artifactId>holmes-engine-d</artifactId>
154                                     <type>jar</type>
155                                     <overWrite>true</overWrite>
156                                     <outputDirectory>${win64outputdir}</outputDirectory>
157                                     <destFileName>holmes-engine-d.jar</destFileName>
158                                 </artifactItem>
159                             </artifactItems>
160                         </configuration>
161                     </execution>
162                 </executions>
163             </plugin>
164             <plugin>
165                 <groupId>org.apache.maven.plugins</groupId>
166                 <artifactId>maven-assembly-plugin</artifactId>
167                 <executions>
168                     <execution>
169                         <id>linux64</id>
170                         <configuration>
171                             <descriptors>
172                                 <descriptor>linux64-assembly.xml</descriptor>
173                             </descriptors>
174                             <appendAssemblyId>true</appendAssemblyId>
175                             <outputDirectory>target/version</outputDirectory>
176                         </configuration>
177                         <phase>package</phase>
178                         <goals>
179                             <goal>attached</goal>
180                         </goals>
181                     </execution>
182                     <execution>
183                         <id>win64</id>
184                         <configuration>
185                             <descriptors>
186                                 <descriptor>win64-assembly.xml</descriptor>
187                             </descriptors>
188                             <appendAssemblyId>true</appendAssemblyId>
189                             <outputDirectory>target/version</outputDirectory>
190                         </configuration>
191                         <phase>package</phase>
192                         <goals>
193                             <goal>attached</goal>
194                         </goals>
195                     </execution>
196                 </executions>
197             </plugin>
198             <plugin>
199                 <groupId>org.codehaus.groovy.maven</groupId>
200                 <artifactId>gmaven-plugin</artifactId>
201                 <executions>
202                     <execution>
203                         <phase>validate</phase>
204                         <goals>
205                             <goal>execute</goal>
206                         </goals>
207                         <configuration>
208                             <source>
209                                 println project.properties['holmes.engine.project.version'];
210                                 def versionArray;
211                                 if (project.properties['holmes.engine.project.version'] != null) {
212                                     versionArray = project.properties['holmes.engine.project.version'].split('-');
213                                 }
214
215                                 project.properties['project.docker.latesttag.version'] = versionArray[0] + "-STAGING-latest";
216                                 project.properties['project.docker.latesttag.version.with.timestamp'] = versionArray[0] + "-STAGING-${build.number}";
217
218                                 println 'New Tag for docker:' +
219                                         project.properties['project.docker.latesttag.version'];
220                             </source>
221                         </configuration>
222                     </execution>
223                 </executions>
224             </plugin>
225         </plugins>
226     </build>
227
228     <profiles>
229         <profile>
230             <id>docker</id>
231             <build>
232                 <plugins>
233                     <plugin>
234                         <groupId>io.fabric8</groupId>
235                         <artifactId>docker-maven-plugin</artifactId>
236                         <version>0.16.5</version>
237                         <inherited>false</inherited>
238                         <configuration>
239                             <images>
240                                 <image>
241                                     <name>onap/holmes/engine-management</name>
242                                     <build>
243                                         <cleanup>try</cleanup>
244                                         <dockerFileDir>${basedir}/target/version/</dockerFileDir>
245                                         <dockerFile>${basedir}/target/version/Dockerfile</dockerFile>
246                                         <tags>
247                                             <tag>${project.version}</tag>
248                                             <tag>${project.version}-${build.number}</tag>
249                                             <tag>${project.docker.latesttag.version}</tag>
250                                             <tag>${project.docker.latesttag.version.with.timestamp}</tag>
251                                         </tags>
252                                     </build>
253                                 </image>
254                             </images>
255                         </configuration>
256                         <executions>
257                             <execution>
258                                 <id>generate-images</id>
259                                 <phase>package</phase>
260                                 <goals>
261                                     <goal>build</goal>
262                                 </goals>
263                             </execution>
264
265                             <execution>
266                                 <id>push-images</id>
267                                 <phase>deploy</phase>
268                                 <goals>
269                                     <goal>build</goal>
270                                     <goal>push</goal>
271                                 </goals>
272                             </execution>
273                         </executions>
274                     </plugin>
275                 </plugins>
276             </build>
277         </profile>
278     </profiles>
279
280     <dependencies>
281         <dependency>
282             <groupId>org.onap.holmes.engine-management</groupId>
283             <artifactId>holmes-engine-d</artifactId>
284             <version>${project.version}</version>
285             <exclusions>
286                 <exclusion>
287                     <groupId>ch.qos.logback</groupId>
288                     <artifactId>logback</artifactId>
289                 </exclusion>
290                 <exclusion>
291                     <groupId>org.hibernate</groupId>
292                     <artifactId>hibernate-validator</artifactId>
293                 </exclusion>
294                 <exclusion>
295                     <groupId>org.slf4j</groupId>
296                     <artifactId>slf4j-api</artifactId>
297                 </exclusion>
298                 <exclusion>
299                     <groupId>org.eclipse.jetty</groupId>
300                     <artifactId>jetty-http</artifactId>
301                 </exclusion>
302                 <exclusion>
303                     <groupId>org.eclipse.jetty</groupId>
304                     <artifactId>jetty-util</artifactId>
305                 </exclusion>
306                 <exclusion>
307                     <groupId>org.eclipse.jetty</groupId>
308                     <artifactId>jetty-server</artifactId>
309                 </exclusion>
310                 <exclusion>
311                     <groupId>org.eclipse.jetty</groupId>
312                     <artifactId>jetty-servlet</artifactId>
313                 </exclusion>
314             </exclusions>
315         </dependency>
316     </dependencies>
317 </project>