Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ out
*~
/.gradletasknamecache
**/*.flattened-pom.xml
dependency-reduced-pom.xml

vscode
settings.json
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@
<mcp.sdk.version>1.1.0</mcp.sdk.version>

<!-- plugin versions -->
<antlr.version>4.13.1</antlr.version>
<antlr.version>4.13.2</antlr.version>
<maven-compiler-plugin.version>3.14.1</maven-compiler-plugin.version>
<maven-enforcer-plugin.version>3.6.2</maven-enforcer-plugin.version>
<!-- The version (range) of the JDK we want to use to compile.
Expand Down
11 changes: 2 additions & 9 deletions spring-ai-model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,6 @@
<artifactId>reactor-core</artifactId>
</dependency>

<!-- ANTLR for Filter Expression Parsing -->
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
<version>${antlr.version}</version>
</dependency>

<dependency>
<groupId>com.github.victools</groupId>
<artifactId>jsonschema-generator</artifactId>
Expand Down Expand Up @@ -147,7 +140,7 @@
<version>${mockk-jvm.version}</version>
<scope>test</scope>
</dependency>

</dependencies>

</project>
174 changes: 123 additions & 51 deletions spring-ai-template-st/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,62 +16,134 @@
-->

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-parent</artifactId>
<version>2.0.0-SNAPSHOT</version>
</parent>
<artifactId>spring-ai-template-st</artifactId>
<packaging>jar</packaging>
<name>Spring AI Template StringTemplate</name>
<description>StringTemplate implementation for Spring AI templating</description>
<url>https://github.com/spring-projects/spring-ai</url>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-parent</artifactId>
<version>2.0.0-SNAPSHOT</version>
</parent>
<artifactId>spring-ai-template-st</artifactId>
<packaging>jar</packaging>
<name>Spring AI Template StringTemplate</name>
<description>StringTemplate implementation for Spring AI templating</description>
<url>https://github.com/spring-projects/spring-ai</url>

<scm>
<url>https://github.com/spring-projects/spring-ai</url>
<connection>scm:git:git://github.com/spring-projects/spring-ai.git</connection>
<developerConnection>scm:git:ssh://git@github.com/spring-projects/spring-ai.git</developerConnection>
</scm>
<scm>
<url>https://github.com/spring-projects/spring-ai</url>
<connection>scm:git:git://github.com/spring-projects/spring-ai.git</connection>
<developerConnection>scm:git:ssh://git@github.com/spring-projects/spring-ai.git</developerConnection>
</scm>

<properties>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
</properties>
<properties>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-commons</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependencies>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-commons</artifactId>
<version>${project.parent.version}</version>
</dependency>

<dependency>
<groupId>org.antlr</groupId>
<artifactId>ST4</artifactId>
<version>${ST4.version}</version>
</dependency>
<dependency>
<groupId>org.antlr</groupId>
<artifactId>ST4</artifactId>
<version>${ST4.version}</version>
</dependency>

<!-- ANTLR for token parsing -->
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
<version>${antlr.version}</version>
</dependency>
<!-- Logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>

<!-- Logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<!-- test dependencies -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<!-- test dependencies -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
<build>
<plugins>
<!-- Move the antlr-runtime (ANTLR 3 !!!) to a location specific for this module to avoid conflicts. -->
<!-- Conflicts can occur when used in conjunction with a different libraries which need -->
<!-- a different version of the antlr runtime -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.2</version>
<configuration>
<createDependencyReducedPom>true</createDependencyReducedPom>
<useDependencyReducedPomInJar>true</useDependencyReducedPomInJar>
<filters>
<filter>
<artifact>org.antlr:ST4</artifact>
<excludes>
<exclude>META-INF/services/**</exclude>
<exclude>META-INF/MANIFEST.MF</exclude>
<exclude>META-INF/maven/**</exclude>
</excludes>
</filter>
<filter>
<artifact>org.antlr:antlr-runtime</artifact>
<excludes>
<exclude>META-INF/services/**</exclude>
<exclude>META-INF/MANIFEST.MF</exclude>
<exclude>META-INF/maven/**</exclude>
</excludes>
</filter>
</filters>
<relocations>
<relocation>
<pattern>org.stringtemplate.v4</pattern>
<shadedPattern>shaded.${project.groupId}.${project.artifactId}.library.org.stringtemplate.v4</shadedPattern>
</relocation>
<relocation>
<pattern>org.antlr</pattern>
<shadedPattern>shaded.${project.groupId}.${project.artifactId}.library.org.antlr</shadedPattern>
</relocation>
</relocations>
<artifactSet>
<includes>
<include>org.antlr:ST4</include>
<include>org.antlr:antlr-runtime</include>
</includes>
</artifactSet>
</configuration>

<executions>
<execution>
<id>inject-problematic-dependencies</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>${project.basedir}</directory>
<includes>
<!-- Cleaning the intermediate files from maven-shade-plugin. -->
<include>dependency-reduced-pom.xml</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>

</plugins>
</build>

</project>
118 changes: 88 additions & 30 deletions spring-ai-vector-store/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@
<version>${project.parent.version}</version>
</dependency>

<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
<!-- Pin the runtime to the EXACT same version as the code generator or Antlr4 will fail at runtime. -->
<version>[${antlr.version}]</version>
</dependency>

<!-- test dependencies -->

<dependency>
Expand All @@ -63,34 +70,85 @@

</dependencies>

<profiles>
<profile>
<id>antlr4</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr4-maven-plugin</artifactId>
<version>${antlr.version}</version>
<configuration>
<sourceDirectory>${basedir}/src/main/antlr4</sourceDirectory>
<outputDirectory>${basedir}/src/main/java</outputDirectory>
<visitor>true</visitor>
</configuration>
<executions>
<execution>
<goals>
<goal>antlr4</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<build>
<plugins>
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr4-maven-plugin</artifactId>
<version>${antlr.version}</version>
<configuration>
<visitor>true</visitor>
</configuration>
<executions>
<execution>
<goals>
<goal>antlr4</goal>
</goals>
</execution>
</executions>
</plugin>

<!-- Move the antlr4-runtime to a location specific for this module to avoid conflicts. -->
<!-- Conflicts can occur when used in conjunction with a different library which needs -->
<!-- a different version of the antlr4-runtime -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.2</version>
<configuration>
<createDependencyReducedPom>true</createDependencyReducedPom>
<useDependencyReducedPomInJar>true</useDependencyReducedPomInJar>
<filters>
<filter>
<artifact>org.antlr:antlr4-runtime</artifact>
<excludes>
<exclude>META-INF/services/**</exclude>
<exclude>META-INF/MANIFEST.MF</exclude>
<exclude>META-INF/maven/**</exclude>
</excludes>
</filter>
</filters>
<relocations>
<relocation>
<pattern>org.antlr</pattern>
<shadedPattern>shaded.${project.groupId}.${project.artifactId}.library.org.antlr</shadedPattern>
</relocation>
</relocations>
<artifactSet>
<includes>
<include>org.antlr:antlr4-runtime</include>
</includes>
</artifactSet>
</configuration>

<executions>
<execution>
<id>inject-problematic-dependencies</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>${project.basedir}</directory>
<includes>
<!-- Cleaning the intermediate files from maven-shade-plugin. -->
<include>dependency-reduced-pom.xml</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>

</plugins>
</build>

</project>
Loading
Loading