settings.moxie

The settings.moxie file is used to control Moxie's behavior across all builds.

Proxies

Moxie automatically uses all proxy definitions from your local Maven settings (~/.m2/settings.xml). Moxie also supports proxy definitions in it's own local Moxie settings (~/.moxie/settings.moxie).

Unlike Maven, which assumes you will proxy everything and requires you to manually exclude hostnames (i.e. opt-out), Moxie supports opt-in proxy definitions which allows you to specify what repositories will be proxied by a proxy definition. If this is undesirable, Moxie also supports Maven-style opt-out proxy definitions too.

If you want to define proxy settings, copy and edit one of the following example proxy definitions to a new text file: ~/.moxie/settings.moxie

Example standard network proxy configuration

All repositories are proxied through this connection.

proxies:
- {
    id: 'myproxy'
    active: true
    protocol: 'http'
    host: 'proxy.somewhere.com'
    port: 8080
    username: 'proxyuser'
    password: 'somepassword'
  }

Example Moxie Proxy configuration

Only the identified repositories are proxied through this connection.

proxies:
- {
    id: 'moxieProxy'
    active: true
    protocol: 'http'
    host: 'moxie.somewhere.com'
    port: 8081
    username: 'proxyuser'
    password: 'somepassword'
    repositories: "central, mavencentral, restlet, codehaus, sonatype-oss"
  }


Registered Repositories

This section is used to define remote artifact repositories. Currently only http/https repositories are supported.

The default connectTimeout is 20 seconds.
The default readTimeout is 1800 seconds (30 mins).

registeredRepositories:
- { id: 'central', url: 'http://repo1.maven.org/maven2' }
- { id: 'mavencentral', url: 'http://repo1.maven.org/maven2' }
- { id: 'codehaus', url: 'http://repository.codehaus.org' }
- {
    id: 'sonatype-oss'
    url: 'https://oss.sonatype.org/content/groups/public'
    # Snapshot Purge Policy
    revisionRetentionCount: 1
    revisionPurgeAfterDays: 0
  }
- {
    id: 'restlet'
    url: 'http://maven.restlet.org'
    # Snapshot Purge Policy
    revisionRetentionCount: 1
    revisionPurgeAfterDays: 0
    # Artifact affinities
    affinity: [ 'org.restlet' ]
    # seconds to wait till connected
    connectTimeout: 20
    # seconds to wait on read
    readTimeout: 1800
    # authentication credentials
    username: 'someuser'
    password: 'mypassword'
  }


Fail Fast

Should the build immediately fail if an artifact can not be immediately resolved from the remote repositories or the local cache?
failFastOnArtifactResolution: true

Metadata Update Policy

Specify the metadata update check policy for LATEST, RELEASE, and SNAPSHOT.
always
always check when for newer versions
never
never check when for newer versions
daily
(default) - check on the first run of the day (local time)
interval:NNN
check every NNN minutes (default is 60 mins)
updatePolicy: 'daily'

Snapshot Purge Policy

Default minimum count of snapshot revisions to keep.
The minimum acceptable value is 1.
The maximum acceptable value is is 100.
revisionRetentionCount: 1

If the count of snapshot revisions exceeds the specified retention count, then delete all snapshot revisions older than this count of days.
The maximum acceptable value is 1000.
revisionPurgeAfterDays: 0

Maven Cache Strategy

Defines how to use the ${user.home}/.m2/repository folder.
Options are:
IGNORE
ignore Maven cache entirely
LINK
use Maven cache artifacts directly, not recommended
COPY
copy Maven cache artifacts into Moxie's local repository
mavenCacheStrategy: 'IGNORE'