Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Though possible, personally I do <strong>not</strong> think that it is a good practice to do that. Depending on your usage this post will be helpful: <a href="http://blog.sonatype.com/people/2009/02/why-putting-repositories-in-your-poms-is-a-bad-idea" rel="nofollow noreferrer">http://blog.sonatype.com/people/2009/02/why-putting-repositories-in-your-poms-is-a-bad-idea</a>. You also want a reproducible and portable project, <a href="https://stackoverflow.com/questions/2225535/where-is-the-best-place-to-specify-maven-repositories-pom-xml-or-settings-xml">this question</a> discusses this related topic. Please don't check in those jars into your VCS just for portability sake!</p> <p>I will try to help if you still insist. To make your model to work, your "repo folder" must follow the structure defined <a href="http://maven.apache.org/pom.html#Repositories" rel="nofollow noreferrer">here</a>.</p> <p>Even though your "repo folder" is a local file structure, Maven will still treat it as if it is a remote repository, just like maven central. This means, whenever you are building your project, Maven will try to download the jars from your "repo folder" to your .m2 repository too:</p> <blockquote> <p>Downloading: file:/j/my-project/my-local-repo/com/google/guava/guava/14.0.1/guava-14.0.1.pom<br> Downloaded: file:/j/my-project/my-local-repo/com/google/guava/guava/14.0.1/guava-14.0.1.pom (6 KB at 276.3 KB/sec)<br> Downloading: <a href="http://repo.maven.apache.org/maven2/com/google/google/1/google-1.pom" rel="nofollow noreferrer">http://repo.maven.apache.org/maven2/com/google/google/1/google-1.pom</a><br> Downloaded: <a href="http://repo.maven.apache.org/maven2/com/google/google/1/google-1.pom" rel="nofollow noreferrer">http://repo.maven.apache.org/maven2/com/google/google/1/google-1.pom</a> (2 KB at 10.4 KB/sec)</p> </blockquote> <p>You can see that the guava jar will be <code>downloaded</code> from the "repo folder" to my .m2 repository since it is available from my "repo folder".</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload