maven引入本地JAR包

具体配置录下: 
Xml代码 
<dependency> 
<groupId>org.apache</groupId> 
<artifactId>test</artifactId> 
<version>1.0</version> 
<scope>system</scope> 
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/paypal_base.jar</systemPath> 
</dependency> 

!更好的方式是配置编译参数<compilerArguments>,添加extdirs将jar包相对路径添加到配置中,如下:

<build>
        <plugins>
            <plugin>
              <artifactId>maven-compiler-plugin</artifactId>
              <configuration>
                  <source>1.6</source>
                  <target>1.6</target>
                  <encoding>UTF-8</encoding>
                  <compilerArguments>
                   <extdirs>src\main\webapp\WEB-INF\lib</extdirs>
                 </compilerArguments>
              </configuration>
            </plugin>
        </plugins>
    </build>

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章