maven鎸囧畾settings鏂囦欢濡備綍閰嶇疆
瑕佹寚瀹歁aven浣跨敤鐗瑰畾鐨剆ettings鏂囦欢锛屽彲浠ュ湪鍛戒护琛屼腑浣跨敤-s
鍙傛暟锛屼緥濡傦細
mvn clean install -s /path/to/settings.xml
濡傛灉鎯虫案涔呮€у湴鎸囧畾settings鏂囦欢锛屽彲浠ュ湪Maven鐨?code>conf鐩綍涓垱寤轰竴涓?code>settings.xml鏂囦欢锛屽苟鍦ㄥ叾涓寚瀹氳浣跨敤鐨剆ettings鏂囦欢鐨勮矾寰勶紝渚嬪锛?/p>
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>${user.home}/.m2/repository</localRepository>
<servers>
<!-- server definitions -->
</servers>
<mirrors>
<!-- mirror definitions -->
</mirrors>
<profiles>
<profile>
<id>my-settings</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<maven.settings.file>/path/to/settings.xml</maven.settings.file>
</properties>
</profile>
</profiles>
</settings>
杩欐牱锛孧aven灏变細榛樿浣跨敤鎸囧畾鐨剆ettings鏂囦欢銆?/p>