Skip to content
Skip to breadcrumbs
Skip to header menu
Skip to action menu
Skip to quick search
Quick Search
Browse
Pages
Blog
Labels
Attachments
Mail
Advanced
What’s New
Space Directory
Feed Builder
Keyboard Shortcuts
Confluence Gadgets
Log In
Dashboard
Maven User
Copy Page
You are not logged in. Any changes you make will be marked as
anonymous
. You may want to
Log In
if you already have an account. You can also
Sign Up
for a new account.
This page is being edited by
.
Paragraph
Paragraph
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Preformatted
Quote
Bold
Italic
Underline
More colours
Strikethrough
Subscript
Superscript
Monospace
Clear Formatting
Bullet list
Numbered list
Outdent
Indent
Align left
Align center
Align right
Link
Table
Insert
Insert Content
Image
Link
Attachment
Symbol
Emoticon
Wiki Markup
Horizontal rule
tinymce.confluence.insert_menu.macro_desc
Info
JIRA Issue
Status
Gallery
Tasklist
Table of Contents
Other Macros
Page Layout
No Layout
Two column (simple)
Two column (simple, left sidebar)
Two column (simple, right sidebar)
Three column (simple)
Two column
Two column (left sidebar)
Two column (right sidebar)
Three column
Three column (left and right sidebars)
Undo
Redo
Find/Replace
Keyboard Shortcuts Help
<h1>Overview</h1> <p>In a corporate environment it makes sense to have some control over the setup of Maven.<br /> For example:</p> <ul> <li>restricting dependencies to approved versions of artifacts</li> <li>reducing network bandwidth by having a maven repository proxied</li> <li>sharing corporate assets by deploying them centrally</li> </ul> <p>These scenarios can be realized by using internal Maven repositories and a Maven proxy. Be very careful not to confuse these two concepts as both services are often located on the same physical machine and it is easy to get them mixed up.</p> <p>This guide will recommend installing both the Maven internal repositories and the Maven proxy on a single machine and to make this guide a bit more readable this machine will be called NUCLEUS.</p> <p>To get an overview of repositories please read <a href="http://maven.apache.org/guides/introduction/introduction-to-repositories.html">http://maven.apache.org/guides/introduction/introduction-to-repositories.html</a></p> <p>For another example of repository setup with diagrams showing this configuration see <a href="http://cvs.peopleware.be/training/maven/maven2/repositories.html">http://cvs.peopleware.be/training/maven/maven2/repositories.html</a></p> <h2>Definitions of Repositories</h2> <p>A repository holds Maven artifacts in a well defined directory structure.</p> <p>The purpose of the repository influences the types of resources that are stored in that repository.</p> <p>The following list attempts to define the different terms used when discussing different repository types.</p> <h3>local repository</h3> <p>The directory structure on your local machine which stores all the artifacts required by all the projects on your system.</p> <p>It is a cache of artifacts from remote repositories for any mvn command you have run.</p> <h3>remote repository</h3> <p>A remote repository is where the user may get artifacts from. A remote repository can be located anywhere and accessed by any protocol supported by Wagon (ftp/scp/http/file/...)</p> <h3>intranet repository</h3> <p>A remote repository inside your firewall, i.e. a repository not on your machine but in the confines of your organization.</p> <p>You might have internal release/snapshot repositories as well.</p> <h3>private repository</h3> <p>Same as <a class="confluence-link" href="#internal repository" data-anchor="internal repository" data-linked-resource-default-alias="internal repository" data-base-url="http://docs.codehaus.org">#internal repository</a>.</p> <h3>central repository</h3> <p>A special remote repository which is situated at []<a href="http://repo1.maven.org/maven2">http://repo1.maven.org/maven2</a>.</p> <p>This remote repository is where most open source software artifacts are located.</p> <h3>release repository</h3> <p>A release repository is a remote repository specifically for housing released code.</p> <p>No snapshots should be stored in this repository.</p> <h3>snapshot repository</h3> <p>A snapshot repository is a remote repository specifically for housing non-release code as snapshots should not be stored with released artifacts.</p> <h1>Creating the repositories</h1> <p>See <a class="confluence-link" href="/display/MAVENUSER/Creating+the+repositories" data-linked-resource-id="46177" data-linked-resource-type="page" data-linked-resource-default-alias="Creating the repositories" data-base-url="http://docs.codehaus.org">Creating the repositories</a></p> <h1>Creating a Maven proxy</h1> <p>See</p> <ul> <li><a class="confluence-link" href="/pages/viewpage.action?pageId=46175" data-linked-resource-id="46175" data-linked-resource-type="page" data-linked-resource-default-alias="Creating a Maven proxy (mvnproxy)" data-base-url="http://docs.codehaus.org">Creating a Maven proxy (mvnproxy)</a></li> <li><a class="confluence-link" href="/pages/viewpage.action?pageId=3867039" data-linked-resource-id="3867039" data-linked-resource-type="page" data-linked-resource-default-alias="Creating a Maven proxy (artifactory)" data-base-url="http://docs.codehaus.org">Creating a Maven proxy (artifactory)</a></li> </ul> <h2>Maven Proxy Choices</h2> <p>In no particular order:</p> <p>maven-proxy <a href="http://maven-proxy.codehaus.org/">http://maven-proxy.codehaus.org/</a> (outdated and no longer actively worked on)</p> <p>Nexus <a href="http://nexus.sonatype.org">http://nexus.sonatype.org</a> is the successor of the popular Proximity repository manager. Nexus is completely configurable with a extJS UI and has a very lightweight footprint but is very scalable. Nexus is able to generate indexes on the fly that are consumable by The M2Eclipse plugin (<a href="http://m2eclipse.sonatype.org">http://m2eclipse.sonatype.org</a>). The Nexus Maven repository manager comes with professionally written documentation as a chapter in the new <a href="http://www.sonatype.com/book/reference/repository-manager.html#">Sonatype Book</a></p> <p>Artifactory <a href="http://artifactory.sf.net">http://artifactory.sf.net</a> is an enterprise proxy and repository manager, that is a complete rewrite of maven-proxy. Artifactory runs out-of-the-box on a lightweight Jetty server and can also be deployed on a standard servlet container as a WAR file. It offers advanced proxying, caching and security facilities and a robust Ajax-based artifacts management platform. Documentation and full feature list are available <a href="http://www.jfrog.org/confluence/display/RTF">here</a>.</p> <p>Though not yet released, Maven Archiva also provides proxy support. It is available at <a href="http://maven.apache.org/archiva/">http://maven.apache.org/archiva/</a>.</p> <p>Another project which only offers a proxy (with very limited support to simulate a company repository server) is DSMP (Dead Simple Maven Proxy) at <a href="http://www.pdark.de/dsmp/">http://www.pdark.de/dsmp/</a>. It's means to simplify the handling of Maven mirrors, inject patches for buggy/broken releases on the official sites and to allow aggregate several sites in a controlled way (for example, you can specify rules to allow to use specific SNAPSHOT versions for a single plugin without polluting your local or company repository with SNAPSHOT's).</p> <p>If you need to have a proxy and still share your artifacts with other people in your team/company, install Proximity, Artifactory or Archiva as a site wide repository server and DSMP to connect Maven with the Internet.</p> <h1>Continuous Integration</h1> <p>See <a class="confluence-link" href="/display/MAVENUSER/Continuous+Integration" data-linked-resource-id="46172" data-linked-resource-type="page" data-linked-resource-default-alias="Continuous Integration" data-base-url="http://docs.codehaus.org">Continuous Integration</a></p>
Please type the word appearing in the picture.
Attachments
Labels
Location
Watch this page
< Edit
Preview >
Loading…
Save
Cancel
Next hint
search
attachments
weblink
advanced