cmd mvn快捷下载jar

1、新建bat文件,添加以下内容
call mvn -f pom.xml dependency:copy-dependencies
@pause

2、创建pom.xml文件

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.companny.maven</groupId>
  <artifactId>hello</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <!-- 添加依赖 -->
  <dependencies>
   <dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>4.12</version>
    <scope>test</scope>
   </dependency>
   
   <dependency>
            <groupId>org.apache.hive</groupId>
            <artifactId>hive-jdbc</artifactId>
            <version>3.1.3</version>
        </dependency>
  </dependencies>
</project>

3、D:\mvn\target\dependency    #保存路径

4、执行bat文件,查看下载

 

posted @ 2024-01-19 14:46  The-End-Ronin  阅读(33)  评论(0编辑  收藏  举报