Fixed project version parsing
[aai/search-data-service.git] / elasticsearch-sg / pom.xml
1 <!--
2
3     ============LICENSE_START=======================================================
4     org.onap.aai
5     ================================================================================
6     Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
7     Copyright © 2017-2018 Amdocs
8     ================================================================================
9     Licensed under the Apache License, Version 2.0 (the "License");
10     you may not use this file except in compliance with the License.
11     You may obtain a copy of the License at
12
13           http://www.apache.org/licenses/LICENSE-2.0
14
15     Unless required by applicable law or agreed to in writing, software
16     distributed under the License is distributed on an "AS IS" BASIS,
17     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18     See the License for the specific language governing permissions and
19     limitations under the License.
20     ============LICENSE_END=========================================================
21
22 -->
23 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
24          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
25     <modelVersion>4.0.0</modelVersion>
26
27     <parent>
28         <artifactId>search-data-service</artifactId>
29         <groupId>org.onap.aai</groupId>
30         <version>1.6.0-SNAPSHOT</version>
31     </parent>
32
33
34     <groupId>org.onap.aai.search-data-service</groupId>
35     <artifactId>elasticsearch-sg</artifactId>
36     <name>ElasticSearch with SearchGuard</name>
37     <version>1.6.0-SNAPSHOT</version>
38     <packaging>pom</packaging>
39
40     <profiles>
41         <profile>
42             <id>docker</id>
43             <build>
44                 <plugins>
45                     <plugin>
46                         <groupId>org.codehaus.mojo</groupId>
47                         <artifactId>build-helper-maven-plugin</artifactId>
48                         <version>3.0.0</version>
49                     </plugin>
50                     <plugin>
51                         <groupId>org.apache.maven.plugins</groupId>
52                         <artifactId>maven-resources-plugin</artifactId>
53                         <version>2.7</version>
54                         <executions>
55                             <execution>
56                                 <id>copy-docker-file</id>
57                                 <phase>process-resources</phase>
58                                 <goals>
59                                     <goal>copy-resources</goal>
60                                 </goals>
61                                 <configuration>
62                                     <outputDirectory>${aai.build.directory}</outputDirectory>
63                                     <overwrite>true</overwrite>
64                                     <resources>
65                                         <resource>
66                                             <directory>${basedir}/src/main/docker</directory>
67                                             <includes>
68                                                 <include>**/*</include>
69                                             </includes>
70                                         </resource>
71                                     </resources>
72                                 </configuration>
73                             </execution>
74                         </executions>
75                     </plugin>
76
77                     <plugin>
78                         <groupId>io.fabric8</groupId>
79                         <artifactId>docker-maven-plugin</artifactId>
80                         <version>${docker.fabric.version}</version>
81                         <configuration>
82                             <verbose>true</verbose>
83                             <apiVersion>1.23</apiVersion>
84                             <images>
85                                 <image>
86                                     <name>${docker.push.registry}/${aai.docker.namespace}/${project.artifactId}:%l
87                                     </name>
88                                     <build>
89                                         <filter>@</filter>
90                                         <tags>
91                                             <tag>latest</tag>
92                                             <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-latest</tag>
93                                             <tag>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}-STAGING-${maven.build.timestamp}</tag>
94                                         </tags>
95                                         <cleanup>try</cleanup>
96                                         <dockerFileDir>${aai.build.directory}</dockerFileDir>
97                                     </build>
98                                 </image>
99                             </images>
100                         </configuration>
101                         <executions>
102                             <execution>
103                                 <id>clean-images</id>
104                                 <phase>clean</phase>
105                                 <goals>
106                                     <goal>remove</goal>
107                                 </goals>
108                                 <configuration>
109                                     <removeAll>true</removeAll>
110                                 </configuration>
111                             </execution>
112                             <execution>
113                                 <id>generate-images</id>
114                                 <phase>package</phase>
115                                 <goals>
116                                     <goal>build</goal>
117                                 </goals>
118                             </execution>
119                             <execution>
120                                 <id>push-images</id>
121                                 <phase>deploy</phase>
122                                 <goals>
123                                     <goal>push</goal>
124                                 </goals>
125                             </execution>
126                         </executions>
127                     </plugin>
128                     <plugin>
129                         <groupId>org.apache.maven.plugins</groupId>
130                         <artifactId>maven-deploy-plugin</artifactId>
131                     </plugin>
132                 </plugins>
133             </build>
134         </profile>
135     </profiles>
136     <distributionManagement>
137         <repository>
138             <id>ecomp-releases</id>
139             <name>ECOMP Release Repository</name>
140             <url>${nexusproxy}/content/repositories/releases/</url>
141         </repository>
142         <snapshotRepository>
143             <id>ecomp-snapshots</id>
144             <name>ECOMP Snapshot Repository</name>
145             <url>${nexusproxy}/content/repositories/snapshots/</url>
146         </snapshotRepository>
147     </distributionManagement>
148
149 </project>