关于maven配置未生效


1mavensetting.xml配置文件

    

      fsc-central

      external:*

      jin ke zhong yang ku

      https://nexus.xxx.com/repository/maven-public/

    

2、root用户下执行

tools/apache-maven-3.6.0/bin/mvn help:effective-settings

发现配置文件是生效的

3、weblogic用户下执行

/tpsys/tools/apache-maven-3.6.0/bin/mvn help:effective-settings

发现配置并未生效

4、在网上查阅资料后发现weblogic下生效的配置文件为/home/weblogic/.m2/settings.xml

将该配置文件移除或者将/tpsys/tools/apache-maven-3.6.0/conf/settings.xml拷贝过来

执行/tpsys/tools/apache-maven-3.6.0/bin/mvn help:effective-settings

配置文件正常生效