Adding maven nexus repo to my pom.xml

前端 未结 6 1185
死守一世寂寞
死守一世寂寞 2020-12-08 00:30

I have installed nexus on my local machine. I want my pom file to point to this repo. How can I add my custom repository to my pom.xml file?

6条回答
  •  我在风中等你
    2020-12-08 01:11

    From maven setting reference, you can not put your username/password in a pom.xml

    The repositories for download and deployment are defined by the repositories and distributionManagement elements of the POM. However, certain settings such as username and password should not be distributed along with the pom.xml. This type of information should exist on the build server in the settings.xml.

    You can first add a repository in your pom and then add the username/password in the $MAVEN_HOME/conf/settings.xml:

      
        
            my-internal-site
            yourUsername
            yourPassword
        
      
    

提交回复
热议问题