|
162 | 162 | <executions>
|
163 | 163 | <execution>
|
164 | 164 | <id>update-schemas-submodule</id>
|
165 |
| - <phase>validate</phase> |
| 165 | + <phase>initialize</phase> |
166 | 166 | <goals>
|
167 | 167 | <goal>exec</goal>
|
168 | 168 | </goals>
|
169 | 169 | <configuration>
|
170 |
| - <!-- run: git submodule update \-\-init \-\-recursive --> |
| 170 | + <!-- run: git submodule update \-\-init schemas --> |
171 | 171 | <executable>git</executable>
|
172 | 172 | <arguments>
|
173 | 173 | <argument>submodule</argument>
|
|
177 | 177 | </arguments>
|
178 | 178 | </configuration>
|
179 | 179 | </execution>
|
| 180 | + </executions> |
| 181 | + </plugin> |
| 182 | + |
| 183 | + <plugin> |
| 184 | + <artifactId>maven-resources-plugin</artifactId> |
| 185 | + <version>3.3.1</version> |
| 186 | + <executions> |
180 | 187 | <execution>
|
181 |
| - <id>copy-schema-definition</id> |
182 |
| - <phase>validate</phase> |
183 |
| - <goals> |
184 |
| - <goal>exec</goal> |
185 |
| - </goals> |
186 |
| - <configuration> |
187 |
| - <!-- run: cp schemas/protobuf/schema/v1/schema.proto src/main/proto/ --> |
188 |
| - <executable>cp</executable> |
189 |
| - <arguments> |
190 |
| - <argument>schemas/protobuf/schema/v1/schema.proto</argument> |
191 |
| - <argument>src/main/proto/</argument> |
192 |
| - </arguments> |
193 |
| - </configuration> |
194 |
| - </execution> |
195 |
| - <execution> |
196 |
| - <id>copy-sync-definition</id> |
197 |
| - <phase>validate</phase> |
198 |
| - <goals> |
199 |
| - <goal>exec</goal> |
200 |
| - </goals> |
201 |
| - <configuration> |
202 |
| - <!-- run: cp schemas/protobuf/sync/v1/sync_service.proto src/main/proto/ --> |
203 |
| - <executable>cp</executable> |
204 |
| - <arguments> |
205 |
| - <argument>schemas/protobuf/sync/v1/sync_service.proto</argument> |
206 |
| - <argument>src/main/proto/</argument> |
207 |
| - </arguments> |
208 |
| - </configuration> |
209 |
| - </execution> |
210 |
| - <execution> |
211 |
| - <id>copy-evaluation.proto</id> |
212 |
| - <phase>validate</phase> |
213 |
| - <goals> |
214 |
| - <goal>exec</goal> |
215 |
| - </goals> |
216 |
| - <configuration> |
217 |
| - <!-- run: cp schemas/protobuf/flagd/evaluation/v1/evaluation.proto src/main/proto/ --> |
218 |
| - <executable>cp</executable> |
219 |
| - <arguments> |
220 |
| - <argument>schemas/protobuf/flagd/evaluation/v1/evaluation.proto</argument> |
221 |
| - <argument>src/main/proto/</argument> |
222 |
| - </arguments> |
223 |
| - </configuration> |
224 |
| - </execution> |
225 |
| - <execution> |
226 |
| - <id>copy-sync.proto</id> |
227 |
| - <phase>validate</phase> |
228 |
| - <goals> |
229 |
| - <goal>exec</goal> |
230 |
| - </goals> |
231 |
| - <configuration> |
232 |
| - <!-- run: cp schemas/protobuf/flagd/sync/v1/sync.proto src/main/proto/ --> |
233 |
| - <executable>cp</executable> |
234 |
| - <arguments> |
235 |
| - <argument>schemas/protobuf/flagd/sync/v1/sync.proto</argument> |
236 |
| - <argument>src/main/proto/</argument> |
237 |
| - </arguments> |
238 |
| - </configuration> |
239 |
| - </execution> |
240 |
| - <execution> |
241 |
| - <id>copy-flags-json-schema</id> |
242 |
| - <phase>validate</phase> |
243 |
| - <goals> |
244 |
| - <goal>exec</goal> |
245 |
| - </goals> |
246 |
| - <configuration> |
247 |
| - <!-- run: cp schemas/json/flags.json src/main/resources/flagd/schemas/ --> |
248 |
| - <executable>cp</executable> |
249 |
| - <arguments> |
250 |
| - <argument>schemas/json/flags.json</argument> |
251 |
| - <argument>src/main/resources/flagd/schemas/</argument> |
252 |
| - </arguments> |
253 |
| - </configuration> |
254 |
| - </execution> |
255 |
| - <execution> |
256 |
| - <id>copy-flags-targeting-schema</id> |
257 |
| - <phase>validate</phase> |
| 188 | + <id>copy-json-schemas</id> |
| 189 | + <phase>generate-resources</phase> |
258 | 190 | <goals>
|
259 |
| - <goal>exec</goal> |
| 191 | + <goal>copy-resources</goal> |
260 | 192 | </goals>
|
261 | 193 | <configuration>
|
262 |
| - <!-- run: cp schemas/json/targeting.json src/main/resources/flagd/schemas/ --> |
263 |
| - <executable>cp</executable> |
264 |
| - <arguments> |
265 |
| - <argument>schemas/json/targeting.json</argument> |
266 |
| - <argument>src/main/resources/flagd/schemas/</argument> |
267 |
| - </arguments> |
| 194 | + <outputDirectory>${basedir}/src/main/resources/flagd/schemas/</outputDirectory> |
| 195 | + <resources> |
| 196 | + <resource> |
| 197 | + <directory>${basedir}/schemas/json/</directory> |
| 198 | + <includes> |
| 199 | + <include>flags.json</include> |
| 200 | + <include>targeting.json</include> |
| 201 | + </includes> |
| 202 | + </resource> |
| 203 | + </resources> |
268 | 204 | </configuration>
|
269 | 205 | </execution>
|
270 | 206 | </executions>
|
|
278 | 214 | <protocArtifact>com.google.protobuf:protoc:3.21.1:exe:${os.detected.classifier}</protocArtifact>
|
279 | 215 | <pluginId>grpc-java</pluginId>
|
280 | 216 | <pluginArtifact>io.grpc:protoc-gen-grpc-java:1.48.1:exe:${os.detected.classifier}</pluginArtifact>
|
| 217 | + <protoSourceRoot>${project.basedir}/schemas/protobuf/</protoSourceRoot> |
281 | 218 | </configuration>
|
282 | 219 | <executions>
|
283 | 220 | <execution>
|
|
0 commit comments