Java 我在哪里可以在不使用 Maven 的情况下下载 Spring Framework jars?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19082860/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Where can I download Spring Framework jars without using Maven?
提问by java_dude
SpringSource.org changed their site to http://spring.io
SpringSource.org 将他们的站点更改为http://spring.io
Does someone know how to get the latest build without Maven/github? from http://spring.io/projects
有人知道如何在没有 Maven/github 的情况下获得最新版本吗?来自http://spring.io/projects
采纳答案by fujy
Please edit to keep this list of mirrors current
请编辑以保持此镜像列表为最新
I found this maven
repo where you could download from directly a zip
file containing all the jars you need.
我找到了这个maven
repo,您可以在其中直接从zip
包含您需要的所有 jar的文件下载。
- http://maven.springframework.org/release/org/springframework/spring/
- http://repo.spring.io/release/org/springframework/spring/
- http://maven.springframework.org/release/org/springframework/spring/
- http://repo.spring.io/release/org/springframework/spring/
Alternate solution: Maven
替代解决方案:Maven
The solution I prefer is using Maven
, it is easy and you don't have to download each jar
alone. You can do it with the following steps:
我更喜欢的解决方案是使用Maven
,它很简单,您不必jar
单独下载。您可以通过以下步骤来完成:
- Create an empty folder anywhere with any name you prefer, for example
spring-source
- Create a new file named
pom.xml
- Copy the xml below into this file
- Open the
spring-source
folder in your console - Run
mvn install
After download finished, you'll find spring jars in
/spring-source/target/dependencies
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>spring-source-download</groupId> <artifactId>SpringDependencies</artifactId> <version>1.0</version> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>3.2.4.RELEASE</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.8</version> <executions> <execution> <id>download-dependencies</id> <phase>generate-resources</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <outputDirectory>${project.build.directory}/dependencies</outputDirectory> </configuration> </execution> </executions> </plugin> </plugins> </build> </project>
- 例如,使用您喜欢的任何名称在任何地方创建一个空文件夹
spring-source
- 创建一个名为的新文件
pom.xml
- 将下面的xml复制到这个文件中
spring-source
在控制台中打开文件夹- 跑
mvn install
下载完成后,你会在
/spring-source/target/dependencies
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>spring-source-download</groupId> <artifactId>SpringDependencies</artifactId> <version>1.0</version> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>3.2.4.RELEASE</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.8</version> <executions> <execution> <id>download-dependencies</id> <phase>generate-resources</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <outputDirectory>${project.build.directory}/dependencies</outputDirectory> </configuration> </execution> </executions> </plugin> </plugins> </build> </project>
Also, if you need to download any other spring project, just copy the dependency
configuration from its corresponding web page.
另外,如果您需要下载任何其他 spring 项目,只需dependency
从其相应的网页中复制配置即可。
For example, if you want to download Spring Web Flow
jars, go to its web page, and add its dependency
configuration to the pom.xml
dependencies
, then run mvn install
again.
比如你要下载Spring Web Flow
jar包,去它的网页,将它的dependency
配置添加到 中pom.xml
dependencies
,然后mvn install
再次运行。
<dependency>
<groupId>org.springframework.webflow</groupId>
<artifactId>spring-webflow</artifactId>
<version>2.3.2.RELEASE</version>
</dependency>