maven/maven-settings/settings.mdo

670 lines
21 KiB
Plaintext
Raw Normal View History

<model>
<id>settings</id>
<name>Settings</name>
<description><![CDATA[
User-specific configuration for maven. Includes things that should not
be distributed with the pom.xml file, such as developer identity, along with
local settings, like proxy information.]]></description>
<defaults>
<default>
<key>package</key>
<value>org.apache.maven.settings</value>
</default>
</defaults>
<classes>
<class>
<name>TrackableBase</name>
<version>1.0.0</version>
<description>common base class that contains code to track the source for this instance (USER|GLOBAL)</description>
<codeSegments>
<codeSegment>
<version>1.0.0</version>
<code><![CDATA[
public static final String USER_LEVEL = "user-level";
public static final String GLOBAL_LEVEL = "global-level";
private String sourceLevel = USER_LEVEL;
private boolean sourceLevelSet = false;
public void setSourceLevel( String sourceLevel )
{
if ( sourceLevelSet )
{
throw new IllegalStateException( "Cannot reset sourceLevel attribute; it is already set to: " + sourceLevel );
}
else if ( !( USER_LEVEL.equals( sourceLevel ) || GLOBAL_LEVEL.equals( sourceLevel ) ) )
{
throw new IllegalArgumentException( "sourceLevel must be one of: {" + USER_LEVEL + "," + GLOBAL_LEVEL + "}" );
}
else
{
this.sourceLevel = sourceLevel;
this.sourceLevelSet = true;
}
}
public String getSourceLevel()
{
return sourceLevel;
}
]]></code>
</codeSegment>
</codeSegments>
</class>
<class>
<name>IdentifiableBase</name>
<superClass>TrackableBase</superClass>
<version>1.0.0</version>
<fields>
<field>
<name>id</name>
<version>1.0.0</version>
<type>String</type>
<default>default</default>
<required>true</required>
</field>
</fields>
</class>
<class rootElement="true" xml.tagName="settings">
<name>Settings</name>
<version>1.0.0</version>
<superClass>TrackableBase</superClass>
<description>Root element of the user configuration file.</description>
<fields>
<field>
<name>localRepository</name>
<version>1.0.0</version>
<required>true</required>
<description><![CDATA[The local repository.]]></description>
<type>String</type>
</field>
2005-06-15 21:50:28 -04:00
<field>
<name>interactiveMode</name>
<version>1.0.0</version>
<description><![CDATA[Whether Maven should attempt to interact with the user for input.]]></description>
<type>boolean</type>
<defaultValue>true</defaultValue>
</field>
<!-- [JC] Not ready to use yet, so I'm making if unavailable for now. -->
<!-- field>
<name>passwordStore</name>
<version>1.0.0</version>
<required>false</required>
<description><![CDATA[The keystore used to store passwords.]]></description>
<type>String</type>
</field -->
<field>
<name>offline</name>
<version>1.0.0</version>
<required>false</required>
<description><![CDATA[Indicate whether maven should operate in offline mode full-time.]]>
</description>
<type>boolean</type>
<defaultValue>false</defaultValue>
</field>
<!-- [JC] Not ready to use yet, so I'm making if unavailable for now. -->
<!-- field>
<name>jdks</name>
<version>1.0.0</version>
<description><![CDATA[
Configuration for different java environment profiles. One good use
for this might be to configure both JDK 1.4 and JDK 1.5 to work with
maven. Profiles will allow switching of entire java environments
based on the profile id, either in the defaults section below, or on
the command line.
]]></description>
<association>
<type>Jdk</type>
<multiplicity>*</multiplicity>
</association>
</field -->
<field>
<name>proxies</name>
<version>1.0.0</version>
<description><![CDATA[
Configuration for different proxy profiles. Multiple proxy profiles
might come in handy for anyone working from a notebook or other
mobile platform, to enable easy switching of entire proxy
configurations by simply specifying the profile id, again either from
the command line or from the defaults section below.
]]></description>
<association>
<type>Proxy</type>
<multiplicity>*</multiplicity>
</association>
</field>
<field>
<name>servers</name>
<version>1.0.0</version>
<description><![CDATA[
Configuration of server-specific settings, mainly authentication
method. This allows configuration of authentication on a per-server
basis.
]]></description>
<association>
<type>Server</type>
<multiplicity>*</multiplicity>
</association>
</field>
<field>
<name>mirrors</name>
<version>1.0.0</version>
<description> Configuration of download mirrors for repositories.
</description>
<association>
<type>Mirror</type>
<multiplicity>*</multiplicity>
</association>
</field>
<field>
<name>profiles</name>
<version>1.0.0</version>
<description><![CDATA[
Configuration of build profiles for adjusting the build
according to environmental parameters
]]></description>
<association>
<type>Profile</type>
<multiplicity>*</multiplicity>
</association>
</field>
<field>
<name>activeProfiles</name>
<version>1.0.0</version>
<description><![CDATA[
List of manually-activated build profiles, specified in the order in which
they should be applied.
]]></description>
<association>
<type>String</type>
<multiplicity>*</multiplicity>
</association>
</field>
</fields>
<codeSegments>
<codeSegment>
<version>1.0.0</version>
<code><![CDATA[
private Proxy activeProxy;
public void flushActiveProxy()
{
this.activeProxy = null;
}
public synchronized Proxy getActiveProxy()
{
if(activeProxy == null)
{
List proxies = getProxies();
if ( proxies != null && !proxies.isEmpty() )
{
if ( proxies.size() > 1 )
{
for ( Iterator it = proxies.iterator(); it.hasNext(); )
{
Proxy proxy = (Proxy) it.next();
if ( proxy.isActive() )
{
activeProxy = proxy;
break;
}
}
}
else
{
// If we only have one proxy, use it as the active one.
activeProxy = (Proxy) proxies.get( 0 );
}
}
}
return activeProxy;
}
public Server getServer( String serverId )
{
Server match = null;
List servers = getServers();
if ( servers != null && serverId != null )
{
for ( Iterator it = servers.iterator(); it.hasNext(); )
{
Server server = (Server) it.next();
if ( serverId.equals( server.getId() ) )
{
match = server;
break;
}
}
}
return match;
}
public Mirror getMirrorOf( String repositoryId )
{
Mirror match = null;
List mirrors = getMirrors();
if ( mirrors != null && repositoryId != null )
{
for ( Iterator it = mirrors.iterator(); it.hasNext(); )
{
Mirror mirror = (Mirror) it.next();
if ( repositoryId.equals( mirror.getMirrorOf() ) )
{
match = mirror;
break;
}
}
}
return match;
}
private Map profileMap;
public void flushProfileMap()
{
this.profileMap = null;
}
public Map getProfilesAsMap()
{
if ( profileMap == null )
{
profileMap = new HashMap();
if ( getProfiles() != null )
{
for ( Iterator it = getProfiles().iterator(); it.hasNext(); )
{
Profile profile = (Profile) it.next();
profileMap.put( profile.getId(), profile );
}
}
}
return profileMap;
}
Resolving issue: MNG-379 o Added support for update-all and update-none when prompting the user. o Added --update-plugins/-F option to force an update of the plugins used in the project. o Added autoUpdate setting for the plugin registry. This is used when in non-interactive mode, to determine whether to register plugin updates o Added updateInterval to determine when/how often to check for updates to registered plugins. Supports three syntaxes: - 'never' - 'always' - 'interval:XXX' (where XXX can be a combination of weeks, days, hours, and minutes in the syntax: 1w1d1h1m) > this renders the interval syntax similar to 'interval:1w' to check every week. NOTE: update intervals are calculated from the time a particular plugin was last checked. o Added lastChecked attribute for registered plugins, to use as a basis for calculating update-check interval o Added RuntimeInfo classes for maven-settings and maven-plugin-registry, to help in tracking the file each instance comes from, in addition to merging info which is useful when extracting the user-level instance from the merged instance (for persisting changes to the user instance, f.e.). o Changed verifyPlugin(..) to take an instance of Settings, to allow persistent decisions across the session (like update-all, update-none in the plugin version manager) This should take care of outstanding issues with this new feature. I'm closing the JIRA issue now, and we'll deal with any bugs/shortcomings as separate issues. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@191021 13f79535-47bb-0310-9956-ffa450edef68
2005-06-16 18:38:57 -04:00
private RuntimeInfo runtimeInfo;
Resolving issue: MNG-379 o Added support for update-all and update-none when prompting the user. o Added --update-plugins/-F option to force an update of the plugins used in the project. o Added autoUpdate setting for the plugin registry. This is used when in non-interactive mode, to determine whether to register plugin updates o Added updateInterval to determine when/how often to check for updates to registered plugins. Supports three syntaxes: - 'never' - 'always' - 'interval:XXX' (where XXX can be a combination of weeks, days, hours, and minutes in the syntax: 1w1d1h1m) > this renders the interval syntax similar to 'interval:1w' to check every week. NOTE: update intervals are calculated from the time a particular plugin was last checked. o Added lastChecked attribute for registered plugins, to use as a basis for calculating update-check interval o Added RuntimeInfo classes for maven-settings and maven-plugin-registry, to help in tracking the file each instance comes from, in addition to merging info which is useful when extracting the user-level instance from the merged instance (for persisting changes to the user instance, f.e.). o Changed verifyPlugin(..) to take an instance of Settings, to allow persistent decisions across the session (like update-all, update-none in the plugin version manager) This should take care of outstanding issues with this new feature. I'm closing the JIRA issue now, and we'll deal with any bugs/shortcomings as separate issues. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@191021 13f79535-47bb-0310-9956-ffa450edef68
2005-06-16 18:38:57 -04:00
public void setRuntimeInfo( RuntimeInfo runtimeInfo )
{
Resolving issue: MNG-379 o Added support for update-all and update-none when prompting the user. o Added --update-plugins/-F option to force an update of the plugins used in the project. o Added autoUpdate setting for the plugin registry. This is used when in non-interactive mode, to determine whether to register plugin updates o Added updateInterval to determine when/how often to check for updates to registered plugins. Supports three syntaxes: - 'never' - 'always' - 'interval:XXX' (where XXX can be a combination of weeks, days, hours, and minutes in the syntax: 1w1d1h1m) > this renders the interval syntax similar to 'interval:1w' to check every week. NOTE: update intervals are calculated from the time a particular plugin was last checked. o Added lastChecked attribute for registered plugins, to use as a basis for calculating update-check interval o Added RuntimeInfo classes for maven-settings and maven-plugin-registry, to help in tracking the file each instance comes from, in addition to merging info which is useful when extracting the user-level instance from the merged instance (for persisting changes to the user instance, f.e.). o Changed verifyPlugin(..) to take an instance of Settings, to allow persistent decisions across the session (like update-all, update-none in the plugin version manager) This should take care of outstanding issues with this new feature. I'm closing the JIRA issue now, and we'll deal with any bugs/shortcomings as separate issues. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@191021 13f79535-47bb-0310-9956-ffa450edef68
2005-06-16 18:38:57 -04:00
this.runtimeInfo = runtimeInfo;
}
Resolving issue: MNG-379 o Added support for update-all and update-none when prompting the user. o Added --update-plugins/-F option to force an update of the plugins used in the project. o Added autoUpdate setting for the plugin registry. This is used when in non-interactive mode, to determine whether to register plugin updates o Added updateInterval to determine when/how often to check for updates to registered plugins. Supports three syntaxes: - 'never' - 'always' - 'interval:XXX' (where XXX can be a combination of weeks, days, hours, and minutes in the syntax: 1w1d1h1m) > this renders the interval syntax similar to 'interval:1w' to check every week. NOTE: update intervals are calculated from the time a particular plugin was last checked. o Added lastChecked attribute for registered plugins, to use as a basis for calculating update-check interval o Added RuntimeInfo classes for maven-settings and maven-plugin-registry, to help in tracking the file each instance comes from, in addition to merging info which is useful when extracting the user-level instance from the merged instance (for persisting changes to the user instance, f.e.). o Changed verifyPlugin(..) to take an instance of Settings, to allow persistent decisions across the session (like update-all, update-none in the plugin version manager) This should take care of outstanding issues with this new feature. I'm closing the JIRA issue now, and we'll deal with any bugs/shortcomings as separate issues. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@191021 13f79535-47bb-0310-9956-ffa450edef68
2005-06-16 18:38:57 -04:00
public RuntimeInfo getRuntimeInfo()
{
Resolving issue: MNG-379 o Added support for update-all and update-none when prompting the user. o Added --update-plugins/-F option to force an update of the plugins used in the project. o Added autoUpdate setting for the plugin registry. This is used when in non-interactive mode, to determine whether to register plugin updates o Added updateInterval to determine when/how often to check for updates to registered plugins. Supports three syntaxes: - 'never' - 'always' - 'interval:XXX' (where XXX can be a combination of weeks, days, hours, and minutes in the syntax: 1w1d1h1m) > this renders the interval syntax similar to 'interval:1w' to check every week. NOTE: update intervals are calculated from the time a particular plugin was last checked. o Added lastChecked attribute for registered plugins, to use as a basis for calculating update-check interval o Added RuntimeInfo classes for maven-settings and maven-plugin-registry, to help in tracking the file each instance comes from, in addition to merging info which is useful when extracting the user-level instance from the merged instance (for persisting changes to the user instance, f.e.). o Changed verifyPlugin(..) to take an instance of Settings, to allow persistent decisions across the session (like update-all, update-none in the plugin version manager) This should take care of outstanding issues with this new feature. I'm closing the JIRA issue now, and we'll deal with any bugs/shortcomings as separate issues. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@191021 13f79535-47bb-0310-9956-ffa450edef68
2005-06-16 18:38:57 -04:00
return runtimeInfo;
}
]]></code>
</codeSegment>
</codeSegments>
</class>
<!-- @todo: is any of this too CVS specific? Investigate other SCMs -->
<!-- [JC] Commenting out until we're ready to use it... -->
<!-- class>
<name>Jdk</name>
<version>1.0.0</version>
<superClass>TrackableBase</superClass>
<description><![CDATA[Describes one Java environment]]></description>
<fields>
<field>
<name>active</name>
<version>1.0.0</version>
<required>false</required>
<defaultValue>false</defaultValue>
<description><![CDATA[Whether this JDK is the active one.]]></description>
<type>boolean</type>
</field>
<field>
<name>version</name>
<version>1.0.0</version>
<required>true</required>
<description><![CDATA[The JDK major version (eg. '1.4').]]></description>
<type>String</type>
</field>
<field>
<name>javaHome</name>
<version>1.0.0</version>
<required>true</required>
<description><![CDATA[The JDK home.]]></description>
<type>String</type>
</field>
</fields>
</class -->
<class>
<name>Proxy</name>
<version>1.0.0</version>
<superClass>IdentifiableBase</superClass>
<fields>
<field>
<name>active</name>
<version>1.0.0</version>
<required>false</required>
<defaultValue>false</defaultValue>
<description><![CDATA[Whether this proxy configuration is the active one.]]>
</description>
<type>boolean</type>
</field>
<field>
<name>protocol</name>
<version>1.0.0</version>
<description><![CDATA[The proxy protocol.]]></description>
<type>String</type>
<defaultValue>http</defaultValue>
</field>
<field>
<name>username</name>
<version>1.0.0</version>
<description><![CDATA[The proxy user.]]></description>
<type>String</type>
</field>
<field>
<name>password</name>
<version>1.0.0</version>
<description><![CDATA[The proxy password.]]></description>
<type>String</type>
</field>
<field>
<name>port</name>
<version>1.0.0</version>
<description><![CDATA[The proxy port.]]></description>
<type>int</type>
</field>
<field>
<name>host</name>
<version>1.0.0</version>
<description><![CDATA[The proxy host.]]></description>
<type>String</type>
</field>
<field>
<name>nonProxyHosts</name>
<version>1.0.0</version>
<description><![CDATA[
The list of non-proxied hosts (usually
comma-delimited).
]]></description>
<type>String</type>
</field>
</fields>
</class>
<class>
<name>Server</name>
<version>1.0.0</version>
<superClass>IdentifiableBase</superClass>
<fields>
<field>
<name>username</name>
<version>1.0.0</version>
<description><![CDATA[The username used to authenticate.]]>
</description>
<type>String</type>
</field>
<field>
<name>password</name>
<version>1.0.0</version>
<description><![CDATA[
The password used in conjunction with the username to authenticate.
]]></description>
<type>String</type>
</field>
<field>
<name>privateKey</name>
<version>1.0.0</version>
<description><![CDATA[The private key location used to authenticate.]]>
</description>
<type>String</type>
</field>
<field>
<name>passphrase</name>
<version>1.0.0</version>
<description><![CDATA[
The passphrase used in conjunction with the privateKey to authenticate.
]]></description>
<type>String</type>
</field>
</fields>
</class>
<class>
<name>Mirror</name>
<version>1.0.0</version>
<superClass>IdentifiableBase</superClass>
<description> A download mirror for a given repository. </description>
<fields>
<field>
<name>mirrorOf</name>
<required>true</required>
<version>1.0.0</version>
<type>String</type>
<description> The server ID of the repository being mirrored, eg
"central". This MUST NOT match the mirror id. </description>
</field>
<field>
<name>name</name>
<required>false</required>
<version>1.0.0</version>
<type>String</type>
<description> The optional name that describes the mirror.
</description>
</field>
<field>
<name>url</name>
<required>true</required>
<version>1.0.0</version>
<type>String</type>
<description> The URL of the mirror repository. </description>
</field>
<!--
<field>
<name>allowOriginal</name>
<version>1.0.0</version>
<type>boolean</type>
<defaultValue>true</defaultValue>
<description>
Whether to allow the user of the original as a fallback if an artifact is not found on the mirror.
</description>
</field>
-->
</fields>
</class>
<!-- Profile support -->
<class>
<name>Profile</name>
<version>1.0.0</version>
<superClass>IdentifiableBase</superClass>
<description><![CDATA[
Modifications to the build process which is keyed on some
sort of environmental parameter.
]]></description>
<fields>
<field>
<name>activation</name>
<version>1.0.0</version>
<description><![CDATA[The conditional logic which will automatically
trigger the inclusion of this profile.]]></description>
<association>
<type>Activation</type>
</association>
</field>
<field>
<name>localRepository</name>
<version>1.0.0</version>
<type>String</type>
<description>backwards-compatible location for specifying the local repository for use in builds</description>
<comment>THIS IS DEPRECATED: use localRepository under the root element instead.</comment>
</field>
<field>
<name>properties</name>
<description>Extended configuration specific to this profile goes
here.</description>
<type>Properties</type>
<association xml.mapStyle="inline">
<type>String</type>
<multiplicity>*</multiplicity>
</association>
</field>
<field>
<name>repositories</name>
<version>1.0.0</version>
<description><![CDATA[The lists of the remote repositories]]>
</description>
<association>
<type>Repository</type>
<multiplicity>*</multiplicity>
</association>
</field>
<field>
<name>pluginRepositories</name>
<version>1.0.0</version>
<description><![CDATA[
The lists of the remote repositories for discovering plugins
]]></description>
<association>
<type>Repository</type>
<multiplicity>*</multiplicity>
</association>
<comment><![CDATA[ This may be removed or relocated in the near
future. It is undecided whether plugins really need a remote
repository set of their own. ]]></comment>
</field>
</fields>
</class>
<class>
<name>Activation</name>
<version>1.0.0</version>
<description><![CDATA[
The conditions within the build runtime environment which will trigger
the automatic inclusion of the parent build profile.
]]></description>
<fields>
<field>
<name>jdk</name>
<version>1.0.0</version>
<type>String</type>
<description><![CDATA[
Specifies that this profile will be activated when a matching JDK is detected.
]]></description>
</field>
<field>
<name>property</name>
<version>1.0.0</version>
<description><![CDATA[
Specifies that this profile will be activated when this System property is specified.
]]></description>
<association>
<type>ActivationProperty</type>
</association>
</field>
</fields>
</class>
<class>
<name>Repository</name>
<version>1.0.0</version>
<description><![CDATA[
Repository contains the information needed
for establishing connections with remote repoistory
]]></description>
<fields>
<field>
<name>id</name>
<version>1.0.0</version>
<description><![CDATA[
A unique identifier for a repository.
]]></description>
<type>String</type>
</field>
<field>
<name>name</name>
<version>1.0.0</version>
<description><![CDATA[
Human readable name of the repository
]]></description>
<type>String</type>
</field>
<field>
<name>url</name>
<version>1.0.0</version>
<description><![CDATA[
The url of the repository
]]></description>
<type>String</type>
</field>
<field>
<name>snapshotPolicy</name>
<version>1.0.0</version>
<description> The policy for downloading snapshots - can be "always",
"daily" (default), "interval:XXX" (in minutes) or "never".
</description>
<type>String</type>
<defaultValue>daily</defaultValue>
</field>
<field>
<name>layout</name>
<version>1.0.0</version>
<description>The type of layout this repository uses for locating and
storing artifacts - can be "legacy" or "default".</description>
<type>String</type>
<defaultValue>default</defaultValue>
</field>
<field>
<name>checksumPolicy</name>
<version>1.0.0</version>
<description>What to do when verification of an artifact checksum fails - warn, fail, etc. Valid values are "fail" or "warn"</description>
<type>String</type>
<defaultValue>warn</defaultValue>
</field>
</fields>
<codeSegments>
<codeSegment>
<version>1.0.0</version>
<code><![CDATA[
public boolean equals( Object obj )
{
Repository other = ( Repository ) obj;
boolean retValue = false;
if ( id != null )
{
retValue = id.equals( other.id );
}
return retValue;
}
]]></code>
</codeSegment>
</codeSegments>
</class>
<class>
<name>ActivationProperty</name>
<version>1.0.0</version>
<description><![CDATA[
This is the property specification used to activate a profile. If the value field is empty,
then the existence of the named property will activate the profile, otherwise it does a case-sensitive
match against the property value as well.
]]></description>
<fields>
<field>
<name>name</name>
<version>1.0.0</version>
<type>String</type>
<required>true</required>
<description>The name of the property to be used to activate a profile</description>
</field>
<field>
<name>value</name>
<version>1.0.0</version>
<type>String</type>
<description>The value of the property to be used to activate a profile</description>
</field>
</fields>
</class>
<!-- /BuildProfile support -->
</classes>
</model>