Answers: <p>Welcome, Vivek </p>
  
  <p>This is not how it works </p>
  
  <p>Your local cache (<code>~/.m2</code>) is not transferred to Artifactory if anything the direction is the other way around (in some point of time you'll see files from Artifactory appear in your local cache).</p>
  
  <p>When you run a Maven build, the configuration you provided in Maven (check the Set Me Up button in Artifactory UI) will make Maven searching for dependencies in the following order:</p>
  
  <ul>
  <li>Local cache (<code>~./m2</code>)</li>
  <li>Artifactory (first local, then remote caches)</li>
  <li>If Artifactory won't find the artifact, whenever <code>willows-remote</code> is pointing to.</li>
  </ul>
  
  <p>After the artifact is found, it will be saved in Artifactory cache and in a local cache on your machine.</p>
  
  <p>The <code>&lt;distributionManagement&gt;</code> tag you used in your <code>pom.xml</code> is for deploying the artifacts you created when you run a <code>mvn deploy</code> command. It will take the artifact produced (one file, not your entire <code>~/.m2</code> cache) and upload it to the repo specified in <code>&lt;distributionManagement&gt;</code>.</p>
  
Answers: CC BY-SA 4.0
Answers: 2019-01-24T17:50:53.340Z
Answers: It's a different question (and maybe you should ask it as a separate question), but the answer is import it using the ["import" functionality](https://www.jfrog.com/confluence/display/RTF/Importing+and+Exporting#ImportingandExporting-RepositoriesImportandExport).
Answers: JBaruch
Answers: CC BY-SA 4.0
Answers: 2019-01-24T16:12:37.003Z
Answers: 2019-01-24T16:12:37.003Z
Answers: JBaruch
Body: <p>We have recently installed artifactory OSS 6.2.0 and then created the following repositories (with Package Type - Maven).</p>
  
  <pre><code>Local
   - wellows
  Remote
   - wellows-remote
  Virtual
   - wellows-virtual
  </code></pre>
  
  <p>And in Virtual Repositories (wellows-virtual), I have included the remote repository which is 'wellows-remote'. I have a maven project and in the distribution tag, I have the following added and as part of the build now the artifacts gets published to the artifactory server. However, I couldn't see my .m2 repository contents anywhere in the Artifactory server. Why so? Am I missing out any configuration here?</p>
  
  <pre><code>&lt;distributionManagement&gt;
      &lt;repository&gt;
          &lt;id&gt;central&lt;/id&gt;
          &lt;name&gt;wellow.jrp.com&lt;/name&gt;
          &lt;url&gt;http://wellow.jrp.com:8081/artifactory/wellows/&lt;/url&gt;
      &lt;/repository&gt;
  &lt;/distributionManagement&gt;
  </code></pre>
  
Tags: <maven><artifactory>
Title: M2 Repo contents is not available in artifactory server
UserDisplayName: Vivek
ThreadText: # M2 Repo contents is not available in artifactory server
  
  (Asked by: username_0 on 2019-01-24)
  
  We have recently installed artifactory OSS 6.2.0 and then created the following repositories (with Package Type - Maven).
  
  ```
  Local
   - wellows
  Remote
   - wellows-remote
  Virtual
   - wellows-virtual
  
  ```
  
  And in Virtual Repositories (wellows-virtual), I have included the remote repository which is 'wellows-remote'. I have a maven project and in the distribution tag, I have the following added and as part of the build now the artifacts gets published to the artifactory server. However, I couldn't see my .m2 repository contents anywhere in the Artifactory server. Why so? Am I missing out any configuration here?
  
  ```
  <distributionManagement>
      <repository>
          <id>central</id>
          <name>wellow.jrp.com</name>
          <url>http://wellow.jrp.com:8081/artifactory/wellows/</url>
      </repository>
  </distributionManagement>
  
  ```
  
  **Tags:** maven, artifactory
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-01-24. Score: 2 | Accepted answer
  
  Welcome, username_0
  
  This is not how it works
  
  Your local cache (`~/.m2`) is not transferred to Artifactory if anything the direction is the other way around (in some point of time you'll see files from Artifactory appear in your local cache).
  
  When you run a Maven build, the configuration you provided in Maven (check the Set Me Up button in Artifactory UI) will make Maven searching for dependencies in the following order:
  
  * Local cache (`~./m2`)
  * Artifactory (first local, then remote caches)
  * If Artifactory won't find the artifact, whenever `willows-remote` is pointing to.
  
  After the artifact is found, it will be saved in Artifactory cache and in a local cache on your machine.
  
  The `<distributionManagement>` tag you used in your `pom.xml` is for deploying the artifacts you created when you run a `mvn deploy` command. It will take the artifact produced (one file, not your entire `~/.m2` cache) and upload it to the repo specified in `<distributionManagement>`.
  
  > **Comments:**
  > **username_1**: It's a different question (and maybe you should ask it as a separate question), but the answer is import it using the ["import" functionality](https://www.jfrog.com/confluence/display/RTF/Importing+and+Exporting#ImportingandExporting-RepositoriesImportandExport).  
  
  ---
  
  