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>

posted @ 2017-10-07 23:13  键盘手小陈  阅读(662)  评论(0编辑  收藏  举报