Categories:
CONFIGURATION
Artifact repositories configuration
Artifact repositories configuration
When deploying or executing Automation Packages and their libraries using maven coordinates, the artifacts are retrieved from the configured artifact repositories.
The configuration is based on the standard maven settings.xml format and stored as a Step setting.
Retrieve current maven settings
You can get the current content of the maven settings.xml with following REST call:
GET <controller-url>/rest/settings/maven_settings_default
Modify maven settings
You can invoke following service passing the content of your maven settings.xml file as request payload:
POST <controller-url>/rest/settings/maven_settings_default
Maven settings example
POST /rest/settings/maven_settings_default
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
<profiles>
<profile>
<id>default</id>
<repositories>
<repository>
<id>my-repository</id>
<name>my repository</name>
<url>https://at.home.ch/repository/maven/</url>
</repository>
</repositories>
</profile>
</profiles>
<servers>
<server>
<id>my-repository</id>
<username>myUser</username>
<password>myPassword</password>
</server>
</servers>
<activeProfiles>
<activeProfile>default</activeProfile>
</activeProfiles>
</settings>Maven local cache clean-up
The maven artifact are downloaded first to a local maven cache on the controller before being created as a Step artifact resource. The cache is not clean-up immediately for performance reason, but a clean-up job will take care of this task.
It can be configured with following step.properties
# Change the path of the maven cache folder relative to the controller working directory (default "maven")
repository.artifact.maven.folder=maven
# Change the TTL of artifacts stored in the cache in minutes (default 1440)
repository.artifact.maven.max.age.minutes=1440
# Change the cleanup frequency in minutes (default 60)
repository.artifact.maven.cleanup.frequency.minutes=60