title: How can I set up my maven setting.xml through my code(pom.xml) or command prompt
body: <p>Actually, I'm executing my maven code on a different remote machine. My Java code depends upon some of the customs dependencies which are downloading from jFrog artifactory.
  I can't set up my user-name and password on every machine. Is there any way we can do it through code i.e pom.xml or cmd.
  Ex:setting.xml </p>
  
  <pre><code>&lt;settings&gt;
      &lt;servers&gt;
          &lt;server&gt;&lt;id&gt;central&lt;/id&gt;&lt;username&gt;USER_NAME&lt;/username&gt;&lt;password&gt;$USER_PWD&lt;/password&gt;&lt;/server&gt;
          &lt;server&gt;&lt;id&gt;snapshot&lt;/id&gt;&lt;username&gt;USER_NAME&lt;/username&gt;&lt;password&gt;$USER_PWD&lt;/password&gt;&lt;/server&gt;
      &lt;/servers&gt;    
  &lt;/settings&gt;
  </code></pre>