-
Notifications
You must be signed in to change notification settings - Fork 4
/
pom.xml
208 lines (201 loc) · 8.49 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<?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>
<groupId>video.api</groupId>
<artifactId>api-client-generator</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>api-client-generator</name>
<modules>
<module>apivideo-generator</module>
</modules>
<profiles>
<profile>
<id>android</id>
<properties>
<configFileName>android</configFileName>
<outputFolder>android</outputFolder>
<templateFolder>java</templateFolder>
<generatorName>video.api.client.generator.Java</generatorName>
<postGenerationScript>./post-generate.sh</postGenerationScript>
</properties>
</profile>
<profile>
<id>android-uploader</id>
<properties>
<configFileName>android-uploader</configFileName>
<outputFolder>android-uploader</outputFolder>
<templateFolder>java</templateFolder>
<generatorName>video.api.client.generator.JavaUploader</generatorName>
<postGenerationScript>./post-generate.sh</postGenerationScript>
</properties>
</profile>
<profile>
<id>java</id>
<properties>
<configFileName>java</configFileName>
<outputFolder>java</outputFolder>
<templateFolder>java</templateFolder>
<generatorName>video.api.client.generator.Java</generatorName>
<postGenerationScript>./post-generate.sh</postGenerationScript>
</properties>
</profile>
<profile>
<id>nodejs</id>
<properties>
<configFileName>nodejs</configFileName>
<outputFolder>nodejs</outputFolder>
<templateFolder>nodejs</templateFolder>
<generatorName>video.api.client.generator.TypeScript</generatorName>
<postGenerationScript>./post-generate.sh</postGenerationScript>
</properties>
</profile>
<profile>
<id>php</id>
<properties>
<configFileName>php</configFileName>
<outputFolder>php</outputFolder>
<templateFolder>php</templateFolder>
<generatorName>video.api.client.generator.Php</generatorName>
<postGenerationScript>./post-generate.sh</postGenerationScript>
</properties>
</profile>
<profile>
<id>csharp</id>
<properties>
<configFileName>csharp</configFileName>
<outputFolder>csharp</outputFolder>
<templateFolder>csharp</templateFolder>
<generatorName>video.api.client.generator.Csharp</generatorName>
<postGenerationScript>./post-generate.sh</postGenerationScript>
</properties>
</profile>
<profile>
<id>python</id>
<properties>
<configFileName>python</configFileName>
<outputFolder>python</outputFolder>
<templateFolder>python</templateFolder>
<generatorName>video.api.client.generator.Python</generatorName>
<postGenerationScript>./post-generate.sh</postGenerationScript>
</properties>
</profile>
<profile>
<id>go</id>
<properties>
<configFileName>go</configFileName>
<outputFolder>go</outputFolder>
<templateFolder>go</templateFolder>
<generatorName>video.api.client.generator.Go</generatorName>
<postGenerationScript>./post-generate.sh</postGenerationScript>
</properties>
</profile>
<profile>
<id>swift5</id>
<properties>
<configFileName>swift5</configFileName>
<outputFolder>swift5</outputFolder>
<templateFolder>swift5</templateFolder>
<generatorName>video.api.client.generator.Swift5</generatorName>
<postGenerationScript>./post-generate.sh</postGenerationScript>
</properties>
</profile>
<profile>
<id>swift5-uploader</id>
<properties>
<configFileName>swift5-uploader</configFileName>
<outputFolder>swift5-uploader</outputFolder>
<templateFolder>swift5</templateFolder>
<generatorName>video.api.client.generator.Swift5Uploader</generatorName>
<postGenerationScript>./post-generate.sh</postGenerationScript>
</properties>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator</artifactId>
<version>5.3.0</version>
</dependency>
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-cli</artifactId>
<version>5.3.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<filesets>
<fileset>
<directory>generated-clients/java/src</directory>
</fileset>
</filesets>
</configuration>
<executions>
<execution>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>5.3.0</version>
<executions>
<execution>
<id>defaut-cli</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<inputSpec>oas_apivideo.yaml</inputSpec>
<generatorName>${generatorName}</generatorName>
<templateDirectory>${project.basedir}/templates/${templateFolder}</templateDirectory>
<configurationFile>${project.basedir}/config/${configFileName}.yaml</configurationFile>
<output>generated-clients/${outputFolder}</output>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>video.api</groupId>
<artifactId>openapi-custom-generator</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<phase>package</phase>
<configuration>
<target name="postGenerationScript" if="postGenerationScript">
<chmod file="generated-clients/${outputFolder}/${postGenerationScript}" perm="+x"/>
<exec failonerror="true" executable="${postGenerationScript}" dir="generated-clients/${outputFolder}"></exec>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>