引入的本地jar,例如:
<dependency>
<groupId>org.example</groupId>
<artifactId>udpDemo</artifactId>
<scope>system</scope>
<version>1.0-SNAPSHOT</version>
<systemPath>${basedir}/lib/udpDemo-1.0-SNAPSHOT.jar</systemPath>
</dependency>
在pom.xml的
<build>
<plugins>
.....
</plugins>
</build>
...处加入
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webResources>
<resource>
//如果是idea则直接为"lib"
<directory>src/main/resources/lib</directory>
<targetPath>WEB-INF/lib/</targetPath>
<includes>
<include>**/*.jar</include>
</includes>
</resource>
</webResources>
</configuration>
</plugin>
然后Maven->Lifecycle->install即可