IS: Remove Jersey and Use Spring Framework
[cps.git] / cps / cps-rest / pom.xml
1 <project xmlns="http://maven.apache.org/POM/4.0.0"\r
2   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
3   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">\r
4     <modelVersion>4.0.0</modelVersion>\r
5     <artifactId>cps-rest</artifactId>\r
6     <parent>\r
7         <groupId>org.onap.cps</groupId>\r
8         <artifactId>cps</artifactId>\r
9         <version>0.0.1-SNAPSHOT</version>\r
10     </parent>\r
11 \r
12     <dependencies>\r
13 \r
14         <dependency>\r
15             <groupId>org.onap.cps</groupId>\r
16             <artifactId>cps-service</artifactId>\r
17             <version>${project.version}</version>\r
18         </dependency>\r
19 \r
20         <dependency>\r
21             <groupId>org.onap.cps</groupId>\r
22             <artifactId>cps-ri</artifactId>\r
23             <version>${project.version}</version>\r
24         </dependency>\r
25 \r
26         <dependency>\r
27             <groupId>org.springframework.boot</groupId>\r
28             <artifactId>spring-boot-starter-web</artifactId>\r
29             <exclusions>\r
30                 <exclusion>\r
31                     <groupId>org.springframework.boot</groupId>\r
32                     <artifactId>spring-boot-starter-tomcat</artifactId>\r
33                 </exclusion>\r
34             </exclusions>\r
35         </dependency>\r
36 \r
37         <dependency>\r
38             <groupId>org.springframework.boot</groupId>\r
39             <artifactId>spring-boot-starter-jetty</artifactId>\r
40         </dependency>\r
41 \r
42         <dependency>\r
43             <groupId>io.swagger.core.v3</groupId>\r
44             <artifactId>swagger-annotations</artifactId>\r
45             <version>${swagger.version}</version>\r
46         </dependency>\r
47 \r
48         <dependency>\r
49             <groupId>io.swagger.core.v3</groupId>\r
50             <artifactId>swagger-jaxrs2</artifactId>\r
51             <version>${swagger.version}</version>\r
52         </dependency>\r
53 \r
54         <dependency>\r
55             <groupId>org.springframework.boot</groupId>\r
56             <artifactId>spring-boot-starter-test</artifactId>\r
57             <scope>test</scope>\r
58             <exclusions>\r
59                 <exclusion>\r
60                     <groupId>org.junit.vintage</groupId>\r
61                     <artifactId>junit-vintage-engine</artifactId>\r
62                 </exclusion>\r
63             </exclusions>\r
64         </dependency>\r
65 \r
66     </dependencies>\r
67 \r
68     <build>\r
69         <plugins>\r
70             <plugin>\r
71                 <groupId>org.springframework.boot</groupId>\r
72                 <artifactId>spring-boot-maven-plugin</artifactId>\r
73                 <version>${springboot.version}</version>\r
74                 <executions>\r
75                     <execution>\r
76                         <goals>\r
77                             <goal>repackage</goal>\r
78                         </goals>\r
79                     </execution>\r
80                 </executions>\r
81             </plugin>\r
82 \r
83             <plugin>\r
84                 <!-- Download Swagger UI webjar. -->\r
85                 <groupId>org.apache.maven.plugins</groupId>\r
86                 <artifactId>maven-dependency-plugin</artifactId>\r
87                 <version>${maven-dependency-plugin.version}</version>\r
88                 <executions>\r
89                     <execution>\r
90                         <phase>prepare-package</phase>\r
91                         <goals>\r
92                             <goal>unpack</goal>\r
93                         </goals>\r
94                         <configuration>\r
95                             <artifactItems>\r
96                                 <artifactItem>\r
97                                     <groupId>org.webjars</groupId>\r
98                                     <artifactId>swagger-ui</artifactId>\r
99                                     <version>${swagger-ui.version}</version>\r
100                                 </artifactItem>\r
101                             </artifactItems>\r
102                             <outputDirectory>\r
103                                 ${project.build.directory}/swagger-ui-${swagger-ui.version}\r
104                             </outputDirectory>\r
105                         </configuration>\r
106                     </execution>\r
107                 </executions>\r
108             </plugin>\r
109             <plugin>\r
110                 <!-- Copy Swagger UI resources to static resources directory. -->\r
111                 <groupId>org.apache.maven.plugins</groupId>\r
112                 <artifactId>maven-resources-plugin</artifactId>\r
113                 <version>${maven-resources-plugin.version}</version>\r
114                 <executions>\r
115                     <execution>\r
116                         <id>copy-resources</id>\r
117                         <phase>prepare-package</phase>\r
118                         <goals>\r
119                             <goal>copy-resources</goal>\r
120                         </goals>\r
121                         <configuration>\r
122                             <outputDirectory>${project.build.outputDirectory}/static/swagger-ui\r
123                             </outputDirectory>\r
124                             <resources>\r
125                                 <resource>\r
126                                     <directory>\r
127                                         ${project.build.directory}/swagger-ui-${swagger-ui.version}/META-INF/resources/webjars/swagger-ui/${swagger-ui.version}/\r
128                                     </directory>\r
129                                     <excludes>\r
130                                         <exclude>**/*.gz</exclude>\r
131                                     </excludes>\r
132                                 </resource>\r
133                             </resources>\r
134                         </configuration>\r
135                     </execution>\r
136                 </executions>\r
137             </plugin>\r
138             <plugin>\r
139                 <!-- Replace the OpenAPI specification example URL with the local one. -->\r
140                 <groupId>com.google.code.maven-replacer-plugin</groupId>\r
141                 <artifactId>replacer</artifactId>\r
142                 <version>${maven-replacer-plugin.version}</version>\r
143                 <executions>\r
144                     <execution>\r
145                         <phase>prepare-package</phase>\r
146                         <goals>\r
147                             <goal>replace</goal>\r
148                         </goals>\r
149                     </execution>\r
150                 </executions>\r
151                 <configuration>\r
152                     <file>${project.build.outputDirectory}/static/swagger-ui/index.html</file>\r
153                     <replacements>\r
154                         <replacement>\r
155                             <token>https://petstore.swagger.io/v2/swagger.json</token>\r
156                             <value>/api/cps/openapi.json</value>\r
157                         </replacement>\r
158                     </replacements>\r
159                 </configuration>\r
160             </plugin>\r
161         </plugins>\r
162     </build>\r
163 </project>\r