Jay.
Jay.

Reputation: 331

Where to find Spring Framework 6 JAR files?

I can find only till version 5.3.26 on the following link. https://repo.spring.io/ui/repos/tree/General/release/org/springframework/spring/5.3.9

Where can I find JAR files for Spring 6? Is there any official spring.io link?

Upvotes: 2

Views: 4450

Answers (2)

zawarudo
zawarudo

Reputation: 2496

As far as I know, there is no place on the official spring website to download Spring 6 jars directly, because I was looking for that as well.

But what you can do is create a maven project, drop whatever dependencies you need spring-aop for example, and after that go to the :

C:\Users\user_name\.m2\repository\org\springframework\spring-aop\6.0.4\spring-aop-6.0.4.jar

and in there you find all jars that were pulled to your hard drive from maven artifactory.

It is a painful process, the Maven project overall would be a better solution in my opinion, but if you want old-school jars, this was the approach that I took when I needed Spring 6 jars.

Edit:

I did some additional lookup on Spring repo website and here is what I found

Check out these links

https://repo.spring.io/ui/native/release/org/springframework/

https://repo.spring.io/ui/native/release/org/springframework/spring-core/6.0.6/

It seems that they recently added jars to a different location and you can get jars from this link for some reason, you can no longer download all Spring 6 jars from one link. With this new information in mind, I would still take a maven approach because there might be some transient dependencies and additional jars that need to be included in the project that you initially might not know. Maven will know much better than us what jars need to be pulled when we add a few Spring dependencies.

Another good thing that I did is that I added spring-core in the maven project, and I nuked my .m2 folder completely, then ran Maven > Update and with each visit to .m2 folder I got a clean local repository of jars that were related ONLY to the dependency that I included in the project.

Then I would replace the dependency with the next one I need, and repeat the process of nuking .m2 folder and checking its content.

Or you can simply go to this link

https://repo.spring.io/ui/native/release/org/springframework/

and visit every sublink of that and download every jar, yet number of those sublinks get smaller with each month, but that still does not answer the question do some of these jars ( dependencies ) have some transient dependencies that Maven would have pulled for us?

Happy hunting.

Upvotes: 4

Dien Duy Nguyen
Dien Duy Nguyen

Reputation: 1

Best way is to use Maven that's included in an IDE. My instructions are for Eclipse 2023-09 (4.29.0).

  • Step 1: Create a Java Project from Eclipse

    • File -> New -> Project -> Java -> Java Project
  • Step 2: Convert the Java Project to Maven Project

    • Right click on the project's name then Configure -> Convert to Maven Project.

      A pom.xml file will be created for this project.

  • Step 3: Open the pom.xml file in Eclipse and add a <dependencies></dependencies> tag on the same level as the <build></build> tag.

  • Step 4: Add each dependency your project requires in a <dependency></dependency> tag inside the parent <dependencies></dependencies> and save the pom.xml file.

    For example:

    <dependency>
        <groupId>org.springframework\</groupId><br>
        <artifactId>spring-core\</artifactId><br>
        <version>6.0.12\</version><br>
    </dependency>
    
  • Step 5: To add another dependency just copy one dependency and change the artifactId. The spring jars can be found at https://mvnrepository.com/artifact/org.springframework.

Upvotes: 0

Related Questions