blob: ed896a82f4ecd2b78fb9d4ef201f377d2c84e10a [file] [log] [blame]
Rishi Chailb220d742020-09-16 15:23:53 +01001<project xmlns="http://maven.apache.org/POM/4.0.0"
niamhcoref7ba3592020-10-19 12:48:06 +01002 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">
Rishi Chailb220d742020-09-16 15:23:53 +01004 <modelVersion>4.0.0</modelVersion>
5 <artifactId>cps-rest</artifactId>
6 <parent>
7 <groupId>org.onap.cps</groupId>
8 <artifactId>cps</artifactId>
9 <version>0.0.1-SNAPSHOT</version>
10 </parent>
11
12 <dependencies>
13
14 <dependency>
15 <groupId>org.onap.cps</groupId>
16 <artifactId>cps-service</artifactId>
17 <version>${project.version}</version>
18 </dependency>
19
20 <dependency>
21 <groupId>org.onap.cps</groupId>
22 <artifactId>cps-ri</artifactId>
23 <version>${project.version}</version>
Rishi Chailb220d742020-09-16 15:23:53 +010024 </dependency>
25
26 <dependency>
27 <groupId>org.springframework.boot</groupId>
Rishi Chail2371fe72020-10-30 12:58:54 +000028 <artifactId>spring-boot-starter-web</artifactId>
Rishi Chailb220d742020-09-16 15:23:53 +010029 <exclusions>
30 <exclusion>
31 <groupId>org.springframework.boot</groupId>
32 <artifactId>spring-boot-starter-tomcat</artifactId>
33 </exclusion>
34 </exclusions>
35 </dependency>
36
37 <dependency>
38 <groupId>org.springframework.boot</groupId>
39 <artifactId>spring-boot-starter-jetty</artifactId>
40 </dependency>
41
Rishi Chail14f3af12020-10-02 09:33:35 +010042 <dependency>
43 <groupId>io.swagger.core.v3</groupId>
44 <artifactId>swagger-annotations</artifactId>
45 <version>${swagger.version}</version>
46 </dependency>
47
48 <dependency>
49 <groupId>io.swagger.core.v3</groupId>
50 <artifactId>swagger-jaxrs2</artifactId>
51 <version>${swagger.version}</version>
52 </dependency>
niamhcore68205382020-09-23 11:36:33 +010053
Rishi Chailb220d742020-09-16 15:23:53 +010054 <dependency>
55 <groupId>org.springframework.boot</groupId>
56 <artifactId>spring-boot-starter-test</artifactId>
57 <scope>test</scope>
58 <exclusions>
59 <exclusion>
60 <groupId>org.junit.vintage</groupId>
61 <artifactId>junit-vintage-engine</artifactId>
62 </exclusion>
63 </exclusions>
64 </dependency>
niamhcoref7ba3592020-10-19 12:48:06 +010065
Rishi Chailb220d742020-09-16 15:23:53 +010066 </dependencies>
67
68 <build>
69 <plugins>
70 <plugin>
71 <groupId>org.springframework.boot</groupId>
72 <artifactId>spring-boot-maven-plugin</artifactId>
73 <version>${springboot.version}</version>
74 <executions>
75 <execution>
76 <goals>
77 <goal>repackage</goal>
78 </goals>
79 </execution>
80 </executions>
81 </plugin>
niamhcoref7ba3592020-10-19 12:48:06 +010082
83 <plugin>
Bruno Sakoto49c88d92020-10-06 22:09:58 -040084 <!-- Download Swagger UI webjar. -->
85 <groupId>org.apache.maven.plugins</groupId>
86 <artifactId>maven-dependency-plugin</artifactId>
87 <version>${maven-dependency-plugin.version}</version>
88 <executions>
89 <execution>
90 <phase>prepare-package</phase>
91 <goals>
92 <goal>unpack</goal>
93 </goals>
94 <configuration>
95 <artifactItems>
96 <artifactItem>
97 <groupId>org.webjars</groupId>
98 <artifactId>swagger-ui</artifactId>
99 <version>${swagger-ui.version}</version>
100 </artifactItem>
101 </artifactItems>
niamhcoref7ba3592020-10-19 12:48:06 +0100102 <outputDirectory>
103 ${project.build.directory}/swagger-ui-${swagger-ui.version}
104 </outputDirectory>
Bruno Sakoto49c88d92020-10-06 22:09:58 -0400105 </configuration>
106 </execution>
107 </executions>
108 </plugin>
109 <plugin>
110 <!-- Copy Swagger UI resources to static resources directory. -->
111 <groupId>org.apache.maven.plugins</groupId>
112 <artifactId>maven-resources-plugin</artifactId>
113 <version>${maven-resources-plugin.version}</version>
114 <executions>
115 <execution>
116 <id>copy-resources</id>
117 <phase>prepare-package</phase>
118 <goals>
119 <goal>copy-resources</goal>
120 </goals>
121 <configuration>
niamhcoref7ba3592020-10-19 12:48:06 +0100122 <outputDirectory>${project.build.outputDirectory}/static/swagger-ui
123 </outputDirectory>
Bruno Sakoto49c88d92020-10-06 22:09:58 -0400124 <resources>
125 <resource>
niamhcoref7ba3592020-10-19 12:48:06 +0100126 <directory>
127 ${project.build.directory}/swagger-ui-${swagger-ui.version}/META-INF/resources/webjars/swagger-ui/${swagger-ui.version}/
128 </directory>
Bruno Sakoto49c88d92020-10-06 22:09:58 -0400129 <excludes>
130 <exclude>**/*.gz</exclude>
131 </excludes>
132 </resource>
133 </resources>
134 </configuration>
135 </execution>
136 </executions>
137 </plugin>
138 <plugin>
139 <!-- Replace the OpenAPI specification example URL with the local one. -->
140 <groupId>com.google.code.maven-replacer-plugin</groupId>
141 <artifactId>replacer</artifactId>
142 <version>${maven-replacer-plugin.version}</version>
143 <executions>
144 <execution>
145 <phase>prepare-package</phase>
146 <goals>
147 <goal>replace</goal>
148 </goals>
149 </execution>
150 </executions>
151 <configuration>
152 <file>${project.build.outputDirectory}/static/swagger-ui/index.html</file>
153 <replacements>
154 <replacement>
155 <token>https://petstore.swagger.io/v2/swagger.json</token>
156 <value>/api/cps/openapi.json</value>
157 </replacement>
158 </replacements>
159 </configuration>
160 </plugin>
Rishi Chailb220d742020-09-16 15:23:53 +0100161 </plugins>
162 </build>
163</project>