2013-07-04 35 views
0

有没有一种方法让maven脚本能够自动下载我在pom中指定的依赖关系的依赖关系?有没有一种方法让maven脚本能够自动下载我在pom中指定的依赖关系的依赖关系

例如,我指定我的pom.xml以下,

<dependency> 
    <groupId>org.springframework</groupId> 
    <artifactId>spring-core</artifactId> 
    <version>3.2.3.RELEASE</version> 
</dependency> 

我想要一个工具,它解决的是“春芯”依赖于与更新POM以及下载依赖的依赖。 任何IDE的/建立插件这样做?

回答

0
Yes you can download from MAVEN Central repository by specifying central repository location in your maven home. ie .m2/settings.xml 

<mirror> 
     <id>mirrors.dotsrc.org</id> 
     <name>Mirror of http://repo1.maven.org/maven2/</name> 
     <url>http://repo1.maven.org/maven2/</url> 
     <mirrorOf>central2</mirrorOf> 
</mirror> 

and in your pom add following.. 
<groupId>org.springframework</groupId> 
<artifactId>spring-core</artifactId> 
<version>3.2.3.RELEASE</version> 

Please refer. 
http://search.maven.org/#search|ga|1|g%3A%22org.springframework%22 
+0

这会自动下载jars Spring依赖吗? –