-
Notifications
You must be signed in to change notification settings - Fork 87
/
pom.xml
131 lines (123 loc) · 6.08 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.smallrye</groupId>
<artifactId>smallrye-open-api-ui-parent</artifactId>
<version>3.5.1-SNAPSHOT</version>
</parent>
<artifactId>smallrye-open-api-ui</artifactId>
<name>SmallRye: OpenAPI UI</name>
<properties>
<swagger-ui.version>5.3.2</swagger-ui.version>
<swagger-ui-theme.version>3.0.1</swagger-ui-theme.version>
<path.swagger-ui>openapi-ui</path.swagger-ui>
<sonar.skip>true</sonar.skip>
</properties>
<dependencies>
<!-- Keep it here so that dependabot can help us with the update -->
<dependency>
<groupId>org.webjars.npm</groupId>
<artifactId>swagger-ui-dist</artifactId>
<version>${swagger-ui.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.webjars.npm</groupId>
<artifactId>swagger-ui-themes</artifactId>
<version>${swagger-ui-theme.version}</version>
<scope>provided</scope>
</dependency>
<!-- Tests -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<!-- Copy all web content files META-INF folder, and push it though a filter to replace maven properties -->
<resources>
<resource>
<directory>${basedir}/src/main/resources</directory>
</resource>
<!-- Make sure the template is available for external usage -->
<resource>
<directory>${basedir}/src/main/resources/template</directory>
<targetPath>${project.build.directory}/classes/META-INF/resources/template</targetPath>
<filtering>false</filtering>
<includes>
<include>*.html</include>
</includes>
</resource>
<!-- Also included index.html in case a template is not used -->
<resource>
<directory>${basedir}/src/main/webapp</directory>
<targetPath>${project.build.directory}/classes/META-INF/resources/${path.swagger-ui}</targetPath>
<filtering>true</filtering>
<includes>
<include>**/*.html</include>
</includes>
</resource>
<resource>
<directory>${basedir}/src/main/webapp</directory>
<targetPath>${project.build.directory}/classes/META-INF/resources/${path.swagger-ui}</targetPath>
<filtering>false</filtering>
<excludes>
<exclude>**/*.html</exclude>
</excludes>
</resource>
</resources>
<plugins>
<!-- So we don't have to keep a version of these javascript libs in our repo -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<id>install-swagger-ui</id>
<phase>generate-sources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.webjars.npm</groupId>
<artifactId>swagger-ui-dist</artifactId>
<version>${swagger-ui.version}</version>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/classes/META-INF/resources/${path.swagger-ui}/</outputDirectory>
<includes>**/swagger-ui.css,
**/swagger-ui.css.map,
**/swagger-ui-bundle.js,
**/swagger-ui-bundle.js.map,
**/swagger-ui-standalone-preset.js,
**/swagger-ui-standalone-preset.js.map,
**/oauth2-redirect.html</includes>
<fileMappers>
<org.codehaus.plexus.components.io.filemappers.FlattenFileMapper />
</fileMappers>
</artifactItem>
<artifactItem>
<groupId>org.webjars.npm</groupId>
<artifactId>swagger-ui-themes</artifactId>
<version>${swagger-ui-theme.version}</version>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/classes/META-INF/resources/${path.swagger-ui}/</outputDirectory>
<includes>**/*.css</includes>
<fileMappers>
<org.codehaus.plexus.components.io.filemappers.FlattenFileMapper />
</fileMappers>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>