| ----- |
| Building Archiva |
| ----- |
| ----- |
| 2017-08-01 |
| ----- |
| |
| ~~ Licensed to the Apache Software Foundation (ASF) under one |
| ~~ or more contributor license agreements. See the NOTICE file |
| ~~ distributed with this work for additional information |
| ~~ regarding copyright ownership. The ASF licenses this file |
| ~~ to you under the Apache License, Version 2.0 (the |
| ~~ "License"); you may not use this file except in compliance |
| ~~ with the License. You may obtain a copy of the License at |
| ~~ |
| ~~ http://www.apache.org/licenses/LICENSE-2.0 |
| ~~ |
| ~~ Unless required by applicable law or agreed to in writing, |
| ~~ software distributed under the License is distributed on an |
| ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| ~~ KIND, either express or implied. See the License for the |
| ~~ specific language governing permissions and limitations |
| ~~ under the License. |
| |
| ~~ NOTE: For help with the syntax of this file, see: |
| ~~ http://maven.apache.org/guides/mini/guide-apt-format.html |
| |
| Building Archiva |
| |
| To build the very latest code available... |
| |
| [[1]] Check out the source code as described on the {{{../source-repository.html}Source Repository}} page. |
| |
| [[2]] In the 'parent' directory, execute <<<mvn clean install>>> to build the parent pom. (only needed if we depend on a new parent) |
| |
| [[3]] In the 'archiva' directory, execute <<<mvn clean install>>> to build the Archiva modules and distribution. |
| |
| [] |
| |
| After the build completes, you can find the Archiva distribution in <<<archiva-jetty/target>>> and the Archiva |
| webapp in <<<archiva-modules/archiva-web/archiva-webapp/target>>> |
| |
| |
| Usually, it's that simple. :) Occasionally, Archiva may depend on a snapshot of another project such as |
| {{{http://archiva.apache.org/redback}Redback}}, and you may need to build that first, or configure a snapshot repository. |
| If you're having trouble building Archiva, ask on the {{{../mailing-lists.html}Development mailing list}} and we'll point |
| you in the right direction. |
| |
| Merging Github Pull requests |
| |
| When somebody creates a pull request for archiva on github an email is sent to the developer list. |
| |
| 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). |
| |
| We have moved to gitbox, so merging the PR should be done on the github web site by using the PR merge features. |
| |
| Documentation |
| |
| The version-specific documentation for the latest version of Archiva can be found in <<<archiva/archiva-docs>>>, |
| and the top-level Archiva website --including the page you're reading now -- is in the <<<site>>> directory. |
| |
| To work on the documentation, execute <<<mvn site:run>>> in one of these directories, and then visit |
| {{http://localhost:8080}} to view pages as you edit them. When you're done, submit a patch in the |
| {{{../issue-tracking.html}issue tracker}}. |
| |
| |
| git clone |
| |
| +-- |
| git clone git://github.com/apache/archiva.git |
| or trough https |
| git clone https://github.com/apache/archiva.git |
| +-- |
| |
| Running Javascript webapp with jetty-maven-plugin |
| |
| You can use {{{https://www.eclipse.org/jetty/documentation/current/maven-and-jetty.html}jetty-maven-plugin}} to run the webapp without installing |
| the war in a container. |
| With maven3 in the top directory : |
| |
| +-- |
| 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 |
| +-- |
| |
| Hit your browser: {{http://localhost:9091/archiva/index.html}} |
| |
| Running the selenium tests (Web UI tests) locally |
| |
| 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: |
| |
| +-- |
| ./src/ci/scripts/container_webtest.sh start |
| +-- |
| |
| The UI tests can be run with: |
| |
| +-- |
| mvn clean install -DmaxWaitTimeInMs=2000 -DseleniumRemote=true -Pci-server -Pit-js -Pchrome -pl :archiva-webapp-test |
| +-- |
| |