maven命令下载jar包

下载以下的jar包到本地仓库中

<dependency>
    <groupId>org.glassfish.web</groupId>
    <artifactId>jstl-impl</artifactId>
    <version>1.2</version>
</dependency>

可以在本地的settings.xml文件中添加阿里镜像地址

    <mirror>  
      <id>alimaven</id>  
      <name>aliyun maven</name>  
      <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
      <mirrorOf>central</mirrorOf>          
    </mirror>

在maven源中https://mvnrepository.com/,找到需要下载的jar包地址

命令行执行以下命令,下载jar包到本地仓库中

mvn dependency:get -DremoteRepositories=https://mvnrepository.com/artifact/org.glassfish.web/jstl-impl -DgroupId=org.glassfish.web -DartifactId=jstl-impl -Dversion=1.2


版权声明:本文为lihuayong原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。