无法通过IntelliJ中的Maven导入spring 3.0.6 jar

时间:2011-09-30 20:09:06

标签: spring maven intellij-idea

问题

我想在IntelliJ中获得一个准系统弹簧mvc项目(类似于STS中提供的模板),但是弹簧3.0.6罐子不会被导入。甚至在我完成之后:右键单击项目名称 - > Maven->强制重新导入

我尝试了什么

  1. 阅读以下帖子http://blog.springsource.com/2009/12/02/obtaining-spring-3-artifacts-with-maven/

  2. 在我的pom.xml

  3. 中添加了所有spring jar依赖项
  4. 将依赖项外部的属性块与3.0.6作为版本
  5. 添加了以下存储库条目(抱歉不知道如何在此输入xml): http://maven.springframework.org/snapshot http://maven.springframework.org/milestone http://repo1.maven.org/maven2
  6. 右键点击项目 - > Maven-> Force Reimports
  7. 什么都没有下来。
  8. 有人知道为什么吗?

    <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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>springplusjasper</groupId>
    <artifactId>springplusjasper</artifactId>
    <packaging>war</packaging>
    <version>1.0</version>
    <name>springplusjasper Maven Webapp</name>
    <url>http://maven.apache.org</url>
    <!-- Shared version number properties -->
    <properties>
        <org.springframework.version>3.0.6.RELEASE</org.springframework.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>
    
    
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>org.springframework.core</artifactId>
            <version>3.0.6.RELEASE</version>
        </dependency>
    
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>org.springframework.expression</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
    
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>org.springframework.beans</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
    
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>org.springframework.aop</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
    
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>org.springframework.context</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
    
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>org.springframework.context.support</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
    
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>org.springframework.transaction</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
    
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>org.springframework.jdbc</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
    
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>org.springframework.orm</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
    
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>org.springframework.oxm</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
    
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>org.springframework.web</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
    
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>org.springframework.web.servlet</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
    
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>org.springframework.web.portlet</artifactId>
            <version>${org.springframework.version}</version>
        </dependency>
    
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>org.springframework.test</artifactId>
            <version>${org.springframework.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <repositories>
    <repository>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <id>org.springframework.maven.snapshot</id>
      <name>Spring Maven Snapshot Repository</name>
      <url>http://maven.springframework.org/snapshot</url>
    </repository>
    <repository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>org.springframework.maven.milestone</id>
      <name>Spring Maven Milestone Repository</name>
      <url>http://maven.springframework.org/milestone</url>
    </repository>
    <repository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <name>Maven Repository Switchboard</name>
      <url>http://repo1.maven.org/maven2</url>
    </repository>
    </repositories>
    <build>
        <finalName>springplusjasper</finalName>
    </build>
    </project>
    

1 个答案:

答案 0 :(得分:0)

春天的神器ids是弹簧核,弹簧豆等。