11.5 Configuring a Hosted Repository
Prev | 11. Configuration | Next

## 11.5 Configuring a Hosted Repository

You configure a VTS instance to host a repository by editing the `$SERVER_HOME/config/org.eclipse.virgo.apps.repository.properties` file; remote clients can then access the artifacts in this hosted repository and use them locally.

When you specify a property in the file, use the format `repository-name.property=value`, where:

- `repository-name` refers to the name of the hosted repository.

- `property` refers to the name of a particular property.

- `value` refers to the value of the property.

For example, `my-hosted-repo.type=external` specifies that the `type` property of the `my-hosted-repo` repository is `external`.

The following table lists the properties that you can include in the `org.eclipse.virgo.apps.repository.properties` file.

Table 11.6. Hosted Repository Properties

Property | Description
--- | ---
`repository-name``.type` | Specifies the type of path of the hosted repository. All paths are local to the current VTS instance. You can set this property to one of the following valid values: `external`: Specifies that this path points to a number of directories that satisfy a given search pattern. Use the `searchPattern` property to specify the directory search pattern. `watched`: Specifies that this path points to a single directory. Virgo regularly scans watched repositories so it automatically picks up any changes to the artifacts in the directory at runtime. Use the `watchDirectory` property to specify the actual watched directory and the `watchInterval` property to specify how often VTS checks the directory. See Watched or External Repository? for additional information about when to configure watched or external repositories for your particular environment.
`repository-name``.searchPattern` | Specifies the pattern that an external hosted repository uses when deciding which local directories it should search when identifying artifacts. Use this property when `repository-name.type=external`. See Search Paths: Additional Information for detailed information about specifying a search pattern.
`repository-name``.watchDirectory` | Specifies the single directory of a watched hosted repository. You can specify either an absolute or relative pathname for the directory. If you specify a relative pathname, it is relative to the root of the VTS installation (`$SERVER_HOME`). Use this property when `repository-name.type=watched`.
`repository-name``.watchInterval` | Specifies the interval in seconds between checks of a watched directory by a watched hosted repository. This property is optional. Use this property when `repository-name.type=watched`.

The following sample shows a `org.eclipse.virgo.apps.repository.properties` file with a single external repository called `my-hosted-repo` with search pattern `$SERVER_HOME/repository/hosted/*`.

    my-hosted-repo.type=external
    my-hosted-repo.searchPattern=repository/hosted/*

See Example of watched and remote repositories for details on how a local repository can remotely access the artifacts in this hosted repository.

Prev | Up | Next
11.4 Configuring the Local Provisioning Repository | Home | 11.6 Configuring the Kernel and User Region