Comment on page
Configure an agent with strict recipe sources
The Moderne SaaS is configured to use the following Maven repositories to load recipe artifacts from in the event the agent has not been configured with any recipe sources or if a recipe artifact cannot be sourced from what is configured. (Requires agent version
0.118.0
or greater)<repository>
<id>maven-central-explicit</id>
<url>https://repo1.maven.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
<repository>
<id>oss-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</repository>
<repository>
<id>artifact-registry</id>
<url>https://us-west1-maven.pkg.dev/moderne-dev/moderne-recipe</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>jitpack</id>
<url>https://jitpack.io</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
This fallback behavior can be disabled using recipe configuration. If any agent is configured with this setting then recipes will only be sourced by what the agent defines.
OCI Container
Executable JAR
Variables:
MODERNE_AGENT_RECIPE_USEONLYCONFIGURED
– Only use the recipe sources configured in the agent.MODERNE_AGENT_RECIPE_POMCACHE_TYPE
– (Optional) Used to specify what type of cache the POM should use. Acceptable values:IN_MEMORY
orREDIS
.MODERNE_AGENT_RECIPE_POMCACHE_ENTRYTTLMINUTES
– (Optional) How long entries should live in the POM cache.MODERNE_AGENT_RECIPE_POMCACHE_REDIS_HOST
– (Required if the POM cache type is set toREDIS
, Optional otherwise) The URL of the Redis instance.MODERNE_AGENT_RECIPE_POMCACHE_REDIS_PORT
– (Required if the POM cache type is set toREDIS
, Optional otherwise) The port number of the Redis instance.MODERNE_AGENT_RECIPE_POMCACHE_REDIS_USERNAME
– (Optional) The username needed to authenticate to the Redis instance.MODERNE_AGENT_RECIPE_POMCACHE_REDIS_PASSWORD
– (Optional) The password needed to authenticate with the Redis instance.MODERNE_AGENT_RECIPE_POMCACHE_REDIS_SSL
– (Optional) If set totrue
, then SSL will be enabled for the connection to the Redis instance. Defaults tofalse
.MODERNE_AGENT_RECIPE_POMCACHE_REDIS_DATABASE
– (Optional) The Redis DB index.
Example:
docker run \
# ... Existing variables
-e MODERNE_AGENT_RECIPE_USEONLYCONFIGURED=true \
# ... Additional variables
Arguments:
--moderne.agent.recipe.useOnlyConfigured
– Only use the recipe sources configured in the agent.--moderne.agent.recipe.pomCache.type
– (Optional) Used to specify what type of cache the POM should use. Acceptable values:IN_MEMORY
orREDIS
.--moderne.agent.recipe.pomCache.entryTtlMinutes
– (Optional) How long entries should live in the POM cache.--moderne.agent.recipe.pomCache.redis.host
– (Required if the POM cache type is set toREDIS
, Optional otherwise) The URL of the Redis instance.--moderne.agent.recipe.pomCache.redis.port
– (Required if the POM cache type is set toREDIS
, Optional otherwise) The port number of the Redis instance.--moderne.agent.recipe.pomCache.redis.username
– (Optional) The username needed to authenticate to the Redis instance.--moderne.agent.recipe.pomCache.redis.password
– (Optional) The password needed to authenticate with the Redis instance.--moderne.agent.recipe.pomCache.redis.ssl
– (Optional) If set totrue
, then SSL will be enabled for the connection to the Redis instance. Defaults tofalse
.--moderne.agent.recipe.pomCache.redis.database
– (Optional) The Redis DB index.
Example:
java -jar moderne-agent-{version}.jar \
# ... Existing arguments
--moderne.agent.recipe.useOnlyConfigured=true \
# ... Additional arguments