• 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>

  • 相关阅读:
    docker 原理之 mount namespace(下)
    docker 原理之 namespace (上)
    十种世界顶级思维方式
    Go 标准库 net
    斐波拉契序列的 Go 实现
    channel 是怎么走上死锁这条路的
    hello world 的并发实现
    使用链表和切片实现栈和队列
    非暴力沟通-读后感
    CCS
  • 原文地址:https://www.cnblogs.com/chenny3/p/10226125.html
Copyright © 2020-2023  润新知