aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-docs/src/site/apt/adminguide/configuration-files.apt.vm
blob: 22f17dc162f2c06bdffbdb590b470137c5ac167c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
 ------
 Configuration Files of Apache Archiva
 ------
 ------
 2012-11-24
 ------

~~ 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.                                                              

Configuration Files of Apache Archiva

  While Archiva is primarily configured via the graphical administration interface, it stores all configuration in XML configuration
  files that can be hand edited and used for backup and migration.

  The following files compose the configuration for Archiva:

    * <<<archiva.xml>>> - this is the primary Archiva configuration file

    * <<<security.properties>>> - This file, if it exists, is only read once to populate the
         Redback Runtime Configuration properties (see {{{./redback-runtime-configuration.html#Runtime_Properties}Redback Runtime Configuration}},
         stored in <<<archiva.xml>>>. The file will be ignored after this.

  This section will focus on the <<<archiva.xml>>> file.

* The Archiva configuration file

  The Archiva configuration file is stored in one of two locations:

    * The application server configuration directory (see {{{./standalone.html} installing Archiva standalone}} for more information)

    * The user home directory (<<<~/.m2/archiva.xml>>>). 

    []

  When modified in the GUI, the file is written back to the location it was initially read from, with the home directory taking priority if both exist. When using a
  standalone installation, it is highly recommended that a configuration file is only maintained in one of the locations.

  For a complete reference of the configuration file see: {{{http://archiva.apache.org/ref/${project.version}/archiva-base/archiva-configuration/configuration.html}Reference}}

  The following shows a basic configuration file:

+----+
<configuration>
  <version>2</version>
  <managedRepositories>
    <managedRepository>
      <location>${appserver.base}/repositories/internal</location>
      <daysOlder>30</daysOlder>
      <id>internal</id>
      <name>Archiva Managed Internal Repository</name>
    </managedRepository>
  </managedRepositories>
  <remoteRepositories>
    <remoteRepository>
      <url>http://repo1.maven.org/maven2</url>
      <id>central</id>
      <name>Central Repository</name>
    </remoteRepository>
  </remoteRepositories>
  <proxyConnectors>
    <proxyConnector>
      <sourceRepoId>internal</sourceRepoId>
      <targetRepoId>central</targetRepoId>
      <policies>
        <releases>always</releases>
        <checksum>fix</checksum>
        <snapshots>never</snapshots>
        <cache-failures>no</cache-failures>
      </policies>
    </proxyConnector>
  </proxyConnectors>
</configuration>
+----+

  ~~TODO: need a full reference