Rishi Chail | b220d74 | 2020-09-16 15:23:53 +0100 | [diff] [blame] | 1 | <project xmlns="http://maven.apache.org/POM/4.0.0"
|
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 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">
|
Rishi Chail | b220d74 | 2020-09-16 15:23:53 +0100 | [diff] [blame] | 4 | <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 Chail | b220d74 | 2020-09-16 15:23:53 +0100 | [diff] [blame] | 24 | </dependency>
|
| 25 |
|
| 26 | <dependency>
|
niamhcore | 6820538 | 2020-09-23 11:36:33 +0100 | [diff] [blame] | 27 | <groupId>org.glassfish.jersey.media</groupId>
|
| 28 | <artifactId>jersey-media-multipart</artifactId>
|
| 29 | </dependency>
|
| 30 |
|
| 31 | <dependency>
|
Bruno Sakoto | 49c88d9 | 2020-10-06 22:09:58 -0400 | [diff] [blame] | 32 | <groupId>org.springframework</groupId>
|
| 33 | <artifactId>spring-webmvc</artifactId>
|
| 34 | </dependency>
|
| 35 |
|
| 36 | <dependency>
|
Rishi Chail | b220d74 | 2020-09-16 15:23:53 +0100 | [diff] [blame] | 37 | <groupId>org.springframework.boot</groupId>
|
| 38 | <artifactId>spring-boot-starter-jersey</artifactId>
|
| 39 | <exclusions>
|
| 40 | <exclusion>
|
| 41 | <groupId>org.springframework.boot</groupId>
|
| 42 | <artifactId>spring-boot-starter-tomcat</artifactId>
|
| 43 | </exclusion>
|
| 44 | </exclusions>
|
| 45 | </dependency>
|
| 46 |
|
| 47 | <dependency>
|
| 48 | <groupId>org.springframework.boot</groupId>
|
| 49 | <artifactId>spring-boot-starter-jetty</artifactId>
|
| 50 | </dependency>
|
| 51 |
|
Rishi Chail | 14f3af1 | 2020-10-02 09:33:35 +0100 | [diff] [blame] | 52 | <dependency>
|
| 53 | <groupId>io.swagger.core.v3</groupId>
|
| 54 | <artifactId>swagger-annotations</artifactId>
|
| 55 | <version>${swagger.version}</version>
|
| 56 | </dependency>
|
| 57 |
|
| 58 | <dependency>
|
| 59 | <groupId>io.swagger.core.v3</groupId>
|
| 60 | <artifactId>swagger-jaxrs2</artifactId>
|
| 61 | <version>${swagger.version}</version>
|
| 62 | </dependency>
|
niamhcore | 6820538 | 2020-09-23 11:36:33 +0100 | [diff] [blame] | 63 |
|
Rishi Chail | b220d74 | 2020-09-16 15:23:53 +0100 | [diff] [blame] | 64 | <dependency>
|
| 65 | <groupId>org.springframework.boot</groupId>
|
| 66 | <artifactId>spring-boot-starter-test</artifactId>
|
| 67 | <scope>test</scope>
|
| 68 | <exclusions>
|
| 69 | <exclusion>
|
| 70 | <groupId>org.junit.vintage</groupId>
|
| 71 | <artifactId>junit-vintage-engine</artifactId>
|
| 72 | </exclusion>
|
| 73 | </exclusions>
|
| 74 | </dependency>
|
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 75 |
|
| 76 | <!-- Used by the generated API -->
|
| 77 | <dependency>
|
| 78 | <groupId>org.apache.cxf</groupId>
|
| 79 | <artifactId>cxf-bundle-jaxrs</artifactId>
|
| 80 | <version>${cxf-bundle-jaxrs.version}</version>
|
| 81 | </dependency>
|
| 82 |
|
| 83 | <!-- Used by the generated API -->
|
| 84 | <dependency>
|
| 85 | <groupId>org.apache.cxf</groupId>
|
| 86 | <artifactId>cxf-rt-rs-service-description</artifactId>
|
| 87 | <version>${cxf-rt-rs-service.version}</version>
|
| 88 | </dependency>
|
| 89 |
|
Rishi Chail | b220d74 | 2020-09-16 15:23:53 +0100 | [diff] [blame] | 90 | </dependencies>
|
| 91 |
|
| 92 | <build>
|
| 93 | <plugins>
|
| 94 | <plugin>
|
| 95 | <groupId>org.springframework.boot</groupId>
|
| 96 | <artifactId>spring-boot-maven-plugin</artifactId>
|
| 97 | <version>${springboot.version}</version>
|
| 98 | <executions>
|
| 99 | <execution>
|
| 100 | <goals>
|
| 101 | <goal>repackage</goal>
|
| 102 | </goals>
|
| 103 | </execution>
|
| 104 | </executions>
|
| 105 | </plugin>
|
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 106 |
|
| 107 | <plugin>
|
| 108 | <groupId>io.swagger.codegen.v3</groupId>
|
| 109 | <artifactId>swagger-codegen-maven-plugin</artifactId>
|
| 110 | <version>${swagger-codegen.version}</version>
|
| 111 | <executions>
|
| 112 | <execution>
|
| 113 | <goals>
|
| 114 | <goal>generate</goal>
|
| 115 | </goals>
|
| 116 | <configuration>
|
| 117 | <inputSpec>${project.basedir}/docs/api/swagger/openapi.yml</inputSpec>
|
| 118 | <invokerPackage>org.onap.cps.rest.controller</invokerPackage>
|
| 119 | <modelPackage>org.onap.cps.rest.model</modelPackage>
|
| 120 | <apiPackage>org.onap.cps.rest.controller</apiPackage>
|
| 121 | <language>jaxrs-cxf</language>
|
| 122 | <generateSupportingFiles>true</generateSupportingFiles>
|
| 123 | <configOptions>
|
| 124 | <sourceFolder>src/gen/java</sourceFolder>
|
| 125 | <dateLibrary>java8</dateLibrary>
|
| 126 | <library>jersey2</library>
|
| 127 | <interfaceOnly>true</interfaceOnly>
|
| 128 | </configOptions>
|
| 129 | </configuration>
|
| 130 | </execution>
|
| 131 | </executions>
|
| 132 | </plugin>
|
Bruno Sakoto | 49c88d9 | 2020-10-06 22:09:58 -0400 | [diff] [blame] | 133 | <plugin>
|
| 134 | <!-- Download Swagger UI webjar. -->
|
| 135 | <groupId>org.apache.maven.plugins</groupId>
|
| 136 | <artifactId>maven-dependency-plugin</artifactId>
|
| 137 | <version>${maven-dependency-plugin.version}</version>
|
| 138 | <executions>
|
| 139 | <execution>
|
| 140 | <phase>prepare-package</phase>
|
| 141 | <goals>
|
| 142 | <goal>unpack</goal>
|
| 143 | </goals>
|
| 144 | <configuration>
|
| 145 | <artifactItems>
|
| 146 | <artifactItem>
|
| 147 | <groupId>org.webjars</groupId>
|
| 148 | <artifactId>swagger-ui</artifactId>
|
| 149 | <version>${swagger-ui.version}</version>
|
| 150 | </artifactItem>
|
| 151 | </artifactItems>
|
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 152 | <outputDirectory>
|
| 153 | ${project.build.directory}/swagger-ui-${swagger-ui.version}
|
| 154 | </outputDirectory>
|
Bruno Sakoto | 49c88d9 | 2020-10-06 22:09:58 -0400 | [diff] [blame] | 155 | </configuration>
|
| 156 | </execution>
|
| 157 | </executions>
|
| 158 | </plugin>
|
| 159 | <plugin>
|
| 160 | <!-- Copy Swagger UI resources to static resources directory. -->
|
| 161 | <groupId>org.apache.maven.plugins</groupId>
|
| 162 | <artifactId>maven-resources-plugin</artifactId>
|
| 163 | <version>${maven-resources-plugin.version}</version>
|
| 164 | <executions>
|
| 165 | <execution>
|
| 166 | <id>copy-resources</id>
|
| 167 | <phase>prepare-package</phase>
|
| 168 | <goals>
|
| 169 | <goal>copy-resources</goal>
|
| 170 | </goals>
|
| 171 | <configuration>
|
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 172 | <outputDirectory>${project.build.outputDirectory}/static/swagger-ui
|
| 173 | </outputDirectory>
|
Bruno Sakoto | 49c88d9 | 2020-10-06 22:09:58 -0400 | [diff] [blame] | 174 | <resources>
|
| 175 | <resource>
|
niamhcore | f7ba359 | 2020-10-19 12:48:06 +0100 | [diff] [blame] | 176 | <directory>
|
| 177 | ${project.build.directory}/swagger-ui-${swagger-ui.version}/META-INF/resources/webjars/swagger-ui/${swagger-ui.version}/
|
| 178 | </directory>
|
Bruno Sakoto | 49c88d9 | 2020-10-06 22:09:58 -0400 | [diff] [blame] | 179 | <excludes>
|
| 180 | <exclude>**/*.gz</exclude>
|
| 181 | </excludes>
|
| 182 | </resource>
|
| 183 | </resources>
|
| 184 | </configuration>
|
| 185 | </execution>
|
| 186 | </executions>
|
| 187 | </plugin>
|
| 188 | <plugin>
|
| 189 | <!-- Replace the OpenAPI specification example URL with the local one. -->
|
| 190 | <groupId>com.google.code.maven-replacer-plugin</groupId>
|
| 191 | <artifactId>replacer</artifactId>
|
| 192 | <version>${maven-replacer-plugin.version}</version>
|
| 193 | <executions>
|
| 194 | <execution>
|
| 195 | <phase>prepare-package</phase>
|
| 196 | <goals>
|
| 197 | <goal>replace</goal>
|
| 198 | </goals>
|
| 199 | </execution>
|
| 200 | </executions>
|
| 201 | <configuration>
|
| 202 | <file>${project.build.outputDirectory}/static/swagger-ui/index.html</file>
|
| 203 | <replacements>
|
| 204 | <replacement>
|
| 205 | <token>https://petstore.swagger.io/v2/swagger.json</token>
|
| 206 | <value>/api/cps/openapi.json</value>
|
| 207 | </replacement>
|
| 208 | </replacements>
|
| 209 | </configuration>
|
| 210 | </plugin>
|
Rishi Chail | b220d74 | 2020-09-16 15:23:53 +0100 | [diff] [blame] | 211 | </plugins>
|
| 212 | </build>
|
| 213 | </project>
|