問題不能在的IntelliJ基於Maven進口彈簧3.0.6罐子
我試圖得到一個準系統Spring MVC的項目(類似於STS提供的模板)中的IntelliJ但春天3.0.6罐子不要導入。我做了,甚至沒有經過:右鍵點擊項目名稱 - > Maven->強制重新導入
我已經試過
閱讀下面的帖子http://blog.springsource.com/2009/12/02/obtaining-spring-3-artifacts-with-maven/
添加了所有的春天jar依賴關係在我的pom.xml中
- 將屬性塊置於3.0.6以外的依賴關係中作爲版本
- 添加了以下庫條目(抱歉不知道如何在這裏輸入XML): http://maven.springframework.org/snapshot http://maven.springframework.org/milestone http://repo1.maven.org/maven2
- 右鍵單擊項目 - > Maven->強制Reimports
- 什麼都沒有。
有人知道爲什麼嗎?
<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>
請出示失敗的POM的一個小例子。 (換句話說,如果你要導入每個Spring庫,我們就不需要看到這個庫了 - 做一個小項目並顯示失敗。)否則我們猜測。同時顯示您嘗試使用的確切版本,並顯示行爲:編譯錯誤? –
它不是POM失敗。它不會使春天的罐子變小。我已經把這樣的依賴關係鏈接建議:http://blog.springsource.com/2009/12/02/obtaining-spring-3-artifacts-with-maven/和春天罐子不會被下載。 – Viriato
是的,我們不知道什麼可能會失敗,也可能不會失敗。 –