------ Staging Repositories ------ ~~ 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. Staging Repositories Starting with Archiva 1.4, staging repositories are supported. A staging repository is a repository you use to stage a release (while it undergoes testing and voting), before the release is officially announced and published to a releases repository where users can obtain it. With the support of staging repositories comes the ability to merge repositories from the web UI. By merging, we mean promoting the artifacts in the staging repository to the managed repository. In the current implementation, a user with the System Administrator role can create and attach a staging repository to an existing managed repository. An attached staging repository is a shadow of its managed repository, meaning they have the same configuration. We append <<-stage>> to the managed repository's ID to identify its staging repository. For example, repository <<>> would have a staging repository called <<>>. If you're creating a new managed repository, just tick the <<>> check box. Otherwise, if you already have an existing managed repository and you want to create a staging repository, just edit the managed repository's configuration and tick the <<>> checkbox, then save the configuration. A staging repository directory will be created beside (as a sibling of) the managed repository directory, again with -stage appended to the name. <<>> By un-ticking the <<>> checkbox, the user can delete the attached staging repository. If the managed repository is deleted, then its attached staging repository is also deleted. The default <<>> and <<>> repositories do not have staging repositories configured by default, however they can be added by editing the repository configuration. * Populating the Staging Repository The staging repository can be populated in the same way as a normal managed repository. You can configure your Maven build's <<>> section to deploy to the repository, or use Archiva's web-based upload feature. * Merging Repositories To merge or promote the artifacts in a staging repository to the managed repository, just click the <<>> button in the repositories configuration page. [../images/repository-merge.png] Merge Button You will be able to select which target repository to use for merging [../images/repository-merge-select-target.png] Archiva will check for conflicting artifacts between the two repositories, and list them (if it finds conflicts). The user will be asked to choose between two actions: [[1]] <<>> - ignore all conflicting artifacts and perform merging for all. [[2]] <<>> - skip all conflicting artifacts and merge only the non-conflicting ones. [] [../images/conflicting-artifacts.png] Merge Actions In future, we plan to enhance this by allowing a user to select only specific artifacts to merge.