Add support for configuring Aether via settings.xml

Previously, Aether's configuration was largely hard-coded making it
impossible to configure a mirror, provide credentials for accessing
a repository, etc.

This commit adds support for configuring Aether via Maven's
settings.xml file. The support is optional and must be enabled by
grabbing spring-boot-maven-settings in an init script. The Aether
instance that's used when running the application will then be
configured using settings.xml. The settings file is expected to be
found in ${user.home}/.m2/settings.xml.

The configuration of the following items is currently supported:

 - Offline
 - Proxies
 - Mirrors
 - Server authentication
 - Local repository location

If the support is not enabled, settings.xml does not exist, or
settings.xml does not configure certain things then sensible defaults
are applied.
This commit is contained in:
Andy Wilkinson
2014-01-08 11:03:34 +00:00
parent 2e81b1d0d0
commit a58e4cbb1f
13 changed files with 437 additions and 84 deletions

View File

@@ -36,6 +36,11 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>spring-boot-maven-settings</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-xml</artifactId>