maven使用systemPath方式加载本地jar(代码库)
比如,jar包直接放到根目录
pom.xml 里这么配置
<dependency>
<groupId>njcanc</groupId>
<artifactId>njcanc</artifactId>
<version>2.12</version>
<scope>system</scope>
<systemPath>
${project.basedir}/jar/njcanc-2.12.jar
</systemPath>
</dependency>
打包的时候也要包含一下
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<includeEmptyDirectories>
true
</includeEmptyDirectories>
<webResources>
<resource>
<directory>
${project.basedir}/jar
</directory>
<targetPath>WEB-INF/lib</targetPath>
<filtering>false</filtering>
<includes>
<include>**/*.jar</include>
</includes>
</resource>
</webResources>
</configuration>
</plugin>
把每一件简单的事情做好,就是不简单;把每一件平凡的事情做好,就是不平凡!相信自己,创造奇迹~~