104

SpringSource.org 将他们的网站更改为http://spring.io

有人知道如何在没有 Maven/github 的情况下获取最新版本吗?来自http://spring.io/projects

4

1 回答 1

226

请编辑以使此镜像列表保持最新

我找到了这个mavenrepo,你可以直接从zip包含你需要的所有 jar 的文件中下载。

替代解决方案:Maven

我更喜欢的解决方案是使用Maven,它很简单,您不必jar单独下载每个。您可以通过以下步骤进行操作:

  1. 使用您喜欢的任何名称在任何地方创建一个空文件夹,例如spring-source

  2. 创建一个名为的新文件pom.xml

  3. 将下面的xml复制到这个文件中

  4. spring-source在控制台中打开文件夹

  5. mvn install

  6. 下载完成后,你会在里面找到spring jars/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 项目,只需dependency从其相应网页复制配置即可。

例如,如果要下载Spring Web Flowjars,请转到其网页,并将其dependency配置添加到pom.xml dependencies,然后mvn install再次运行。

<dependency>
  <groupId>org.springframework.webflow</groupId>
  <artifactId>spring-webflow</artifactId>
  <version>2.3.2.RELEASE</version>
</dependency>
于 2013-11-06T13:09:08.153 回答