比如,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>
标签:systemPath,njcanc,basedir,jar,maven,2.12 From: https://www.cnblogs.com/acm-bingzi/p/18034182/mvn_system_path