setting配置项
private String localRepository; // 本地仓库地址
private boolean interactiveMode = true;
private boolean usePluginRegistry = false;
private boolean offline = false;
private List<Proxy> proxies; // 代理
private List<Server> servers; // 服务器
private List<Mirror> mirrors; // 镜像
private List<Profile> profiles;
private List<String> activeProfiles;
private List<String> pluginGroups;
private String modelEncoding = "UTF-8";
private Proxy activeProxy;
private Map<String, Profile> profileMap;
maven使用了SettingsXpp3Reader、SettingsXpp3Writer来解析settings.xml配置文件。实际上是依赖于plexus-utils。
Proxy可配置项
private boolean active = true;
private String protocol = "http";
private String username;
private String password;
private int port = 8080;
private String host;
private String nonProxyHosts;
Server可配置项
private String username;
private String password;
private String privateKey;
private String passphrase;
private String filePermissions;
private String directoryPermissions;
private Object configuration;
Profile
private Activation activation;
private Properties properties;
private List<Repository> repositories;
private List<Repository> pluginRepositories;
settings-builder
- building
- crypto
- io
- merge
- validation
crypto用于给settings中的密码加密,访问私有maven仓库的时候需要账号密码。