• Maven项目导入本地Jar包


    在WEB-INT里面加入了lib文件夹,把我的jar包放在文件夹里。并且在pom.xml里面加入了以下语句:

    1

    2

    3

    4

    5

    6

    7

    8

    <!--  阿里大于JAR-->

         <dependency>

             <groupId>my-jar</groupId>   <!--  自己随便取-->

             <artifactId>my-jar</artifactId<!-- 自己随便取-->

             <version>1.0</version><!-- 自己随便取-->

             <scope>system</scope>

             <systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/taobao-sdk-java-auto_1455552377940-20160607.jar</systemPath>

         </dependency>

     

    1

    2

    3

    4

    5

    6

    7

    8

    9

    10

    11

    12

    13

    14

    15

    16

    17

    18

    19

    20

    <!-- 本地仓添加 插件 -->

               <plugin>

                   <groupId>org.apache.maven.plugins</groupId>

                   <artifactId>maven-shade-plugin</artifactId>

                   <executions>

                       <execution>

                           <id>make-assembly</id>

                           <phase>package</phase>

                           <goals>

                               <goal>shade</goal>

                           </goals>

                           <configuration>

                               <descriptorRefs>

                                   <descriptorRef>jar-with-dependencies</descriptorRef>

                               </descriptorRefs>

                               <finalName>xxx-jar-with-dependencies</finalName>

                           </configuration>

                       </execution>

                   </executions>

               </plugin>

  • 相关阅读:
    洛谷 P2421 [NOI2002]荒岛野人
    POJ 2115 C Looooops
    POJ 3292 Semi-prime H-numbers
    [网络流24题]负载平衡问题(费用流)
    [网络流24题]骑士共存问题
    POJ 3281 Dining
    洛谷 1306斐波那契公约数
    ELK+Filebeat 安装配置入门
    一个JS内存泄露实例分析
    Node.js 事件循环
  • 原文地址:https://www.cnblogs.com/chenny3/p/10226125.html
Copyright © 2020-2023  润新知