Repository navigation
Expand file tree
/
Copy pathpom.xml
More file actions
813 lines (749 loc) · 36.3 KB
/
Copy pathpom.xml
File metadata and controls
813 lines (749 loc) · 36.3 KB
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
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<!-- The Flink framework module. It is the root pom of the repository (sources under src/,
shaded jar under target/) and a module of the reactor in reactor/pom.xml, which is also
its parent: groupId, version, the Java 21 / Maven 3.9 enforcer rules and plugin versions
come from there. `./mvnw clean test` here builds this module alone;
`./mvnw -f reactor/pom.xml verify` builds every module in dependency order. -->
<parent>
<groupId>org.jagentic</groupId>
<artifactId>agentic-streaming-reactor</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>reactor/pom.xml</relativePath>
</parent>
<artifactId>agentic-flink</artifactId>
<name>Agentic Flink</name>
<description>Standalone Agentic Framework for Apache Flink with LangChain4J Integration</description>
<properties>
<!-- flink.version, java.version, langchain4j.version and junit.version are inherited from
the reactor parent. Flink 2.x supports 17/21; 25 is not yet viable (see the Lombok
note below). slf4j.version and log4j.version come from the reactor too. -->
<!-- JVM flags for the surefire and failsafe forks. Flink on Java 17+: Kryo / Twitter Chill
reflective access into JDK internals is blocked by the module system without these
opens. Mirrors Flink's own recommended JVM args. -->
<agentic.test.jvmArgs>
--add-opens=java.base/java.util=ALL-UNNAMED
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.lang.invoke=ALL-UNNAMED
--add-opens=java.base/java.lang.reflect=ALL-UNNAMED
--add-opens=java.base/java.io=ALL-UNNAMED
--add-opens=java.base/java.net=ALL-UNNAMED
--add-opens=java.base/java.nio=ALL-UNNAMED
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED
--add-opens=java.base/sun.nio.cs=ALL-UNNAMED
--add-opens=java.base/sun.security.action=ALL-UNNAMED
--add-opens=java.base/sun.util.calendar=ALL-UNNAMED
--add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED
--add-opens=java.base/java.text=ALL-UNNAMED
</agentic.test.jvmArgs>
<!--
A2A (Agent2Agent) Java SDK. groupId io.github.a2asdk. The 1.0 protocol line is
currently published only as alphas on Maven Central (newest stable Final is 0.3.x);
we pin the 1.0 surface and isolate it behind our own A2AClient SPI so a later Final
bump is a one-module change. See docs/a2a.md.
-->
<a2a.version>1.0.0.Alpha3</a2a.version>
<!-- 1.18.40 was the first release to support JDK 25; staying current here keeps a
future baseline bump from being blocked by annotation processing. -->
<lombok.version>1.18.48</lombok.version>
<jackson.version>2.18.10</jackson.version>
</properties>
<dependencyManagement>
<dependencies>
<!-- A2A Java SDK BOM — aligns all a2a-java-sdk-* module versions. -->
<dependency>
<groupId>io.github.a2asdk</groupId>
<artifactId>a2a-java-sdk-bom</artifactId>
<version>${a2a.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- The LangChain4J BOM, flink-cep, postgresql and HikariCP versions, and every
org.jagentic module coordinate are managed in reactor/pom.xml. -->
<!-- Pin commons-lang3 to the modern version Flink 2.x ships, so neither the uber-jar
nor downstream consumers pick up a stale Range/StringUtils from a transitive dep
(a pre-3.13 commons-lang3 lacks Range.of and breaks Flink's runtime). -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.19.0</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- Apache Flink Core -->
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java</artifactId>
<version>${flink.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-clients</artifactId>
<version>${flink.version}</version>
<scope>provided</scope>
</dependency>
<!-- Flink CEP. Deliberately compile scope, unlike the rest of Flink: the DSL's job path
(job/AgentJobGenerator, job/AgentExecutionFunction, statemachine/) and the pipeline
runner use it, and a Flink distribution does not ship flink-cep in lib/, so every
consumer job jar has to shade it. `provided` would fail those jobs at runtime with
NoClassDefFoundError; optional would make the default DSL path fail the same way.
It adds no transitive dependencies beyond the provided Flink runtime. -->
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-cep</artifactId>
</dependency>
<!-- The Flink-free portable agent brain (RoutedGraph, GraphBuilder, PipelineLoader, tools,
CEP spec). Lets the YAML->Flink-job runner reuse the same pipeline.yaml the cores use,
running the portable graph inside a Flink keyed operator. A reactor module: the
reactor build orders it first, a standalone build of this pom needs it installed
(`./mvnw -f ports/jagentic-core/pom.xml install -DskipTests`). -->
<dependency>
<groupId>org.jagentic</groupId>
<artifactId>jagentic-core</artifactId>
</dependency>
<!--
Apache Flink Agents - OPTIONAL Plugin (Experimental)
NOTE: This is an OPTIONAL dependency for the Flink Agents plugin.
The core framework works WITHOUT these dependencies.
To enable Flink Agents plugin:
1. Build Flink Agents from source (still in SNAPSHOT):
git clone https://github.com/apache/flink-agents.git
cd flink-agents && ./tools/build.sh && mvn install -DskipTests
2. Build this project with the flink-agents profile:
mvn clean package -P flink-agents
See: src/main/java/org/agentic/flink/plugins/flintagents/README.md
-->
<!-- Flink Agents dependencies are in the 'flink-agents' profile below -->
<!-- LangChain4J Core -->
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j</artifactId>
</dependency>
<!-- LangChain4J provider SDKs. All optional: LangChain4jChatConnection selects the provider
class in a switch at runtime, so a consumer adds only the SDK(s) it configures (see
the install section of README.md). The uber jar and banking-job carry all four. -->
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-ollama</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-open-ai</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-anthropic</artifactId>
<optional>true</optional>
</dependency>
<!-- Google Gemini (API-key auth; required by the A2A banking demo, where the model is locked
to gemini-3.5-flash). For Vertex project/location auth instead, swap to
langchain4j-vertex-ai-gemini. -->
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-google-ai-gemini</artifactId>
<optional>true</optional>
</dependency>
<!-- Apache Fluss streaming storage client (backs FlussVectorStore; optional) -->
<dependency>
<groupId>com.alibaba.fluss</groupId>
<artifactId>fluss-client</artifactId>
<version>0.7.0</version>
<optional>true</optional>
</dependency>
<!-- Native Qdrant gRPC client (backs QdrantVectorStore; optional) -->
<dependency>
<groupId>io.qdrant</groupId>
<artifactId>client</artifactId>
<version>1.11.0</version>
<optional>true</optional>
</dependency>
<!-- Milvus SDK (backs MilvusVectorStore; optional) -->
<dependency>
<groupId>io.milvus</groupId>
<artifactId>milvus-sdk-java</artifactId>
<version>2.4.8</version>
<optional>true</optional>
</dependency>
<!-- Lombok for reduced boilerplate -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<scope>provided</scope>
</dependency>
<!-- Logging: the library logs through the SLF4J API only. The Log4j backend is test scope,
so consumers (and the thin jar's pom) choose their own binding; the uber jar excludes
both (a Flink cluster supplies them) and banking-job declares its own backend. -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j2-impl</artifactId>
<version>${log4j.version}</version>
<scope>test</scope>
</dependency>
<!--
Redis Client - OPTIONAL backend.
Flink keyed state is the canonical short-term memory. Redis is only used
if the user opts in to the RedisLongTermStore or RedisPubSubFeed backends.
Marked optional so consumers who don't need Redis don't pull it transitively.
-->
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>5.1.0</version>
<optional>true</optional>
</dependency>
<!-- Flink Kafka connector for KafkaMemoryFeed (optional at runtime). -->
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-kafka</artifactId>
<version>5.0.0-2.2</version>
<optional>true</optional>
</dependency>
<!--
JeroMQ — pure-Java ZeroMQ. Backs ZeroMqChannel / ZeroMqSink for in-JVM /
localhost job-to-job chaining without burning a Kafka or Fluss topic. Optional
so consumers who don't use ZMQ pay nothing transitively.
-->
<dependency>
<groupId>org.zeromq</groupId>
<artifactId>jeromq</artifactId>
<version>0.6.0</version>
<optional>true</optional>
</dependency>
<!--
A2A (Agent2Agent) Java SDK — OPTIONAL.
a2a-java-sdk-spec provides the wire POJOs (AgentCard, Message, Part, Task, Artifact);
a2a-java-sdk-client + its transport modules implement the outbound client. All marked
optional so consumers who don't use A2A pay nothing transitively — the SDK is only
touched by org.agentic.flink.a2a.SdkA2AClient (everything else uses our A2AClient SPI).
Versions come from the a2a-java-sdk-bom imported above.
-->
<dependency>
<groupId>io.github.a2asdk</groupId>
<artifactId>a2a-java-sdk-spec</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.github.a2asdk</groupId>
<artifactId>a2a-java-sdk-client</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.github.a2asdk</groupId>
<artifactId>a2a-java-sdk-client-transport-jsonrpc</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.github.a2asdk</groupId>
<artifactId>a2a-java-sdk-client-transport-grpc</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.github.a2asdk</groupId>
<artifactId>a2a-java-sdk-client-transport-rest</artifactId>
<optional>true</optional>
</dependency>
<!--
DJL (Deep Java Library) — OPTIONAL inference backend.
Provides a single API over PyTorch, TensorFlow, ONNX, MXNet, and HuggingFace tokenizers.
These artifacts are marked optional so consumers who don't use DL pay nothing
transitively. Native PyTorch shared libraries (`pytorch-native-cpu`, `pytorch-native-cu118`,
`pytorch-native-mps`, etc.) are NOT pulled here — downstream projects pick the right one
for their target platform.
-->
<dependency>
<groupId>ai.djl</groupId>
<artifactId>api</artifactId>
<version>0.30.0</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>ai.djl.huggingface</groupId>
<artifactId>tokenizers</artifactId>
<version>0.30.0</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>ai.djl.pytorch</groupId>
<artifactId>pytorch-engine</artifactId>
<version>0.30.0</version>
<optional>true</optional>
</dependency>
<!--
Web toolkit — OPTIONAL.
Jsoup for HTML parsing, crawler-commons for robots.txt + sitemap.xml, Apache Tika for
multi-format content extraction (PDF, DOC, PPT, EPUB, …). All marked optional so users
who don't run a crawler pay nothing transitively.
-->
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.18.1</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.github.crawler-commons</groupId>
<artifactId>crawler-commons</artifactId>
<version>1.4</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-core</artifactId>
<version>2.9.2</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-parsers-standard-package</artifactId>
<version>2.9.2</version>
<optional>true</optional>
</dependency>
<!-- Tika needs commons-io 2.15+ for ChecksumInputStream; Flink pulls an older one. -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.16.1</version>
<optional>true</optional>
</dependency>
<!-- Jackson for JSON and YAML Support -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
<version>${jackson.version}</version>
</dependency>
<!-- Jackson Parameter Names Module for constructor detection -->
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-parameter-names</artifactId>
<version>${jackson.version}</version>
</dependency>
<!-- PostgreSQL JDBC driver and HikariCP pool behind the postgres stores (PostgresConversationStore,
PgVectorStore, PostgresA2ATaskStore). Optional: a consumer that selects the postgres
backend adds both; versions are managed in reactor/pom.xml. -->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<optional>true</optional>
</dependency>
<!--
PEMJA — OPTIONAL. Embeds a Python interpreter inside the JVM so cloudpickled
Python callbacks shipped in an AgentPlan can run on the operator thread without
IPC. Marked optional — users who only run the Java side or the JPype standalone
path pay nothing.
-->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>pemja</artifactId>
<version>0.4.1</version>
<optional>true</optional>
</dependency>
<!--
Razorvine pickle decoder — OPTIONAL. Standalone Java decoder for plain pickle
payloads (metadata, schema descriptors). Cloudpickle bytes themselves require
cloudpickle inside the embedded Python interpreter; this dep is the fallback
path for plain-pickle metadata that doesn't need a Python runtime.
-->
<dependency>
<groupId>net.razorvine</groupId>
<artifactId>pickle</artifactId>
<version>1.5</version>
<optional>true</optional>
</dependency>
<!-- Reflections for @Tool annotation scanning -->
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<version>0.10.2</version>
</dependency>
<!-- Testing -->
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-test-utils</artifactId>
<version>${flink.version}</version>
<scope>test</scope>
</dependency>
<!-- Unbounded in-JVM source for MiniCluster tests that stop-with-savepoint and restore -->
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-connector-datagen</artifactId>
<version>${flink.version}</version>
<scope>test</scope>
</dependency>
<!-- Keyed operator test harness (event-time timers, TTL, snapshot/restore without a cluster) -->
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-streaming-java</artifactId>
<version>${flink.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-runtime</artifactId>
<version>${flink.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<!-- @SetEnvironmentVariable for AgenticFlinkConfig env resolution tests. Its own JUnit
artifacts are excluded so the reactor's junit.version stays authoritative; the
surefire argLine already opens java.util and java.lang for the env map access. -->
<dependency>
<groupId>org.junit-pioneer</groupId>
<artifactId>junit-pioneer</artifactId>
<version>2.3.0</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.jupiter</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>org.junit.platform</groupId>
<artifactId>*</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Testcontainers for integration tests -->
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>${testcontainers.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${testcontainers.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- The JDK 21 / Maven 3.9 enforcer rules are inherited from reactor/pom.xml. -->
<!-- Maven Compiler Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>${java.version}</release>
<compilerArgs>
<arg>-parameters</arg>
</compilerArgs>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
</annotationProcessorPaths>
<!-- Exclude Flink Agents plugin by default -->
<excludes>
<exclude>**/plugins/flintagents/**</exclude>
</excludes>
</configuration>
</plugin>
<!-- Maven Shade Plugin for Uber JAR -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>${maven.plugin.shade.version}</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<!--
Attach the fat jar under the `uber` classifier and keep the MAIN
artifact thin. Maven consumers of agentic-flink (a2a-gateway,
banking-job, …) then get the plain classes + correct transitive deps
(e.g. commons-lang3 3.19.0) instead of a 260MB uber-jar that bundles —
and accidentally shadows with — stale third-party classes. Use the
`-uber` jar for `flink run` / cluster upload (see examples-bin/*).
-->
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>uber</shadedClassifierName>
<!-- The installed pom must be this pom, not shade's dependency-reduced
one: the reduced pom strips every dependency bundled into the
uber jar, which is exactly the compile-scope set (jagentic-core,
langchain4j, flink-cep, Jackson) a consumer of the thin jar needs. -->
<createDependencyReducedPom>false</createDependencyReducedPom>
<artifactSet>
<excludes>
<exclude>org.apache.flink:flink-shaded-force-shading</exclude>
<exclude>com.google.code.findbugs:jsr305</exclude>
<exclude>org.slf4j:*</exclude>
<exclude>org.apache.logging.log4j:*</exclude>
</excludes>
</artifactSet>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.agentic.flink.example.SimpleAgentExample</mainClass>
</transformer>
<!-- Merge META-INF/services so every ServiceLoader provider survives
the uber-jar: DJL's model-zoo (ai.djl.repository.zoo.ZooProvider,
needed for the djl:// HuggingFace embedder) and our own SPIs
(A2AClientFactory, ChatConnection, EmbeddingConnection, VectorStore,
LongTermMemoryStore). Without this, shade keeps only one file per
service and the rest are silently dropped. -->
<transformer
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<!-- Maven Surefire Plugin - exclude integration + DJL (live-download) tests by default -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludedGroups>integration,djl</excludedGroups>
<argLine>${agentic.test.jvmArgs}</argLine>
</configuration>
</plugin>
<!-- Google Java Format. The default lifecycle only verifies formatting; run
`./mvnw spotless:apply` to rewrite sources (CONTRIBUTING.md). -->
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.43.0</version>
<configuration>
<java>
<googleJavaFormat/>
<removeUnusedImports/>
<trimTrailingWhitespace/>
</java>
</configuration>
<executions>
<execution>
<id>spotless-check</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>central</id>
<name>Central Repository</name>
<url>https://repo1.maven.org/maven2/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<!-- Apache Snapshot Repository (for Flink Agents snapshots) -->
<repository>
<id>apache.snapshots</id>
<name>Apache Snapshot Repository</name>
<url>https://repository.apache.org/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<profiles>
<!-- Unit suite plus the integration tests. The *IT.java classes are run by
maven-failsafe-plugin (integration-test and verify phases, configured in the reactor
parent) and never by surefire, whose default include pattern does not match them:
./mvnw verify -P integration-tests
They need a container runtime for Testcontainers (Podman socket exported as
DOCKER_HOST locally, Docker on GitHub-hosted runners) and fail with an explicit
message when none is reachable. The surefire override below only lifts the
"integration" tag exclusion for tagged *Test classes; the djl group stays excluded
(it downloads a native PyTorch runtime; see djl-native). -->
<profile>
<id>integration-tests</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludedGroups>djl</excludedGroups>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<excludedGroups>djl</excludedGroups>
<argLine>${agentic.test.jvmArgs}</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!--
Examples profile. Flink is a provided dependency, so a plain `exec:java` run lacks
org.apache.flink.streaming.*, and even with the test-scope classpath the in-process
exec:java run fails because Flink's MiniCluster deserializes the stream graph through a
class loader that cannot see the plugin's isolated classpath. This profile therefore forks
a JVM (exec:exec) with the test-scope classpath (which includes provided) and the same
reflective opens as the surefire argLine. `compile` must be in the same invocation:
./mvnw -P examples compile exec:exec -Dexec.mainClass=org.agentic.flink.example.StorageIntegratedFlinkJob
./mvnw -P examples compile exec:exec -Dexec.mainClass=org.agentic.flink.pipeline.FlinkPipelineRunner \
-Dexec.args="examples/pipelines/incident.yaml"
The showcase scripts under examples-bin/ wrap the same classpath with prerequisite checks.
-->
<profile>
<id>examples</id>
<properties>
<exec.args></exec.args>
<examples.add.opens>--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/sun.nio.cs=ALL-UNNAMED --add-opens=java.base/sun.security.action=ALL-UNNAMED --add-opens=java.base/sun.util.calendar=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED</examples.add.opens>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<configuration>
<executable>${java.home}/bin/java</executable>
<classpathScope>test</classpathScope>
<commandlineArgs>${examples.add.opens} -classpath %classpath ${exec.mainClass} ${exec.args}</commandlineArgs>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!--
DJL live profile. The default build pulls the DJL API + pytorch-engine but not the native
PyTorch shared library (a no-DL build stays small). Enabling this profile selects the live
DJL test group ({@code @Tag("djl")}); DJL's pytorch-engine auto-downloads the
platform-matched CPU native + JNI on first model load (cached under ~/.djl.ai), so no
platform-specific Maven classifier is needed:
mvn test -P djl-native -Dtest=DjlRecallIT # live embed + recall + micro-benchmark
For a fully offline/air-gapped jar, add ai.djl.pytorch:pytorch-native-cpu with your
platform's DJL classifier (osx-aarch64 / linux-x86_64 / …) at the call site.
-->
<profile>
<id>djl-native</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludedGroups>none</excludedGroups>
<groups>djl</groups>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!-- Optional Flink Agents Plugin Profile -->
<profile>
<id>flink-agents</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<dependencies>
<!-- Flink Agents API - Built from source and installed locally -->
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-agents-api</artifactId>
<version>0.2-SNAPSHOT</version>
</dependency>
<!-- Flink Agents Plan - Workflow agent support -->
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-agents-plan</artifactId>
<version>0.2-SNAPSHOT</version>
</dependency>
<!-- Flink Agents Runtime - Agent execution runtime -->
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-agents-runtime</artifactId>
<version>0.2-SNAPSHOT</version>
</dependency>
<!-- Flink Agents Ollama Integration - LLM support -->
<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-agents-integrations-chat-models-ollama</artifactId>
<version>0.2-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>${java.version}</release>
<compilerArgs>
<arg>-parameters</arg>
</compilerArgs>
<!-- Include Flink Agents plugin when profile is active -->
<excludes>
<exclude>NOTHING_TO_EXCLUDE</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>