Maven Configuration about Username and Password

Maven Configuration about Username and Password

Put the resposity in our parent base pom project in pom.xml:
    <repositories>
        <repository>
            <id>company_repository</id>
            <name>Maven Release Repository</name>
            <url>http://server.com/artifactory/remote-repos/</url>
        </repository>
</repositories>

Put the username and password here in settings.xml

<?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <servers>
    <server>
      <username>username</username>
      <password>password</password>
      <id>company_repository</id>
    </server>
  </servers>
</settings>



references:


猜你喜欢

转载自sillycat.iteye.com/blog/1592967
今日推荐