<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>

CC BY-SA 4.0
2019-01-24T17:50:53.340Z
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).
JBaruch
CC BY-SA 4.0
2019-01-24T16:12:37.003Z
2019-01-24T16:12:37.003Z
JBaruch
<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>

<maven><artifactory>
M2 Repo contents is not available in artifactory server
Vivek
# 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?

    
        central
        wellow.jrp.com
        http://wellow.jrp.com:8081/artifactory/wellows/

**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  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 .

> **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).  

---

