This is an automated email from the ASF dual-hosted git repository.

xtsong pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/flink-agents.git

commit dd1c20bf332503e44991d3599c23b051c274e153
Author: WenjinXie <[email protected]>
AuthorDate: Tue Sep 23 16:21:21 2025 +0800

    [package] Add flink-agents-dist module to assemble jars.
---
 .licenserc.yaml                                    |  1 +
 {plan => dist}/pom.xml                             | 64 +++++++++++-----------
 dist/src/main/resources/META-INF/NOTICE            | 21 +++++++
 .../main/resources/META-INF/licenses/LICENSE.jsoup | 21 +++++++
 .../resources/META-INF/licenses/LICENSE.ollama4j   | 21 +++++++
 .../main/resources/META-INF/licenses/LICENSE.slf4j | 21 +++++++
 .../flink/agents/examples/ReActAgentExample.java   |  3 +-
 plan/pom.xml                                       |  1 +
 pom.xml                                            |  1 +
 runtime/pom.xml                                    |  2 +
 10 files changed, 121 insertions(+), 35 deletions(-)

diff --git a/.licenserc.yaml b/.licenserc.yaml
index 8100a27..b73bf4f 100644
--- a/.licenserc.yaml
+++ b/.licenserc.yaml
@@ -28,6 +28,7 @@ header:
     - '**/*.json'
     - '**/*.txt'
     - '**/dependency-reduced-pom.xml'
+    - '**/LICENSE.*'
   comment: on-failure
   dependency:
     files:
diff --git a/plan/pom.xml b/dist/pom.xml
similarity index 56%
copy from plan/pom.xml
copy to dist/pom.xml
index 7face36..ae21aca 100644
--- a/plan/pom.xml
+++ b/dist/pom.xml
@@ -25,16 +25,10 @@ under the License.
         <version>0.1-SNAPSHOT</version>
     </parent>
 
-    <artifactId>flink-agents-plan</artifactId>
-    <name>Flink Agents : Plan</name>
+    <artifactId>flink-agents-dist</artifactId>
+    <name>Flink Agents : Dist</name>
 
     <dependencies>
-        <dependency>
-            <groupId>org.apache.flink</groupId>
-            <artifactId>flink-core</artifactId>
-            <version>${flink.version}</version>
-            <scope>provided</scope>
-        </dependency>
         <dependency>
             <groupId>org.apache.flink</groupId>
             <artifactId>flink-agents-api</artifactId>
@@ -42,37 +36,41 @@ under the License.
         </dependency>
         <dependency>
             <groupId>org.apache.flink</groupId>
-            <artifactId>flink-shaded-jackson</artifactId>
-            
<version>${flink.shaded.jackson.version}-${flink.shaded.version}</version>
+            <artifactId>flink-agents-plan</artifactId>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
-            <groupId>com.alibaba</groupId>
-            <artifactId>pemja</artifactId>
-            <version>${pemja.version}</version>
+            <groupId>org.apache.flink</groupId>
+            <artifactId>flink-agents-runtime</artifactId>
+            <version>${project.version}</version>
         </dependency>
         <dependency>
-            <groupId>org.assertj</groupId>
-            <artifactId>assertj-core</artifactId>
-            <version>${assertj.version}</version>
-            <scope>test</scope>
+            <groupId>org.apache.flink</groupId>
+            
<artifactId>flink-agents-integrations-chat-models-ollama</artifactId>
+            <version>${project.version}</version>
         </dependency>
     </dependencies>
 
     <build>
-    <plugins>
-        <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-jar-plugin</artifactId>
-            <version>3.4.2</version>
-            <executions>
-                <execution>
-                    <goals>
-                        <goal>test-jar</goal>
-                    </goals>
-                </execution>
-            </executions>
-        </plugin>
-    </plugins>
-</build>
-
+        <plugins>
+            <!-- Build uber jar -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>shade-flink-agents</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <shadeTestJar>false</shadeTestJar>
+                            
<finalName>${project.artifactId}-${project.version}</finalName>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
 </project>
\ No newline at end of file
diff --git a/dist/src/main/resources/META-INF/NOTICE 
b/dist/src/main/resources/META-INF/NOTICE
new file mode 100644
index 0000000..ec4cbe2
--- /dev/null
+++ b/dist/src/main/resources/META-INF/NOTICE
@@ -0,0 +1,21 @@
+flink-agents-dist
+Copyright 2025 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+This project bundles the following dependencies under the Apache Software 
License 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt)
+
+- com.fasterxml.jackson.core:jackson-annotations:2.15.2
+- com.fasterxml.jackson.core:jackson-core:2.15.2
+- com.fasterxml.jackson.core:jackson-databind:2.15.2
+- org.apache.logging.log4j:log4j-api:2.23.1
+- org.apache.logging.log4j:log4j-core:2.23.1
+- org.apache.logging.log4j:log4j-slf4j-impl:2.23.1
+
+This project bundles the following dependencies under the MIT license.
+See bundled license files for details.
+
+- slf4j-api:slf4j-api:1.7.36
+- io.github.ollama4j:ollama4j:1.1.0
+- org.jsoup:jsoup:1.18.1
\ No newline at end of file
diff --git a/dist/src/main/resources/META-INF/licenses/LICENSE.jsoup 
b/dist/src/main/resources/META-INF/licenses/LICENSE.jsoup
new file mode 100644
index 0000000..edb2563
--- /dev/null
+++ b/dist/src/main/resources/META-INF/licenses/LICENSE.jsoup
@@ -0,0 +1,21 @@
+The MIT License
+
+Copyright (c) 2009-2025 Jonathan Hedley <https://jsoup.org/>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
\ No newline at end of file
diff --git a/dist/src/main/resources/META-INF/licenses/LICENSE.ollama4j 
b/dist/src/main/resources/META-INF/licenses/LICENSE.ollama4j
new file mode 100644
index 0000000..aba9f2d
--- /dev/null
+++ b/dist/src/main/resources/META-INF/licenses/LICENSE.ollama4j
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2023 Amith Koujalgi
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
\ No newline at end of file
diff --git a/dist/src/main/resources/META-INF/licenses/LICENSE.slf4j 
b/dist/src/main/resources/META-INF/licenses/LICENSE.slf4j
new file mode 100644
index 0000000..95065ad
--- /dev/null
+++ b/dist/src/main/resources/META-INF/licenses/LICENSE.slf4j
@@ -0,0 +1,21 @@
+ Copyright (c) 2004-2025 QOS.ch
+ All rights reserved.
+
+ Permission is hereby granted, free  of charge, to any person obtaining
+ a  copy  of this  software  and  associated  documentation files  (the
+ "Software"), to  deal in  the Software without  restriction, including
+ without limitation  the rights to  use, copy, modify,  merge, publish,
+ distribute,  sublicense, and/or sell  copies of  the Software,  and to
+ permit persons to whom the Software  is furnished to do so, subject to
+ the following conditions:
+
+ The  above  copyright  notice  and  this permission  notice  shall  be
+ included in all copies or substantial portions of the Software.
+
+ THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
+ EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
+ MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git 
a/examples/src/main/java/org/apache/flink/agents/examples/ReActAgentExample.java
 
b/examples/src/main/java/org/apache/flink/agents/examples/ReActAgentExample.java
index dd8ffe9..251a7c2 100644
--- 
a/examples/src/main/java/org/apache/flink/agents/examples/ReActAgentExample.java
+++ 
b/examples/src/main/java/org/apache/flink/agents/examples/ReActAgentExample.java
@@ -40,7 +40,6 @@ import org.apache.flink.table.api.Schema;
 import org.apache.flink.table.api.Table;
 import org.apache.flink.table.api.bridge.java.StreamTableEnvironment;
 import org.apache.flink.types.Row;
-import org.jetbrains.annotations.NotNull;
 
 import java.util.List;
 
@@ -117,7 +116,7 @@ public class ReActAgentExample {
     }
 
     // create ReAct agent.
-    private static @NotNull Agent getAgent() {
+    private static Agent getAgent() {
         ResourceDescriptor chatModelDescriptor =
                 
ResourceDescriptor.Builder.newBuilder(OllamaChatModelSetup.class.getName())
                         .addInitialArgument("connection", "ollama")
diff --git a/plan/pom.xml b/plan/pom.xml
index 7face36..72824d7 100644
--- a/plan/pom.xml
+++ b/plan/pom.xml
@@ -49,6 +49,7 @@ under the License.
             <groupId>com.alibaba</groupId>
             <artifactId>pemja</artifactId>
             <version>${pemja.version}</version>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.assertj</groupId>
diff --git a/pom.xml b/pom.xml
index e9cc7b1..98a4e96 100644
--- a/pom.xml
+++ b/pom.xml
@@ -59,6 +59,7 @@ under the License.
         <module>runtime</module>
         <module>e2e-test</module>
         <module>integrations</module>
+        <module>dist</module>
     </modules>
 
     <dependencies>
diff --git a/runtime/pom.xml b/runtime/pom.xml
index 3e5395b..fbd9f23 100644
--- a/runtime/pom.xml
+++ b/runtime/pom.xml
@@ -90,6 +90,7 @@ under the License.
             <groupId>org.apache.flink</groupId>
             <artifactId>flink-test-utils-junit</artifactId>
             <version>${flink.version}</version>
+            <scope>test</scope>
             <exclusions>
                 <exclusion>
                     <groupId>org.apache.logging.log4j</groupId>
@@ -107,6 +108,7 @@ under the License.
             <groupId>com.alibaba</groupId>
             <artifactId>pemja</artifactId>
             <version>${pemja.version}</version>
+            <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.flink</groupId>

Reply via email to