Closed RuiUma closed 7 months ago
Currently, Spring AI is not distributed in the central repository but rather in Spring's own Maven repository, so in order to include it, you need to add Spring's repository address in the pom.xml file.
<repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<releases>
<enabled>false</enabled>
</releases>
</repository>
</repositories>
@RuiUma, as pointed above, the Milestone/Snapshot artefacts are only resolvable through the Spring Snapshot/Milestone repositories. It is explained in the docs: https://docs.spring.io/spring-ai/reference/getting-started.html#repositories Let me know if we can improve the docs to avoid confusion. Also, mind that the newly released 0.8.0 milestone (we should have named it 0.8.0M1 or alike) and as a such is not published to the maven central. Having said this, we are moving quick and hopping to have our first GA soon.
If you use a Sonatype Nexus as Artifact proxy, then your error is related to this issue : Artifactory - Bad header value content-type of pom.xml from repo.spring.io/artifactory/snapshot
FWIW, the command spring boot add ai
is resolving to add the 0.8.0 version of Spring AI, see here and adds the appropriate definition of the milestone and snapshot repositories, see here.
It seems related to the issue @greggy-laloutre mentioned and I'm not quite sure what to do about that yet. We are investigating. Will keep you posted.
The issue on the hosting side has been fixed. Also, that infrastructure issue turned out to be a side effect of a mistake we had in the flatten pom plugin of maven, we ended up including a dependency management section in the pom that included all the dependencies that spring boot had. So both issues are now fixed. Closing, thanks for reporting. Create a new issue if you run into problems. Thanks!
you can add the dependency in the POM:
<repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
I used cmd "spring boot add ai" to add maven dependency, but maven could not find it.
Environment Spring boot: 3.2.3 Maven: 3.9.5 spring ai version: 0.8.1-SNAPSHOT
when using maven to install dependencies as follows
and I got error here.
I also tried version 0.8.0-SNAPSHOT and 0.7.1-SNAPSHOT, but got the same error.