- Force Repository Update with Maven
https://www.baeldung.com/maven-force-update
- force re-download project dependencies
https://mkyong.com/maven/maven-how-to-force-re-download-project-dependencies/
mvn dependency:purge-local-repository
https://maven.apache.org/plugins/maven-dependency-plugin/examples/purging-local-repository.html
https://maven.apache.org/plugins/maven-dependency-plugin/purge-local-repository-mojo.html
- 특정 library만 re-download
mvn dependency:purge-local-repository -DmanualInclude=GROUP_ID(OR GROUP_ID:ARTIFACT_ID:VERSION,GROUP_ID2:ARTIFACT_ID2:VERSION2) clean package -Pprd
mvn clean package(OR install) -U
-U force update
- maven build 할 때마다 repository 체크하도록 하는 옵션
<repositories>
<repository>
<id>nexus</id>
<name>nexus-public</name>
<url>http://localhost:8081/repository/maven-public/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
- repository server 배포시 releases와 snapshots 배포 설정
<distributionManagement>
<repository>
<id>nexus</id>
<name>nexus-release</name>
<url>http://localhost:8081/repository/maven-releases/</url>
<layout>default</layout>
</repository>
<snapshotRepository>
<id>nexus</id>
<name>nexus-snapshot</name>
<url>http://localhost:8081/repository/maven-snapshots/</url>
<layout>default</layout>
</snapshotRepository>
</distributionManagement>
- 공식문서
https://maven.apache.org/ref/3.9.4/maven-settings/settings.html
-설명
https://recordsoflife.tistory.com/m/1158
'maven' 카테고리의 다른 글
spring boot maven offline build error (0) | 2023.11.21 |
---|---|
Versions Maven Plugin (0) | 2023.10.19 |
maven TroubkeShooting (0) | 2023.09.13 |
A Guide to Maven Artifact Classifiers (0) | 2023.03.05 |
maven 호환성 (0) | 2023.02.26 |