我是maven的新手,我有一个非常简单的项目,使用了intelij的想法。我的pom文件是:
<groupId>Pilot</groupId>
<artifactId>Pilot</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<repositories>
<repository>
<id>repository.jboss.org</id>
<name>Jboss Repository for Maven</name>
<url>http://repository.jboss.org/maven2/</url>
</repository>
<repository>
<id>snapshots.jboss.org</id>
<name>Jboss Snapshots Repository for Maven</name>
<url>http://snapshots.jboss.org/maven2/</url>
<snapshots>
</snapshots>
</repository>
<repository>
<id>jboss-releases-repository</id>
<name>JBoss Releases Repository</name>
<url>
https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/
</url>
</repository>
</repositories>
<properties>
<spring.version>3.2.4.RELEASE</spring.version>
<hibernate.jpa.version>4.2.6.Final</hibernate.jpa.version>
<jdk.Version>1.7</jdk.Version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- Hibernate dependencies -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.jpa.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>3.5.6-Final</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>ejb3-persistence</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<version>1.0.1.Final</version>
</dependency>
<dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.18.0.GA</version>
</dependency>
<!-- End Hibernate dependencies -->
<!-- Spring 3 dependencies -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>${springVersion}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>${springVersion}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>${springVersion}</version>
</dependency>
<!-- END Spring 3 dependencies -->
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
<!--java unit test-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
</dependency>
<!--Oracle Driver-->
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>10.2.0.4.0</version>
<scope>test</scope>
</dependency>
</dependencies>
我不知道为什么Intelij Idea不下载依赖项,我的pom文件没有build标签和插件teg。我该怎么办?
答案 0 :(得分:1)
我在更改了存储库网址后解决了这个问题。