问题
This is the pom file.
<project>
<parent>
<groupId>org.jboss.weld</groupId>
<artifactId>weld-api-bom</artifactId>
<version>1.0</version>
<relativePath>../bom/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>my-module</artifactId>
<dependencies>
<dependency>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
</project>
I know, to download the dependencies(above its "el-api") we should use
mvn dependency
But what is the command used to download the parent dependency(i.e weld-api-bom)?
回答1:
Given your parent pom has ../bom/pom.xml It could either be downloaded (if avaiable in configured repository) or be read from disk if it there. In any case most of the maven commands will trigger the download of this artifact as one of the very first steps of the build.
Please also note that "mvn dependency" is not a valid command.
来源:https://stackoverflow.com/questions/34946122/in-maven-project-how-to-download-the-library-in-source-binary-mentioned-in-the