maven/maven-plugin-registry/plugin-registry.mdo

216 lines
6.9 KiB
Plaintext
Raw Normal View History

<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
2005-06-15 21:50:28 -04:00
<model>
<id>plugin-registry</id>
<name>PluginRegistry</name>
<description><![CDATA[
Contains plugin version information related to which version of a particular plugin to use,
when and how to update plugins, and which versions of a plugin have already been declined for
update.
]]></description>
<defaults>
<default>
<key>package</key>
<value>org.apache.maven.plugin.registry</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 rootElement="true" xml.tagName="pluginRegistry">
<name>PluginRegistry</name>
<version>1.0.0</version>
<superClass>TrackableBase</superClass>
<description>Root element of the plugin registry file.</description>
<fields>
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
<field>
<name>updateInterval</name>
<version>1.0.0</version>
<type>String</type>
<defaultValue>never</defaultValue>
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
<description><![CDATA[
Specifies how often to check for plugin updates. Valid values are: never, always, interval:XXX.
For the interval specification, XXX denotes a terse interval specification, such as 4h.
Where h=hours, m=minutes, d=days, w=weeks. The interval period should be specified in descending
order of granularity, like this: '[n]w [n]d [n]h [n]m'. Any omitted level of granularity will be
assumed to be a zero value.
]]></description>
</field>
<field>
<name>autoUpdate</name>
<version>1.0.0</version>
<type>String</type>
<description>Specifies whether the user should be prompted to update plugins.</description>
</field>
2005-06-15 21:50:28 -04:00
<field>
<name>checkLatest</name>
<version>1.0.0</version>
<type>String</type>
<description>Whether to resolve plugin versions using LATEST metadata.</description>
</field>
<field>
2005-06-15 21:50:28 -04:00
<name>plugins</name>
<version>1.0.0</version>
<description>Specified plugin update policy information.</description>
<association>
<type>Plugin</type>
<multiplicity>*</multiplicity>
</association>
</field>
</fields>
<codeSegments>
<codeSegment>
<version>1.0.0</version>
<code><![CDATA[
private java.util.Map pluginsByKey;
2005-06-15 21:50:28 -04:00
public java.util.Map getPluginsByKey()
2005-06-15 21:50:28 -04:00
{
if ( pluginsByKey == null )
{
pluginsByKey = new java.util.HashMap();
2005-06-15 21:50:28 -04:00
for ( java.util.Iterator it = getPlugins().iterator(); it.hasNext(); )
2005-06-15 21:50:28 -04:00
{
Plugin plugin = (Plugin) it.next();
pluginsByKey.put( plugin.getKey(), plugin );
}
}
return pluginsByKey;
}
public void flushPluginsByKey()
{
this.pluginsByKey = null;
}
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;
2005-06-15 21:50:28 -04:00
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 )
2005-06-15 21:50:28 -04:00
{
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;
2005-06-15 21:50:28 -04:00
}
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()
2005-06-15 21:50:28 -04:00
{
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;
2005-06-15 21:50:28 -04:00
}
]]></code>
</codeSegment>
</codeSegments>
</class>
<class>
<name>Plugin</name>
<version>1.0.0</version>
<superClass>TrackableBase</superClass>
<description>Policy for updating a single plugin.</description>
<fields>
<field>
<name>groupId</name>
<version>1.0.0</version>
<required>true</required>
<type>String</type>
</field>
<field>
<name>artifactId</name>
<version>1.0.0</version>
<required>true</required>
<type>String</type>
</field>
<field>
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
<name>lastChecked</name>
2005-06-15 21:50:28 -04:00
<version>1.0.0</version>
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
<type>String</type>
<description>[format: yyyy-MM-dd.HH:mm:ss Z] Specifies the date/time at which this plugin was last checked.</description>
2005-06-15 21:50:28 -04:00
</field>
<field>
<name>useVersion</name>
<version>1.0.0</version>
<type>String</type>
<description>The current version of this plugin, to be used until the appropriate update actions happen.</description>
</field>
<field>
<name>rejectedVersions</name>
<version>1.0.0</version>
<description>The list of versions for this plugin that the user declined to "install"</description>
<association>
<type>String</type>
<multiplicity>*</multiplicity>
</association>
</field>
</fields>
<codeSegments>
<codeSegment>
<version>1.0.0</version>
<code><![CDATA[
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 static final String LAST_CHECKED_DATE_FORMAT = "yyyy-MM-dd.HH:mm:ss Z";
2005-06-15 21:50:28 -04:00
public String getKey()
{
return getGroupId() + ":" + getArtifactId();
}
]]></code>
</codeSegment>
</codeSegments>
</class>
</classes>
</model>