Updated pom and docker to generate a stable image
[dcaegen2/analytics/tca-gen2.git] / dcae-analytics / dcae-analytics-tca-web / pom.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   ~ ================================================================================
4   ~ Copyright (c) 2018-2019 AT&T Intellectual Property. All rights reserved.
5   ~ ================================================================================
6   ~ Modifications Copyright (C) 2019 IBM
7   ~ ================================================================================
8   ~ Licensed under the Apache License, Version 2.0 (the "License");
9   ~ you may not use this file except in compliance with the License.
10   ~ You may obtain a copy of the License at
11   ~
12   ~      http://www.apache.org/licenses/LICENSE-2.0
13   ~
14   ~ Unless required by applicable law or agreed to in writing, software
15   ~ distributed under the License is distributed on an "AS IS" BASIS,
16   ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17   ~ See the License for the specific language governing permissions and
18   ~ limitations under the License.
19   ~ ============LICENSE_END=========================================================
20   ~
21   -->
22
23 <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
24          xmlns="http://maven.apache.org/POM/4.0.0"
25          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
26
27     <modelVersion>4.0.0</modelVersion>
28
29     <parent>
30         <groupId>org.onap.dcaegen2.analytics.tca-gen2</groupId>
31         <artifactId>dcae-analytics</artifactId>
32         <version>3.0.0-SNAPSHOT</version>
33     </parent>
34
35     <artifactId>dcae-analytics-tca-web</artifactId>
36     <packaging>jar</packaging>
37
38     <!-- THE MODULE CONTAINS WEB RELATED CODE FOR TCA -->
39     <name>DCAE Analytics TCA Web</name>
40     <description>Contains Web related code for TCA</description>
41
42     <properties>
43         <main.basedir>${project.parent.basedir}</main.basedir>
44         <docker.image.name>onap/${project.groupId}.${project.artifactId}</docker.image.name>
45     </properties>
46
47     <dependencies>
48
49         <!-- PROJECT DEPENDENCIES -->
50         <dependency>
51             <groupId>${project.groupId}</groupId>
52             <artifactId>dcae-analytics-web</artifactId>
53         </dependency>
54         <dependency>
55             <groupId>${project.groupId}</groupId>
56             <artifactId>dcae-analytics-tca-core</artifactId>
57         </dependency>
58
59
60         <!-- SPRING DEPENDENCIES -->
61         <dependency>
62             <groupId>org.springframework.boot</groupId>
63             <artifactId>spring-boot-starter-actuator</artifactId>
64             <exclusions>
65                 <exclusion>
66                     <groupId>io.undertow</groupId>
67                     <artifactId>undertow-core</artifactId>
68               </exclusion>
69             </exclusions>
70             
71         </dependency>
72         <dependency>
73             <groupId>io.micrometer</groupId>
74             <artifactId>micrometer-registry-prometheus</artifactId>
75         </dependency>
76
77
78         <!-- SPRING CONFIGURATION META DATA ANNOTATION PROCESSOR -->
79         <dependency>
80             <groupId>org.springframework.boot</groupId>
81             <artifactId>spring-boot-configuration-processor</artifactId>
82             <optional>true</optional>
83         </dependency>
84
85         <!-- CODE GENERATION -->
86         <dependency>
87             <groupId>org.projectlombok</groupId>
88             <artifactId>lombok</artifactId>
89             <scope>provided</scope>
90         </dependency>
91
92         <!-- FIND BUGS -->
93         <dependency>
94             <groupId>com.google.code.findbugs</groupId>
95             <artifactId>jsr305</artifactId>
96         </dependency>
97         <dependency>
98             <groupId>com.google.code.findbugs</groupId>
99             <artifactId>annotations</artifactId>
100         </dependency>
101
102         <!-- REST API SWAGGER -->
103         <dependency>
104             <groupId>io.springfox</groupId>
105             <artifactId>springfox-swagger2</artifactId>
106         </dependency>
107         <dependency>
108             <groupId>io.springfox</groupId>
109             <artifactId>springfox-swagger-ui</artifactId>
110         </dependency>
111
112         <!-- TEST DEPENDENCIES -->
113         <dependency>
114             <groupId>${project.groupId}</groupId>
115             <artifactId>dcae-analytics-test</artifactId>
116         </dependency>
117         <!-- https://mvnrepository.com/artifact/io.undertow/undertow-core -->
118       <dependency>
119         <groupId>io.undertow</groupId>
120         <artifactId>undertow-core</artifactId>
121         <version>2.0.17.Final</version>
122       </dependency>
123
124     </dependencies>
125
126     <dependencyManagement>
127         <dependencies>
128             <dependency>
129                 <groupId>org.springframework</groupId>
130                 <artifactId>spring-core</artifactId>
131                 <version>5.0.11.RELEASE</version>
132             </dependency>
133         </dependencies>
134     </dependencyManagement>
135     
136     <build>
137         <resources>
138             <resource>
139                 <directory>${project.basedir}/src/main/resources</directory>
140             </resource>
141             <resource>
142                 <directory>${project.build.directory}/git</directory>
143             </resource>
144         </resources>
145
146         <plugins>
147             <plugin>
148                 <groupId>pl.project13.maven</groupId>
149                 <artifactId>git-commit-id-plugin</artifactId>
150             </plugin>
151             <plugin>
152                 <groupId>org.springframework.boot</groupId>
153                 <artifactId>spring-boot-maven-plugin</artifactId>
154             </plugin>
155             <!-- DOCKER PLUGIN -->
156             <plugin>
157                    <groupId>com.spotify</groupId>
158                    <artifactId>dockerfile-maven-plugin</artifactId>
159                    <version>1.4.3</version>
160                      <configuration>
161                           <contextDirectory>${project.basedir}</contextDirectory>
162                           <repository>${docker.repository}/${docker.image.name}</repository>
163                           <imageTags>
164                                  <tag>${project.version}</tag>
165                                  <tag>latest</tag>
166                                  <tag>${project.version}-${maven.build.timestamp}Z</tag>
167                           </imageTags>
168                           <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
169                        <buildArgs>
170                              <PROJECT_BUILD_DIR_NAME>target</PROJECT_BUILD_DIR_NAME>
171                              <DEPENDENCIES_DIR>${dependency.dir.name}</DEPENDENCIES_DIR>
172                              <DOCKER_ARTIFACT_DIR>/opt</DOCKER_ARTIFACT_DIR>
173                              <FINAL_JAR>${project.build.finalName}.jar</FINAL_JAR>
174                        </buildArgs>
175                  </configuration>
176                  <executions>
177                         <execution>
178                                <id>default</id>
179                                <phase>install</phase>
180                                <goals>
181                                       <goal>build</goal>
182                                       <goal>push</goal>
183                                </goals>
184                        </execution>
185                 </executions>
186
187            </plugin>
188         </plugins>
189     </build>
190 </project>