Docker image building and docker-compose for cps-nf-proxy
[cps.git] / cps-nf-proxy-rest / pom.xml
1 <project xmlns="http://maven.apache.org/POM/4.0.0"
2   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4     <modelVersion>4.0.0</modelVersion>
5     <parent>
6         <groupId>org.onap.cps</groupId>
7         <artifactId>cps-parent</artifactId>
8         <version>0.0.1-SNAPSHOT</version>
9         <relativePath>../cps-parent/pom.xml</relativePath>
10     </parent>
11
12     <artifactId>cps-nf-proxy-rest</artifactId>
13
14     <properties>
15         <app>org.onap.cps.nfproxy.Application</app>
16         <repository.name>nexus3.onap.org:10001/onap/cps-nf-proxy</repository.name>
17         <minimum-coverage>0.44</minimum-coverage>
18     </properties>
19
20     <dependencies>
21         <dependency>
22             <groupId>${project.groupId}</groupId>
23             <artifactId>cps-service</artifactId>
24         </dependency>
25         <dependency>
26             <groupId>${project.groupId}</groupId>
27             <artifactId>cps-ri</artifactId>
28         </dependency>
29         <dependency>
30             <groupId>org.springframework.boot</groupId>
31             <artifactId>spring-boot-starter-web</artifactId>
32             <exclusions>
33                 <exclusion>
34                     <groupId>org.springframework.boot</groupId>
35                     <artifactId>spring-boot-starter-tomcat</artifactId>
36                 </exclusion>
37             </exclusions>
38         </dependency>
39         <dependency>
40             <groupId>org.springframework.boot</groupId>
41             <artifactId>spring-boot-starter-jetty</artifactId>
42         </dependency>
43         <dependency>
44             <groupId>org.springframework.boot</groupId>
45             <artifactId>spring-boot-starter-actuator</artifactId>
46         </dependency>
47         <dependency>
48             <groupId>io.swagger.core.v3</groupId>
49             <artifactId>swagger-annotations</artifactId>
50         </dependency>
51         <dependency>
52             <groupId>io.springfox</groupId>
53             <artifactId>springfox-boot-starter</artifactId>
54         </dependency>
55         <dependency>
56             <groupId>org.apache.commons</groupId>
57             <artifactId>commons-lang3</artifactId>
58         </dependency>
59         <!-- T E S T   D E P E N D E N C I E S -->
60         <dependency>
61             <groupId>org.codehaus.groovy</groupId>
62             <artifactId>groovy</artifactId>
63             <scope>test</scope>
64         </dependency>
65         <dependency>
66             <groupId>org.spockframework</groupId>
67             <artifactId>spock-core</artifactId>
68             <scope>test</scope>
69         </dependency>
70         <dependency>
71             <groupId>org.spockframework</groupId>
72             <artifactId>spock-spring</artifactId>
73             <scope>test</scope>
74         </dependency>
75         <dependency>
76             <groupId>cglib</groupId>
77             <artifactId>cglib-nodep</artifactId>
78             <scope>test</scope>
79         </dependency>
80         <dependency>
81             <groupId>org.springframework.boot</groupId>
82             <artifactId>spring-boot-starter-test</artifactId>
83             <scope>test</scope>
84             <exclusions>
85                 <exclusion>
86                     <groupId>org.junit.vintage</groupId>
87                     <artifactId>junit-vintage-engine</artifactId>
88                 </exclusion>
89             </exclusions>
90         </dependency>
91     </dependencies>
92
93     <build>
94         <plugins>
95             <plugin>
96                 <groupId>org.springframework.boot</groupId>
97                 <artifactId>spring-boot-maven-plugin</artifactId>
98             </plugin>
99             <!-- Swagger code generation. -->
100             <plugin>
101                 <groupId>io.swagger.codegen.v3</groupId>
102                 <artifactId>swagger-codegen-maven-plugin</artifactId>
103                 <executions>
104                     <execution>
105                         <goals>
106                             <goal>generate</goal>
107                         </goals>
108                         <configuration>
109                             <inputSpec>${project.basedir}/docs/openapi/openapi.yml</inputSpec>
110                             <invokerPackage>org.onap.cps.nfproxy.rest.controller</invokerPackage>
111                             <modelPackage>org.onap.cps.nfproxy.rest.model</modelPackage>
112                             <apiPackage>org.onap.cps.nfproxy.rest.api</apiPackage>
113                             <language>spring</language>
114                             <generateSupportingFiles>false</generateSupportingFiles>
115                         </configuration>
116                     </execution>
117                 </executions>
118             </plugin>
119         </plugins>
120     </build>
121
122     <profiles>
123         <profile>
124             <id>docker</id>
125             <activation>
126                 <activeByDefault>false</activeByDefault>
127             </activation>
128             <build>
129                 <plugins>
130                     <plugin>
131                         <groupId>com.google.cloud.tools</groupId>
132                         <artifactId>jib-maven-plugin</artifactId>
133                         <executions>
134                             <execution>
135                                 <phase>package</phase>
136                                 <id>build</id>
137                                 <goals>
138                                     <goal>dockerBuild</goal>
139                                 </goals>
140                             </execution>
141                             <execution>
142                                 <phase>deploy</phase>
143                                 <id>buildAndPush</id>
144                                 <goals>
145                                     <goal>build</goal>
146                                 </goals>
147                             </execution>
148                         </executions>
149                     </plugin>
150                 </plugins>
151             </build>
152         </profile>
153     </profiles>
154
155 </project>