Profile repository is a storage location for shared profiles.
Usage and declaration
Repositories get always loaded first from the remote
location (and can be cached).
If not available in the remote location, those get loaded from the local
location.
Local location must be considered as a working copy.
The optional local_first
attribute permits to ignore the remote location.
This is useful in case of profile manual tuning phase.
Note 1 : like the master profiles, the shared profiles should be maintained in a SCM repository.
Note 2 : remote and local locations are completely independent and can therefore have a distinct content (SCM usage would reduce this risk).
In that sense, the caching of the remote repository is done in a temporary location, NOT in the local repository.
Both remote
and local
can reference either a URL or a system path (like a shared drive path).
<repositories><repository id="base" remote="https://raw.githubusercontent.com/jeyzer-repo/base/master/shared" local="${JEYZER_BASE_SHARED_PROFILES_DIR}"
="false"local_first
/>
...
</repositories>
Repositories get referenced by their id
in the Jeyzer repository URLs :repo://base/@@base-shared-deps@@
Repositories can also be referenced by their id
in the Jeyzer-Repository Manifest attribute of jar files, as part of the automatic loading of profiles.Jeyzer-Repository=demo
Structure
In a repository, the shared profiles – composed of 1 analysis profile file and possibly 1 monitoring file and sticker file – must follow those rules:
- Shared profile must have its own directory
- Naming convention:
- Directory name must be the shared profile name
- Content must be prefixed with the shared profile name
- Optional versioning can introduce a version sub directory level if the profile automatic loading approach is taken.
For example, the Hibernate shared profile will have this file structure :
base/ [Jeyzer base repository root directory] shared/ hibernate/ hibernate_patterns.xml hibernate_rules.xml hibernate_stickers.xml 5.4 [Automatic loading approach - optional] hibernate_patterns.xml
.
Integration
Profile repositories are declared in the Jeyzer setup, along with the caching strategy.
By default the Jeyzer setup is referencing the standard base
repository which contains a representative set of 3rd party shared profiles.
The Jeyzer setup is also enough flexible to declare your own repositories : simply add the path of the directory of your repository declaration file to the JEYZER_EXTERNAL_REPOSITORY_SETUP_DIRECTORY
environment variable (paths are semicolon separated).
Jeyzer will then scan the given directory to load the repository definitions.
In standard the JEYZER_EXTERNAL_REPOSITORY_SETUP_DIRECTORY
is pointing to the profiles/shared-repositories
directory which contains the Jeyzer demo
repository definition and a sample company
repository definition.
Check the following places in your Jeyzer installation for more details:analyzer/config/setup/default_setup.xml
profiles/shared-repositories