方案一,清maven缓存
windows系统
cd %userprofile%\.m2\repository
for /r %i in (*.lastUpdated) do del %i
linux系统
find /app/maven/localRepository -name "*.lastUpdated" -exec grep -q "Could not transfer" {} \; -print -exec rm {} \;
setting设置每次更新缓存
<repository>
<id>central</id>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
打包更新
mvn -U clean package -Dmaven.test.skip=true
方案二,lib放jar包
<dependency>
<groupId>abc</groupId>
<artifactId>abc</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/webapp/WEB-INF/lib/abc.jar</systemPath>
</dependency>