generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 4
/
pom.xml
655 lines (651 loc) · 24.6 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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
<?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>com.sap.ai.sdk</groupId>
<artifactId>sdk-parent</artifactId>
<version>0.2.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>SAP AI SDK - Parent POM</name>
<description>Parent POM for the SAP AI SDK. Defines dependency versions and plugin configurations</description>
<url>https://github.com/SAP/ai-sdk-java?tab=readme-ov-file#documentation</url>
<organization>
<name>SAP SE</name>
<url>https://www.sap.com</url>
</organization>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<developers>
<developer>
<name>SAP</name>
<email>[email protected]</email>
<organization>SAP SE</organization>
<organizationUrl>https://www.sap.com</organizationUrl>
</developer>
</developers>
<modules>
<module>core</module>
<module>orchestration</module>
<module>foundation-models/openai</module>
</modules>
<scm>
<connection/>
<url/>
</scm>
<distributionManagement>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org</url>
</repository>
<snapshotRepository>
<id>artifactory-snapshots</id>
<url>https://common.repositories.cloud.sap/artifactory/build-snapshots-cloudsdk</url>
</snapshotRepository>
</distributionManagement>
<properties>
<project.rootdir>${project.basedir}</project.rootdir>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.release>17</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<cloud-sdk.version>5.13.0</cloud-sdk.version>
<junit-jupiter.version>5.11.2</junit-jupiter.version>
<wiremock.version>3.9.1</wiremock.version>
<assertj-core.version>3.26.3</assertj-core.version>
<slf4j.version>2.0.16</slf4j.version>
<spotless.version>2.43.0</spotless.version>
<checkstyle.version>10.18.2</checkstyle.version>
<system-stubs.version>2.1.3</system-stubs.version>
<surefire.version>3.5.1</surefire.version>
<springframework.version>6.1.13</springframework.version>
<mockito.version>5.14.1</mockito.version>
<!-- Quality assurance -->
<enforcer.skipBanLoggingFrameworks>false</enforcer.skipBanLoggingFrameworks>
<enforcer.skipEnforceScopeLoggerBridges>false</enforcer.skipEnforceScopeLoggerBridges>
<enforcer.skipEnforceScopeLombok>false</enforcer.skipEnforceScopeLombok>
<enforcer.skipBanGeneratedModulesReference>false</enforcer.skipBanGeneratedModulesReference>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.sap.cloud.sdk</groupId>
<artifactId>sdk-bom</artifactId>
<version>${cloud-sdk.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- scope "compile" -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${springframework.version}</version>
</dependency>
<!-- scope "test" -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>${junit-jupiter.version}</version>
</dependency>
<dependency>
<groupId>org.wiremock</groupId>
<artifactId>wiremock</artifactId>
<version>${wiremock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj-core.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<!-- Modules BoM -->
<dependency>
<groupId>com.sap.ai.sdk</groupId>
<artifactId>core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.sap.ai.sdk</groupId>
<artifactId>orchestration</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.sap.ai.sdk.foundationmodels</groupId>
<artifactId>openai</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.sap.ai.sdk.app</groupId>
<artifactId>spring-app</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4j.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>${project.basedir}/src/main/resources</directory>
</resource>
<!-- include LICENSE in all jar files -->
<resource>
<filtering>false</filtering>
<directory>${project.rootdir}</directory>
<includes>
<include>LICENSE</include>
</includes>
</resource>
</resources>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.4.0</version>
</plugin>
<plugin>
<groupId>com.sap.cloud.sdk.datamodel</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>${cloud-sdk.version}</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<fail>true</fail>
</configuration>
<executions>
<execution>
<id>enforce-project-rules</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<banDistributionManagement/>
<banDuplicatePomDependencyVersions/>
<dependencyConvergence/>
</rules>
</configuration>
</execution>
<execution>
<id>ban-deprecated-dependencies</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<bannedDependencies>
<message>Do not use deprecated dependencies.</message>
<excludes>
<exclude>javax.servlet:servlet-api</exclude>
<exclude>javax.ws.rs:jsr311-api</exclude>
<!-- use javax.ws.rs:javax.ws.rs-api -->
<exclude>commons-httpclient:commons-httpclient</exclude>
</excludes>
</bannedDependencies>
</rules>
</configuration>
</execution>
<execution>
<id>ban-logging-frameworks</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<skip>${enforcer.skipBanLoggingFrameworks}</skip>
<rules>
<bannedDependencies>
<message>Do not use and do exclude all transitive uses of logging frameworks.</message>
<excludes>
<exclude>org.slf4j:slf4j-simple</exclude>
<exclude>commons-logging</exclude>
<exclude>ch.qos.logback</exclude>
<exclude>org.apache.logging.log4j</exclude>
<exclude>org.apache.log4j</exclude>
<exclude>log4j</exclude>
<exclude>org.tinylog</exclude>
</excludes>
<includes>
<include>org.slf4j:slf4j-simple:*:*:test</include>
</includes>
</bannedDependencies>
</rules>
</configuration>
</execution>
<execution>
<id>enforce-scope-logger-bridges</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<skip>${enforcer.skipEnforceScopeLoggerBridges}</skip>
<rules>
<bannedDependencies>
<message>Logger bridges must use scope runtime or test.</message>
<excludes>
<exclude>org.slf4j:jul-to-slf4j</exclude>
<exclude>org.slf4j:jcl-over-slf4j</exclude>
<exclude>org.slf4j:log4j-over-slf4j</exclude>
</excludes>
<includes>
<include>org.slf4j:jul-to-slf4j:*:*:runtime</include>
<include>org.slf4j:jul-to-slf4j:*:*:test</include>
<include>org.slf4j:jcl-over-slf4j:*:*:runtime</include>
<include>org.slf4j:jcl-over-slf4j:*:*:test</include>
<include>org.slf4j:log4j-over-slf4j:*:*:runtime</include>
<include>org.slf4j:log4j-over-slf4j:*:*:test</include>
</includes>
</bannedDependencies>
</rules>
</configuration>
</execution>
<execution>
<id>enforce-scope-lombok</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<skip>${enforcer.skipEnforceScopeLombok}</skip>
<rules>
<bannedDependencies>
<message>Use lombok with scope provided.</message>
<excludes>
<exclude>org.projectlombok:lombok</exclude>
</excludes>
<includes>
<include>org.projectlombok:lombok:*:*:provided</include>
</includes>
</bannedDependencies>
</rules>
</configuration>
</execution>
<execution>
<id>ban-old-junit</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<bannedDependencies>
<message>Do not use JUnit 4.X, instead exclusively use Junit Jupiter. JUnit 4 tests will (silently) simply not be executed.</message>
<excludes>
<exclude>junit:junit</exclude>
</excludes>
</bannedDependencies>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<failOnWarning>true</failOnWarning>
<failBuild>true</failBuild>
<ignoreNonCompile>false</ignoreNonCompile>
<ignoreUnusedRuntime>true</ignoreUnusedRuntime>
<ignoredUnusedDeclaredDependencies combine.children="append">
<!-- ignore annotations that are not visible on bytecode level -->
<ignoredUnusedDeclaredDependency>com.google.code.findbugs:jsr305</ignoredUnusedDeclaredDependency>
<!-- Logging API, adapters and default implementation for tests -->
<ignoredUnusedDeclaredDependency>org.slf4j:slf4j-api</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>org.slf4j:jcl-over-slf4j</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>org.slf4j:slf4j-simple</ignoredUnusedDeclaredDependency>
<!-- Lombok usage for code generation -->
<ignoredUnusedDeclaredDependency>org.projectlombok:lombok</ignoredUnusedDeclaredDependency>
<!-- By default, JUnit5 adapters are added to every module to ensure no tests are skipped -->
<ignoredUnusedDeclaredDependency>org.junit.jupiter:junit-jupiter-engine</ignoredUnusedDeclaredDependency>
</ignoredUnusedDeclaredDependencies>
</configuration>
<executions>
<execution>
<id>analyze</id>
<goals>
<goal>analyze-only</goal>
</goals>
<phase>process-test-classes</phase>
</execution>
<execution>
<id>analyze-dep-mgt</id>
<goals>
<goal>analyze-dep-mgt</goal>
</goals>
<phase>process-test-classes</phase>
</execution>
<execution>
<id>analyze-duplicate</id>
<goals>
<goal>analyze-duplicate</goal>
</goals>
<phase>process-test-classes</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless.version}</version>
<configuration>
<java>
<!-- https://github.com/diffplug/spotless/tree/main/plugin-maven#java -->
<removeUnusedImports/>
<googleJavaFormat/>
</java>
<pom>
<!-- https://github.com/diffplug/spotless/tree/main/plugin-maven#maven-pom -->
<includes>
<include>**/pom.xml</include>
</includes>
<encoding>${project.build.sourceEncoding}</encoding>
<sortPom>
<expandEmptyElements>false</expandEmptyElements>
</sortPom>
</pom>
</configuration>
<executions>
<execution>
<!-- compile:apply instead of the default validate:check -->
<!-- because we want it to run AFTER the OpenAPI generator and FIX (apply) the generated code -->
<goals>
<goal>apply</goal>
</goals>
<phase>process-sources</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<configLocation>.pipeline/checkstyle.xml</configLocation>
<!-- Exclude generated clients -->
<suppressionsLocation>.pipeline/checkstyle-suppressions.xml</suppressionsLocation>
<linkXRef>false</linkXRef>
</configuration>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>${checkstyle.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.25.0</version>
<configuration>
<rulesets>
<ruleset>.pipeline/pmd.xml</ruleset>
<ruleset>.pipeline/sdk_specific_pmd_rules.xml</ruleset>
<!-- content of the PMD default rule set for Java can be found here:
https://gitbox.apache.org/repos/asf?p=maven-pmd-plugin.git;a=blob_plain;f=src/main/resources/rulesets/java/maven-pmd-plugin-default.xml;hb=HEAD -->
<ruleset>/rulesets/java/maven-pmd-plugin-default.xml</ruleset>
</rulesets>
<linkXRef>false</linkXRef>
<targetJdk>${maven.compiler.release}</targetJdk>
<excludes>
<!-- Exclude generated clients -->
<exclude>com/sap/ai/sdk/core/client/**/*</exclude>
<exclude>com/sap/ai/sdk/orchestration/client/**/*</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.8.6.4</version>
<configuration>
<includeFilterFile>.pipeline/spotbugs.xml</includeFilterFile>
<!-- Exclude generated clients -->
<excludeFilterFile>.pipeline/spotbugs-exclusions.xml</excludeFilterFile>
<effort>Max</effort>
<threshold>Low</threshold>
<maxHeap>2048</maxHeap>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.12</version>
<configuration>
<excludes>
<!-- Exclude generated clients and end to end application from test coverage -->
<exclude>com/sap/ai/sdk/core/client/**/*</exclude>
<exclude>com/sap/ai/sdk/orchestration/client/**/*</exclude>
<exclude>com/sap/ai/sdk/app/**/*</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<!-- Needed because GitHub actions uses an old Maven version <3.9.0 -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>non-release</id>
<activation>
<property>
<name>!release</name>
</property>
</activation>
<modules>
<module>sample-code/spring-app</module>
</modules>
</profile>
<profile>
<id>release</id>
<activation>
<property>
<name>release</name>
</property>
</activation>
<!-- Children projects inherit the configuration -->
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-maven-plugin</artifactId>
<version>1.18.20.0</version>
<configuration>
<addOutputDirectory>false</addOutputDirectory>
</configuration>
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.34</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>delombok</id>
<goals>
<goal>delombok</goal>
</goals>
<phase>process-sources</phase>
<configuration>
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
<outputDirectory>${project.build.directory}/delombok</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.10.1</version>
<configuration>
<quiet>true</quiet>
<additionalOptions>-Xdoclint:none</additionalOptions>
<show>protected</show>
<sourcepath>${project.basedir}/target/delombok</sourcepath>
</configuration>
<executions>
<execution>
<id>javadoc-jar</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.7</version>
<executions>
<execution>
<id>sign-artifacts</id>
<goals>
<goal>sign</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>3.1.3</version>
<executions>
<execution>
<goals>
<goal>install-file</goal>
</goals>
<phase>install</phase>
<configuration>
<file>${project.basedir}/target/${project.artifactId}-${project.version}.jar</file>
<sources>${project.basedir}/target/${project.artifactId}-${project.version}-sources.jar</sources>
<javadoc>${project.basedir}/target/${project.artifactId}-${project.version}-javadoc.jar</javadoc>
<pomFile>${project.basedir}/pom.xml</pomFile>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
<packaging>${project.packaging}</packaging>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.3</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.6.0</version>
<extensions>true</extensions>
<configuration>
<deploymentName>SAP AI SDK ${project.version}</deploymentName>
<publishingServerId>central</publishingServerId>
<autoPublish>false</autoPublish>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
</plugin>
<!-- The plugins configuration below will not be inherited by children projects, they are specific to the parent pom -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<inherited>false</inherited>
<executions>
<execution>
<configuration>
<file>${project.basedir}/pom.xml</file>
<!-- The parent has no sources -->
<sources>${empty.property}</sources>
<javadoc>${empty.property}</javadoc>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>