0

maven 脚本有没有办法自动下载我在 pom 中指定的依赖 jar 包?

例如,我在 pom.xml 中指定以下内容,

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

我想要一个工具来解决“spring-core”所依赖的任何依赖项,并更新 pom 以及下载的依赖项。任何ide的/构建插件可以做到这一点?

4

1 回答 1

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
于 2013-07-04T06:19:59.440 回答