274e57f528fb7872e4734e8eb3ff9e5fe8185feb
[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.glassfish.jersey.media</groupId>\r
28             <artifactId>jersey-media-multipart</artifactId>\r
29         </dependency>\r
30 \r
31         <dependency>\r
32             <groupId>org.springframework</groupId>\r
33             <artifactId>spring-webmvc</artifactId>\r
34         </dependency>\r
35 \r
36         <dependency>\r
37             <groupId>org.springframework.boot</groupId>\r
38             <artifactId>spring-boot-starter-jersey</artifactId>\r
39             <exclusions>\r
40                 <exclusion>\r
41                     <groupId>org.springframework.boot</groupId>\r
42                     <artifactId>spring-boot-starter-tomcat</artifactId>\r
43                 </exclusion>\r
44             </exclusions>\r
45         </dependency>\r
46 \r
47         <dependency>\r
48             <groupId>org.springframework.boot</groupId>\r
49             <artifactId>spring-boot-starter-jetty</artifactId>\r
50         </dependency>\r
51 \r
52         <dependency>\r
53             <groupId>io.swagger.core.v3</groupId>\r
54             <artifactId>swagger-annotations</artifactId>\r
55             <version>${swagger.version}</version>\r
56         </dependency>\r
57 \r
58         <dependency>\r
59             <groupId>io.swagger.core.v3</groupId>\r
60             <artifactId>swagger-jaxrs2</artifactId>\r
61             <version>${swagger.version}</version>\r
62         </dependency>\r
63 \r
64         <dependency>\r
65             <groupId>org.springframework.boot</groupId>\r
66             <artifactId>spring-boot-starter-test</artifactId>\r
67             <scope>test</scope>\r
68             <exclusions>\r
69                 <exclusion>\r
70                     <groupId>org.junit.vintage</groupId>\r
71                     <artifactId>junit-vintage-engine</artifactId>\r
72                 </exclusion>\r
73             </exclusions>\r
74         </dependency>\r
75     </dependencies>\r
76 \r
77     <build>\r
78         <plugins>\r
79             <plugin>\r
80                 <groupId>org.springframework.boot</groupId>\r
81                 <artifactId>spring-boot-maven-plugin</artifactId>\r
82                 <version>${springboot.version}</version>\r
83                 <executions>\r
84                     <execution>\r
85                         <goals>\r
86                             <goal>repackage</goal>\r
87                         </goals>\r
88                     </execution>\r
89                 </executions>\r
90             </plugin>\r
91             <plugin>\r
92                 <!-- Download Swagger UI webjar. -->\r
93                 <groupId>org.apache.maven.plugins</groupId>\r
94                 <artifactId>maven-dependency-plugin</artifactId>\r
95                 <version>${maven-dependency-plugin.version}</version>\r
96                 <executions>\r
97                     <execution>\r
98                         <phase>prepare-package</phase>\r
99                         <goals>\r
100                             <goal>unpack</goal>\r
101                         </goals>\r
102                         <configuration>\r
103                             <artifactItems>\r
104                                 <artifactItem>\r
105                                     <groupId>org.webjars</groupId>\r
106                                     <artifactId>swagger-ui</artifactId>\r
107                                     <version>${swagger-ui.version}</version>\r
108                                 </artifactItem>\r
109                             </artifactItems>\r
110                             <outputDirectory>${project.build.directory}/swagger-ui-${swagger-ui.version}</outputDirectory>\r
111                         </configuration>\r
112                     </execution>\r
113                 </executions>\r
114             </plugin>\r
115             <plugin>\r
116                 <!-- Copy Swagger UI resources to static resources directory. -->\r
117                 <groupId>org.apache.maven.plugins</groupId>\r
118                 <artifactId>maven-resources-plugin</artifactId>\r
119                 <version>${maven-resources-plugin.version}</version>\r
120                 <executions>\r
121                     <execution>\r
122                         <id>copy-resources</id>\r
123                         <phase>prepare-package</phase>\r
124                         <goals>\r
125                             <goal>copy-resources</goal>\r
126                         </goals>\r
127                         <configuration>\r
128                             <outputDirectory>${project.build.outputDirectory}/static/swagger-ui</outputDirectory>\r
129                             <resources>\r
130                                 <resource>\r
131                                     <directory>${project.build.directory}/swagger-ui-${swagger-ui.version}/META-INF/resources/webjars/swagger-ui/${swagger-ui.version}/</directory>\r
132                                     <excludes>\r
133                                         <exclude>**/*.gz</exclude>\r
134                                     </excludes>\r
135                                 </resource>\r
136                             </resources>\r
137                         </configuration>\r
138                     </execution>\r
139                 </executions>\r
140             </plugin>\r
141             <plugin>\r
142                 <!-- Replace the OpenAPI specification example URL with the local one. -->\r
143                 <groupId>com.google.code.maven-replacer-plugin</groupId>\r
144                 <artifactId>replacer</artifactId>\r
145                 <version>${maven-replacer-plugin.version}</version>\r
146                 <executions>\r
147                     <execution>\r
148                         <phase>prepare-package</phase>\r
149                         <goals>\r
150                             <goal>replace</goal>\r
151                         </goals>\r
152                     </execution>\r
153                 </executions>\r
154                 <configuration>\r
155                     <file>${project.build.outputDirectory}/static/swagger-ui/index.html</file>\r
156                     <replacements>\r
157                         <replacement>\r
158                             <token>https://petstore.swagger.io/v2/swagger.json</token>\r
159                             <value>/api/cps/openapi.json</value>\r
160                         </replacement>\r
161                     </replacements>\r
162                 </configuration>\r
163             </plugin>\r
164         </plugins>\r
165     </build>\r
166 </project>\r