关于maven配置未生效

1mavensetting.xml配置文件

 

    <mirror>

      <id>fsc-central</id>

      <mirrorOf>external:*</mirrorOf>

      <name>jin ke zhong yang ku</name>

      <url>https://nexus.xxx.com/repository/maven-public/</url>

    </mirror>

 

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

配置文件正常生效

 

 

posted @ 2022-02-21 14:56  0胡桃夹子0  阅读(407)  评论(0编辑  收藏  举报