2025年8月21日 星期四

使用 artipie 作為 Maven cache server

編輯 .m2/settings.xml 內容如下
<?xml version="1.0"?>
<settings >
  <mirrors >
    <mirror >
      <id>maven</id >
      <name>Maven Repository Manager running on https://repo.maven.apache.org/maven2 </name >
      <url>http://artipie.loc:8085/maven/ </url >
      <mirrorOf>central</mirrorOf >
    </mirror >
  </mirrors >
</settings >

測試
mvn dependency:get -DgroupId=junit -DartifactId=junit -Dversion=4.13.2 -Dtransitive=false -s ~/.m2/settings.xml -X

沒有留言: