blob: dcea507b420a9c9f59e5b51e28ef11205610d6e7 [file] [log] [blame]
<!DOCTYPE html>
<!--
| Generated by Apache Maven Doxia Site Renderer 1.8.1
| Rendered using Apache Maven Fluido Skin 1.6
-->
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="Date-Creation-yyyymmdd" content="20170801" />
<meta http-equiv="Content-Language" content="en" />
<title>Archiva &#x2013; Building Archiva</title>
<link rel="stylesheet" href="../css/apache-maven-fluido-1.6.min.css" />
<link rel="stylesheet" href="../css/site.css" />
<link rel="stylesheet" href="../css/print.css" media="print" />
<script type="text/javascript" src="../js/apache-maven-fluido-1.6.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
<!-- Google Analytics -->
<script src='//www.google-analytics.com/analytics.js'></script>
<script>
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', 'UA-140879-5', 'auto');
ga('send', 'pageview');
</script>
</head>
<body class="topBarEnabled">
<a href="https://github.com/apache/archiva">
<img style="position: absolute; top: 0; right: 0; border: 0; z-index: 10000;"
src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png"
alt="Fork me on GitHub">
</a>
<div id="topbar" class="navbar navbar-fixed-top ">
<div class="navbar-inner">
<div class="container"><div class="nav-collapse">
<ul class="nav">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Introduction <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="../index.html" title="About">About</a></li>
<li><a href="../download.html" title="Downloads">Downloads</a></li>
<li><a href="../versions.html" title="Versions">Versions</a></li>
<li><a href="../mailing-lists.html" title="Mailing Lists">Mailing Lists</a></li>
<li><a href="../security.html" title="Security">Security</a></li>
<li class="dropdown-submenu">
<a href="../" title="Documentation">Documentation</a>
<ul class="dropdown-menu">
<li><a href="../docs/2.2.4/" title="Release 2.2.4">Release 2.2.4</a></li>
<li><a href="../docs/3.0.0-SNAPSHOT/" title="Dev 3.0.0-SNAPSHOT">Dev 3.0.0-SNAPSHOT</a></li>
</ul>
</li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Development <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="../developers/building.html" title="Build Apache Archiva">Build Apache Archiva</a></li>
<li><a href="../get-involved.html" title="Get involved">Get involved</a></li>
<li><a href="../developers/how-we-do-things.html" title="How we do things">How we do things</a></li>
<li class="dropdown-submenu">
<a href="../" title="Developer Reference">Developer Reference</a>
<ul class="dropdown-menu">
<li><a href="../ref/2.2.4/index.html" title="Archiva 2.2.4">Archiva 2.2.4</a></li>
<li><a href="../ref/3.0.0-SNAPSHOT/index.html" title="Archiva 3.0.0-SNAPSHOT">Archiva 3.0.0-SNAPSHOT</a></li>
<li><a href="../redback/core/3.0.0-SNAPSHOT/index.html" title="Redback 3.0.0-SNAPSHOT">Redback 3.0.0-SNAPSHOT</a></li>
</ul>
</li>
<li><a href="../redback/index.html" title="Redback">Redback</a></li>
<li><a href="../components/index.html" title="Archiva Components Project">Archiva Components Project</a></li>
<li class="dropdown-submenu">
<a href="../jsui/index.html" title="Javascript application Architecture">Javascript application Architecture</a>
<ul class="dropdown-menu">
<li><a href="../jsui/rest.html" title="Rest service">Rest service</a></li>
<li><a href="../jsui/template-loading.html" title="JS Template loading">JS Template loading</a></li>
<li><a href="../jsui/i18n.html" title="i18n">i18n</a></li>
<li><a href="../jsui/knockout-binding.html" title="Knockout Binding">Knockout Binding</a></li>
<li><a href="../jsui/generics-js.html" title="Generic Javascipts">Generic Javascipts</a></li>
</ul>
</li>
<li><a href="../developers/releasing.html" title="Releasing">Releasing</a></li>
<li><a href="../developers/publishing-site.html" title="Site Publish">Site Publish</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">ASF <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="https://www.apache.org/foundation/how-it-works.html" title="How Apache Works">How Apache Works</a></li>
<li><a href="https://www.apache.org/foundation/" title="Foundation">Foundation</a></li>
<li><a href="https://www.apache.org/foundation/sponsorship.html" title="Sponsoring Apache">Sponsoring Apache</a></li>
<li><a href="https://www.apache.org/foundation/thanks.html" title="Thanks">Thanks</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Project Documentation <b class="caret"></b></a>
<ul class="dropdown-menu">
<li class="dropdown-submenu">
<a href="../project-info.html" title="Project Information">Project Information</a>
<ul class="dropdown-menu">
<li><a href="../ci-management.html" title="CI Management">CI Management</a></li>
<li><a href="../mailing-lists.html" title="Mailing Lists">Mailing Lists</a></li>
<li><a href="../issue-management.html" title="Issue Management">Issue Management</a></li>
<li><a href="../licenses.html" title="Licenses">Licenses</a></li>
<li><a href="../team.html" title="Team">Team</a></li>
<li><a href="../scm.html" title="Source Code Management">Source Code Management</a></li>
</ul>
</li>
</ul>
</li>
</ul>
<form id="search-form" action="https://www.google.com/search" method="get" class="navbar-search pull-right" >
<input value="https://archiva.apache.org/" name="sitesearch" type="hidden"/>
<input class="search-query" name="q" id="query" type="text" />
</form>
<script type="text/javascript">asyncJs( 'https://cse.google.com/brand?form=search-form' )</script>
</div>
</div>
</div>
</div>
<div class="container">
<div id="banner">
<div class="pull-left"><a href="http://archiva.apache.org/index.html" id="bannerLeft"><img src="http://archiva.apache.org/images/archiva.png" alt="Apache Archiva"/></a></div>
<div class="pull-right"><a href="http://www.apache.org/" id="bannerRight"><img src="https://www.apache.org/images/asf_logo_wide_2016.png" alt="Apache Software Foundation"/></a></div>
<div class="clear"><hr/></div>
</div>
<div id="breadcrumbs">
<ul class="breadcrumb">
<li class=""><a href="https://www.apache.org" class="externalLink" title="Apache">Apache</a><span class="divider">/</span></li>
<li class=""><a href="../" title="Archiva">Archiva</a><span class="divider">/</span></li>
<li class="active ">Building Archiva</li>
<li id="publishDate" class="pull-right">Last Published: 18 Apr 2020</li>
</ul>
</div>
<div id="bodyColumn" >
<div class="section">
<h2><a name="Building_Archiva"></a>Building Archiva</h2>
<p>To build the very latest code available... </p>
<ol style="list-style-type: decimal">
<li>Check out the source code as described on the <a href="../source-repository.html">Source Repository</a> page.</li>
<li>You may setup a suitable ~/.m2/settings.xml to add the needed repositories.</li>
<li>In the 'parent' directory, execute <tt>mvn clean install</tt> to build the parent pom. (only needed if we depend on a new parent)</li>
<li>In the 'archiva' directory, execute <tt>mvn clean install</tt> to build the Archiva modules and distribution.</li></ol>
<p>After the build completes, you can find the Archiva distribution in <tt>archiva-jetty/target</tt> and the Archiva webapp in <tt>archiva-modules/archiva-web/archiva-webapp/target</tt></p>
<p>Usually, it's that simple. :) Occasionally, Archiva may depend on a snapshot of another project such as <a class="externalLink" href="http://archiva.apache.org/redback">Redback</a>, and you may need to build that first, or configure a snapshot repository. If you're having trouble building Archiva, ask on the <a href="../mailing-lists.html">Development mailing list</a> and we'll point you in the right direction.</p></div>
<div class="section">
<h2><a name="Merging_Github_Pull_requests"></a>Merging Github Pull requests</h2>
<p>When somebody creates a pull request for archiva on github an email is sent to the developer list.</p>
<p>First review the changes and check for style and impact of the changes. And check the build on the jenkins server for this pull request (archiva-master-build-pr-builder).</p>
<p>We have moved to gitbox, so merging the PR should be done on the github web site by using the PR merge features.</p></div>
<div class="section">
<h2><a name="Documentation"></a>Documentation</h2>
<p>The version-specific documentation for the latest version of Archiva can be found in <tt>archiva/archiva-docs</tt>, and the top-level Archiva website --including the page you're reading now -- is in the <tt>site</tt> directory.</p>
<p>To work on the documentation, execute <tt>mvn site:run</tt> in one of these directories, and then visit <a class="externalLink" href="http://localhost:8080">http://localhost:8080</a> to view pages as you edit them. When you're done, submit a patch in the <a href="../issue-tracking.html">issue tracker</a>.</p></div>
<div class="section">
<h2><a name="git_clone"></a>git clone</h2>
<div class="source"><pre class="prettyprint">git clone git://github.com/apache/archiva.git
or trough https
git clone https://github.com/apache/archiva.git</pre></div></div>
<div class="section">
<h2><a name="Running_Javascript_webapp_with_jetty-maven-plugin"></a>Running Javascript webapp with jetty-maven-plugin</h2>
<p>You can use <a class="externalLink" href="https://www.eclipse.org/jetty/documentation/current/maven-and-jetty.html">jetty-maven-plugin</a> to run the webapp without installing the war in a container. With maven3 in the top directory :</p>
<div class="source"><pre class="prettyprint">mvn jetty:run -pl :archiva-webapp -am # use mvnDebug if you want to attach a debugger
or
sh ./jetty.sh # use sh ./jetty-debug.sh if you want to attach a debugger</pre></div>
<p>Hit your browser: <a class="externalLink" href="http://localhost:9091/archiva/index.html">http://localhost:9091/archiva/index.html</a></p></div>
<div class="section">
<h2><a name="Running_the_selenium_tests_Web_UI_tests_locally"></a>Running the selenium tests (Web UI tests) locally</h2>
<p>The selenium tests use docker containers for the selenium and browser installation. To run the tests locally you should have docker installed on your developer machine. The docker container can be built locally or pulled from the apachearchiva Dockerhub repository. To start the docker container, run the following script:</p>
<div class="source"><pre class="prettyprint"> ./src/ci/scripts/container_webtest.sh start</pre></div>
<p>The UI tests can be run with:</p>
<div class="source"><pre class="prettyprint">mvn clean install -DmaxWaitTimeInMs=2000 -DseleniumRemote=true -Pci-server -Pit-js -Pchrome -pl :archiva-webapp-test</pre></div></div>
<div class="section">
<h2><a name="Maven_settings.xml"></a>Maven settings.xml</h2>
<p>You should setup the following repositories in your settings.xml to be able to resolve the dependencies. Sometimes we need to have certain snapshot versions for plugins, so the apache snapshot repository is added.</p>
<div class="source"><pre class="prettyprint"> &lt;profiles&gt;
&lt;profile&gt;
&lt;activation&gt;
&lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
&lt;/activation&gt;
&lt;repositories&gt;
&lt;repository&gt;
&lt;id&gt;central&lt;/id&gt;
&lt;releases&gt;
&lt;enabled&gt;true&lt;/enabled&gt;
&lt;/releases&gt;
&lt;snapshots&gt;
&lt;enabled&gt;false&lt;/enabled&gt;
&lt;/snapshots&gt;
&lt;url&gt;https://repo1.maven.org/maven2&lt;/url&gt;
&lt;/repository&gt;
&lt;/repositories&gt;
&lt;pluginRepositories&gt;
&lt;pluginRepository&gt;
&lt;id&gt;central&lt;/id&gt;
&lt;releases&gt;
&lt;enabled&gt;true&lt;/enabled&gt;
&lt;/releases&gt;
&lt;snapshots&gt;
&lt;enabled&gt;true&lt;/enabled&gt;
&lt;/snapshots&gt;
&lt;url&gt;https://repo1.maven.org/maven2&lt;/url&gt;
&lt;/pluginRepository&gt;
&lt;pluginRepository&gt;
&lt;id&gt;apache-snapshot&lt;/id&gt;
&lt;releases&gt;
&lt;enabled&gt;false&lt;/enabled&gt;
&lt;/releases&gt;
&lt;snapshots&gt;
&lt;enabled&gt;true&lt;/enabled&gt;
&lt;/snapshots&gt;
&lt;url&gt;https://repository.apache.org/content/groups/snapshots&lt;/url&gt;
&lt;/pluginRepository&gt;
&lt;/pluginRepositories&gt;
&lt;/profile&gt;
&lt;/profiles&gt;</pre></div></div>
</div>
</div>
<hr/>
<footer>
<div class="container">
<div class="row">
<div class="row pull-left">Apache Archiva, Archiva, Apache, the Apache feather logo, and the Apache Archiva project logos are trademarks of The Apache Software Foundation.</div>
<div class="row">
&nbsp;
</div>
<div class="row">
<p>
<a href="https://archiva.apache.org/privacy-policy.html">Privacy Policy</a>
</p>
</div>
</div>
<p id="poweredBy" class="pull-right"> <a href="http://maven.apache.org/" title="Built by Maven" class="poweredBy"><img class="builtBy" alt="Built by Maven" src="../images/logos/maven-feather.png" /></a>
</p>
<div id="ohloh" class="pull-right">
<script type="text/javascript" src="https://www.ohloh.net/p/6670/widgets/project_thin_badge.js"></script>
</div>
</div>
</footer>
</body>
</html>