2005-03-08 01:06:22 -05:00
|
|
|
<model>
|
2005-03-16 01:29:35 -05:00
|
|
|
<id>settings</id>
|
|
|
|
<name>Settings</name>
|
2005-03-10 20:52:18 -05:00
|
|
|
<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>
|
2005-03-08 01:06:22 -05:00
|
|
|
<defaults>
|
|
|
|
<default>
|
|
|
|
<key>package</key>
|
2005-03-16 01:29:35 -05:00
|
|
|
<value>org.apache.maven.settings</value>
|
2005-03-08 01:06:22 -05:00
|
|
|
</default>
|
|
|
|
</defaults>
|
|
|
|
<classes>
|
2005-03-16 01:29:35 -05:00
|
|
|
<class rootElement="true" xml.tagName="settings">
|
|
|
|
<name>Settings</name>
|
2005-03-09 17:13:07 -05:00
|
|
|
<version>1.0.0</version>
|
2005-03-10 20:52:18 -05:00
|
|
|
<description>Root element of the user configuration file.</description>
|
2005-03-08 01:06:22 -05:00
|
|
|
<fields>
|
2005-04-18 17:50:55 -04:00
|
|
|
<!-- [JC] Not ready to use yet, so I'm making if unavailable for now. -->
|
|
|
|
<!-- field>
|
2005-03-16 01:29:35 -05:00
|
|
|
<name>jdks</name>
|
2005-03-09 17:13:07 -05:00
|
|
|
<version>1.0.0</version>
|
2005-03-10 20:52:18 -05:00
|
|
|
<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>
|
2005-03-08 01:06:22 -05:00
|
|
|
<association>
|
2005-03-16 01:29:35 -05:00
|
|
|
<type>Jdk</type>
|
2005-03-08 01:06:22 -05:00
|
|
|
<multiplicity>*</multiplicity>
|
|
|
|
</association>
|
2005-04-18 17:50:55 -04:00
|
|
|
</field -->
|
2005-03-09 17:13:07 -05:00
|
|
|
<field>
|
2005-03-16 01:29:35 -05:00
|
|
|
<name>proxies</name>
|
2005-03-09 17:13:07 -05:00
|
|
|
<version>1.0.0</version>
|
2005-03-10 20:52:18 -05:00
|
|
|
<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>
|
2005-03-09 17:13:07 -05:00
|
|
|
<association>
|
2005-03-16 01:29:35 -05:00
|
|
|
<type>Proxy</type>
|
2005-03-09 17:13:07 -05:00
|
|
|
<multiplicity>*</multiplicity>
|
|
|
|
</association>
|
|
|
|
</field>
|
2005-03-08 01:06:22 -05:00
|
|
|
<field>
|
2005-03-16 01:29:35 -05:00
|
|
|
<name>servers</name>
|
2005-03-09 17:13:07 -05:00
|
|
|
<version>1.0.0</version>
|
2005-03-10 20:52:18 -05:00
|
|
|
<description><![CDATA[
|
|
|
|
Configuration of server-specific settings, mainly authentication
|
|
|
|
method. This allows configuration of authentication on a per-server
|
|
|
|
basis.
|
|
|
|
]]></description>
|
2005-03-08 01:06:22 -05:00
|
|
|
<association>
|
2005-03-16 01:29:35 -05:00
|
|
|
<type>Server</type>
|
2005-03-08 01:06:22 -05:00
|
|
|
<multiplicity>*</multiplicity>
|
|
|
|
</association>
|
|
|
|
</field>
|
|
|
|
<field>
|
2005-03-16 01:29:35 -05:00
|
|
|
<name>profiles</name>
|
2005-03-09 17:13:07 -05:00
|
|
|
<version>1.0.0</version>
|
2005-03-10 20:52:18 -05:00
|
|
|
<description><![CDATA[
|
|
|
|
Configuration for different runtime profiles for maven itself. For
|
|
|
|
example, this will allow plugin developers to switch from a "work"
|
|
|
|
local repository to a "testing" local repository. It may also allow
|
|
|
|
configuration of such things as password keystore, etc. Once again,
|
|
|
|
the active profile will be switchable via either the defaults section
|
|
|
|
or the command line (read: system properties).
|
|
|
|
]]></description>
|
2005-03-08 01:06:22 -05:00
|
|
|
<association>
|
2005-03-16 01:29:35 -05:00
|
|
|
<type>Profile</type>
|
2005-03-08 01:06:22 -05:00
|
|
|
<multiplicity>*</multiplicity>
|
|
|
|
</association>
|
|
|
|
</field>
|
|
|
|
</fields>
|
2005-04-18 17:50:55 -04:00
|
|
|
<codeSegments>
|
|
|
|
<codeSegment>
|
|
|
|
<version>1.0.0</version>
|
|
|
|
<code><![CDATA[
|
|
|
|
private Profile activeProfile;
|
|
|
|
private Proxy activeProxy;
|
|
|
|
|
|
|
|
public synchronized void initializeActiveProfile(String localRepository)
|
|
|
|
{
|
|
|
|
if(getActiveProfile() == null)
|
|
|
|
{
|
|
|
|
Profile profile = new Profile();
|
|
|
|
profile.setLocalRepository(localRepository);
|
|
|
|
profile.setActive(true);
|
|
|
|
|
|
|
|
addProfile(profile);
|
|
|
|
activeProfile = profile;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public synchronized Profile getActiveProfile()
|
|
|
|
{
|
|
|
|
if(activeProfile == null)
|
|
|
|
{
|
|
|
|
List profiles = getProfiles();
|
|
|
|
if ( profiles != null && !profiles.isEmpty() )
|
|
|
|
{
|
|
|
|
if ( profiles.size() > 1 )
|
|
|
|
{
|
|
|
|
for ( Iterator it = profiles.iterator(); it.hasNext(); )
|
|
|
|
{
|
|
|
|
Profile profile = (Profile) it.next();
|
|
|
|
if ( profile.isActive() )
|
|
|
|
{
|
|
|
|
activeProfile = profile;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// If we only have one profile, use it as the active one.
|
|
|
|
activeProfile = (Profile) profiles.get( 0 );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return activeProfile;
|
|
|
|
}
|
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
]]></code>
|
|
|
|
</codeSegment>
|
|
|
|
</codeSegments>
|
2005-03-08 01:06:22 -05:00
|
|
|
</class>
|
|
|
|
<!-- @todo: is any of this too CVS specific? Investigate other SCMs -->
|
2005-04-18 17:50:55 -04:00
|
|
|
<!-- [JC] Commenting out until we're ready to use it... -->
|
|
|
|
<!-- class>
|
2005-03-16 01:29:35 -05:00
|
|
|
<name>Jdk</name>
|
2005-03-09 17:13:07 -05:00
|
|
|
<version>1.0.0</version>
|
2005-03-08 01:06:22 -05:00
|
|
|
<description><![CDATA[Describes one Java environment]]></description>
|
|
|
|
<fields>
|
2005-03-16 01:29:35 -05:00
|
|
|
<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>
|
2005-03-08 01:06:22 -05:00
|
|
|
<field>
|
|
|
|
<name>version</name>
|
2005-03-09 17:13:07 -05:00
|
|
|
<version>1.0.0</version>
|
2005-03-08 01:06:22 -05:00
|
|
|
<required>true</required>
|
|
|
|
<description><![CDATA[The JDK major version (eg. '1.4').]]></description>
|
|
|
|
<type>String</type>
|
|
|
|
</field>
|
|
|
|
<field>
|
|
|
|
<name>javaHome</name>
|
2005-03-09 17:13:07 -05:00
|
|
|
<version>1.0.0</version>
|
2005-03-08 01:06:22 -05:00
|
|
|
<required>true</required>
|
|
|
|
<description><![CDATA[The JDK home.]]></description>
|
|
|
|
<type>String</type>
|
|
|
|
</field>
|
|
|
|
</fields>
|
2005-04-18 17:50:55 -04:00
|
|
|
</class -->
|
2005-03-09 17:13:07 -05:00
|
|
|
<class>
|
2005-03-16 01:29:35 -05:00
|
|
|
<name>Proxy</name>
|
2005-03-09 17:13:07 -05:00
|
|
|
<version>1.0.0</version>
|
|
|
|
<fields>
|
|
|
|
<field>
|
2005-03-16 01:29:35 -05:00
|
|
|
<name>active</name>
|
2005-03-09 17:13:07 -05:00
|
|
|
<version>1.0.0</version>
|
2005-03-16 01:29:35 -05:00
|
|
|
<required>false</required>
|
|
|
|
<defaultValue>false</defaultValue>
|
|
|
|
<description><![CDATA[Whether this proxy configuration is the active one.]]></description>
|
|
|
|
<type>boolean</type>
|
2005-03-09 17:13:07 -05:00
|
|
|
</field>
|
|
|
|
<field>
|
|
|
|
<name>protocol</name>
|
|
|
|
<version>1.0.0</version>
|
|
|
|
<description><![CDATA[The proxy protocol.]]></description>
|
|
|
|
<type>String</type>
|
2005-04-11 21:45:21 -04:00
|
|
|
<defaultValue>http</defaultValue>
|
2005-03-09 17:13:07 -05:00
|
|
|
</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>
|
2005-03-10 20:52:18 -05:00
|
|
|
<description><![CDATA[
|
|
|
|
The list of non-proxied hosts (usually
|
|
|
|
comma-delimited).
|
|
|
|
]]></description>
|
2005-03-09 17:13:07 -05:00
|
|
|
<type>String</type>
|
|
|
|
</field>
|
|
|
|
</fields>
|
|
|
|
</class>
|
2005-03-08 01:06:22 -05:00
|
|
|
<class>
|
2005-03-16 01:29:35 -05:00
|
|
|
<name>Server</name>
|
2005-03-09 17:13:07 -05:00
|
|
|
<version>1.0.0</version>
|
2005-03-08 01:06:22 -05:00
|
|
|
<fields>
|
|
|
|
<field>
|
|
|
|
<name>id</name>
|
2005-03-09 17:13:07 -05:00
|
|
|
<version>1.0.0</version>
|
2005-03-08 01:06:22 -05:00
|
|
|
<required>true</required>
|
2005-03-10 20:52:18 -05:00
|
|
|
<description><![CDATA[
|
|
|
|
The ID of this configuration for indicating the default or "active"
|
|
|
|
profile.
|
|
|
|
]]></description>
|
2005-03-08 01:06:22 -05:00
|
|
|
<type>String</type>
|
|
|
|
</field>
|
|
|
|
<field>
|
|
|
|
<name>username</name>
|
2005-03-09 17:13:07 -05:00
|
|
|
<version>1.0.0</version>
|
2005-03-10 20:52:18 -05:00
|
|
|
<description><![CDATA[The username used to authenticate.]]></description>
|
2005-03-08 01:06:22 -05:00
|
|
|
<type>String</type>
|
|
|
|
</field>
|
|
|
|
<field>
|
2005-03-09 00:48:31 -05:00
|
|
|
<name>password</name>
|
2005-03-09 17:13:07 -05:00
|
|
|
<version>1.0.0</version>
|
2005-03-10 20:52:18 -05:00
|
|
|
<description><![CDATA[
|
|
|
|
The password used in conjunction with the username to authenticate.
|
|
|
|
]]></description>
|
2005-03-08 01:06:22 -05:00
|
|
|
<type>String</type>
|
|
|
|
</field>
|
|
|
|
<field>
|
|
|
|
<name>privateKey</name>
|
2005-03-09 17:13:07 -05:00
|
|
|
<version>1.0.0</version>
|
2005-03-10 20:52:18 -05:00
|
|
|
<description><![CDATA[The private key location used to authenticate.]]></description>
|
2005-03-08 01:06:22 -05:00
|
|
|
<type>String</type>
|
|
|
|
</field>
|
2005-03-09 00:48:31 -05:00
|
|
|
<field>
|
|
|
|
<name>passphrase</name>
|
2005-03-09 17:13:07 -05:00
|
|
|
<version>1.0.0</version>
|
2005-03-10 20:52:18 -05:00
|
|
|
<description><![CDATA[
|
|
|
|
The passphrase used in conjunction with the privateKey to authenticate.
|
|
|
|
]]></description>
|
2005-03-09 00:48:31 -05:00
|
|
|
<type>String</type>
|
|
|
|
</field>
|
2005-03-08 01:06:22 -05:00
|
|
|
</fields>
|
|
|
|
</class>
|
|
|
|
<class>
|
2005-03-16 01:29:35 -05:00
|
|
|
<name>Profile</name>
|
2005-03-09 17:13:07 -05:00
|
|
|
<version>1.0.0</version>
|
2005-03-08 01:06:22 -05:00
|
|
|
<fields>
|
|
|
|
<field>
|
2005-03-16 01:29:35 -05:00
|
|
|
<name>active</name>
|
2005-03-09 17:13:07 -05:00
|
|
|
<version>1.0.0</version>
|
2005-03-16 01:29:35 -05:00
|
|
|
<required>false</required>
|
|
|
|
<defaultValue>false</defaultValue>
|
|
|
|
<description><![CDATA[Whether this is the active maven profile.]]></description>
|
|
|
|
<type>boolean</type>
|
2005-03-08 01:06:22 -05:00
|
|
|
</field>
|
|
|
|
<field>
|
|
|
|
<name>localRepository</name>
|
2005-03-09 17:13:07 -05:00
|
|
|
<version>1.0.0</version>
|
2005-03-08 01:06:22 -05:00
|
|
|
<required>true</required>
|
2005-03-10 20:52:18 -05:00
|
|
|
<description><![CDATA[The local repository.]]></description>
|
2005-03-08 01:06:22 -05:00
|
|
|
<type>String</type>
|
|
|
|
</field>
|
2005-04-18 17:50:55 -04:00
|
|
|
<!-- [JC] Not ready to use yet, so I'm making if unavailable for now. -->
|
|
|
|
<!-- field>
|
2005-03-08 01:06:22 -05:00
|
|
|
<name>passwordStore</name>
|
2005-03-09 17:13:07 -05:00
|
|
|
<version>1.0.0</version>
|
2005-04-18 17:50:55 -04:00
|
|
|
<required>false</required>
|
2005-03-10 20:52:18 -05:00
|
|
|
<description><![CDATA[The keystore used to store passwords.]]></description>
|
2005-03-08 01:06:22 -05:00
|
|
|
<type>String</type>
|
2005-04-18 17:50:55 -04:00
|
|
|
</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>
|
2005-03-08 01:06:22 -05:00
|
|
|
</field>
|
|
|
|
</fields>
|
|
|
|
</class>
|
|
|
|
</classes>
|
|
|
|
</model>
|