Cleaned up plugin-version resolution.

o Added four command-line options:

  --check-plugin-updates is a synonym for --update-plugins
  
  --no-plugin-registry turns off usage of plugin-registry.xml for plugin version resolution for the current build.
  
  --check-plugin-latest turns on usage of LATEST metadata for plugin version resolution for the current build.

  --no-plugin-latest turns off usage of LATEST metadata for plugin version resolution for the current build.

o Added settings.xml configuration <usePluginRegistry>true|false</usePluginRegistry> to en/disable the use of plugin-registry.xml for plugin version resolution. The default value is true, to use the plugin-registry.xml.

o Added plugin-registry.xml configuration <checkLatest>true|false</checkLatest> to en/disable the use of LATEST metadata when resolving plugin versions. The default value is false, or do not use LATEST.



git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@219089 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
John Dennis Casey 2005-07-14 20:35:23 +00:00
parent 06597924cf
commit 3f47c60752
8 changed files with 171 additions and 91 deletions

View File

@ -122,7 +122,7 @@ echo Rebuilding maven2 plugins
echo ----------------------------------------------------------------------- echo -----------------------------------------------------------------------
cd maven-plugins cd maven-plugins
@REM update the release info to ensure these versions get used in the integration tests @REM update the release info to ensure these versions get used in the integration tests
call m2 --no-plugin-updates --batch-mode -DupdateReleaseInfo=true -e %MAVEN_CMD_LINE_ARGS% clean:clean install call m2 --no-plugin-registry --check-plugin-latest --batch-mode -DupdateReleaseInfo=true -e %MAVEN_CMD_LINE_ARGS% clean:clean install
cd .. cd ..
echo echo
@ -131,7 +131,7 @@ echo Rebuilding maven2 reports
echo ----------------------------------------------------------------------- echo -----------------------------------------------------------------------
cd maven-reports cd maven-reports
@REM update the release info to ensure these versions get used in the integration tests @REM update the release info to ensure these versions get used in the integration tests
call m2 --no-plugin-updates --batch-mode -DupdateReleaseInfo=true -e %MAVEN_CMD_LINE_ARGS% clean:clean install call m2 --no-plugin-registry --check-plugin-latest --batch-mode -DupdateReleaseInfo=true -e %MAVEN_CMD_LINE_ARGS% clean:clean install
cd .. cd ..
echo echo

View File

@ -57,7 +57,7 @@ ret=$?; if [ $ret != 0 ]; then exit $ret; fi
cd maven-plugins cd maven-plugins
# update the release info to ensure these versions get used in the integration tests # update the release info to ensure these versions get used in the integration tests
m2 --no-plugin-updates --batch-mode -DupdateReleaseInfo=true -e $ARGS clean:clean install m2 --no-plugin-registry --check-plugin-latest --batch-mode -DupdateReleaseInfo=true -e $ARGS clean:clean install
ret=$?; if [ $ret != 0 ]; then exit $ret; fi ret=$?; if [ $ret != 0 ]; then exit $ret; fi
) )
ret=$?; if [ $ret != 0 ]; then exit $ret; fi ret=$?; if [ $ret != 0 ]; then exit $ret; fi
@ -69,7 +69,7 @@ ret=$?; if [ $ret != 0 ]; then exit $ret; fi
cd maven-reports cd maven-reports
# update the release info to ensure these versions get used in the integration tests # update the release info to ensure these versions get used in the integration tests
m2 --no-plugin-updates --batch-mode -DupdateReleaseInfo=true -e $ARGS clean:clean install m2 --no-plugin-registry --check-plugin-latest --batch-mode -DupdateReleaseInfo=true -e $ARGS clean:clean install
ret=$?; if [ $ret != 0 ]; then exit $ret; fi ret=$?; if [ $ret != 0 ]; then exit $ret; fi
) )
ret=$?; if [ $ret != 0 ]; then exit $ret; fi ret=$?; if [ $ret != 0 ]; then exit $ret; fi
@ -79,7 +79,7 @@ ret=$?; if [ $ret != 0 ]; then exit $ret; fi
echo echo
echo "Running maven-core integration tests ..." echo "Running maven-core integration tests ..."
echo echo
./maven-core-it.sh --batch-mode "$HOME_ARGS" $ARGS ./maven-core-it.sh "$HOME_ARGS" $ARGS
ret=$?; if [ $ret != 0 ]; then exit $ret; fi ret=$?; if [ $ret != 0 ]; then exit $ret; fi
) )
ret=$?; if [ $ret != 0 ]; then exit $ret; fi ret=$?; if [ $ret != 0 ]; then exit $ret; fi

View File

@ -493,9 +493,12 @@ public class Verifier
cli.setExecutable( executable ); cli.setExecutable( executable );
cli.createArgument().setValue( "-e" ); // cli.createArgument().setValue( "-e" );
cli.createArgument().setValue( "-X" );
cli.createArgument().setValue( "--no-plugin-updates" ); cli.createArgument().setValue( "--no-plugin-registry" );
cli.createArgument().setValue( "--check-plugin-latest" );
cli.createArgument().setValue( "--batch-mode" ); cli.createArgument().setValue( "--batch-mode" );

View File

@ -192,7 +192,8 @@ public class MavenCli
settings.setInteractiveMode( false ); settings.setInteractiveMode( false );
} }
if ( commandLine.hasOption( CLIManager.FORCE_PLUGIN_UPDATES ) ) if ( commandLine.hasOption( CLIManager.FORCE_PLUGIN_UPDATES )
|| commandLine.hasOption( CLIManager.FORCE_PLUGIN_UPDATES2 ) )
{ {
settings.getRuntimeInfo().setPluginUpdateOverride( Boolean.TRUE ); settings.getRuntimeInfo().setPluginUpdateOverride( Boolean.TRUE );
} }
@ -200,6 +201,20 @@ public class MavenCli
{ {
settings.getRuntimeInfo().setPluginUpdateOverride( Boolean.FALSE ); settings.getRuntimeInfo().setPluginUpdateOverride( Boolean.FALSE );
} }
if ( commandLine.hasOption( CLIManager.FORCE_PLUGIN_LATEST_CHECK ) )
{
settings.getRuntimeInfo().setCheckLatestPluginVersion( Boolean.TRUE );
}
else if ( commandLine.hasOption( CLIManager.SUPPRESS_PLUGIN_LATEST_CHECK ) )
{
settings.getRuntimeInfo().setCheckLatestPluginVersion( Boolean.FALSE );
}
if ( commandLine.hasOption( CLIManager.SUPPRESS_PLUGIN_REGISTRY ) )
{
settings.setUsePluginRegistry( false );
}
List projectFiles = null; List projectFiles = null;
try try
@ -508,9 +523,17 @@ public class MavenCli
public static final char ACTIVATE_PROFILES = 'P'; public static final char ACTIVATE_PROFILES = 'P';
public static final String FORCE_PLUGIN_UPDATES = "update-plugins"; public static final String FORCE_PLUGIN_UPDATES = "check-plugin-updates";
public static final String FORCE_PLUGIN_UPDATES2 = "update-plugins";
public static final String SUPPRESS_PLUGIN_UPDATES = "no-plugin-updates"; public static final String SUPPRESS_PLUGIN_UPDATES = "no-plugin-updates";
public static final String SUPPRESS_PLUGIN_REGISTRY = "no-plugin-registry";
public static final String FORCE_PLUGIN_LATEST_CHECK = "check-plugin-latest";
public static final String SUPPRESS_PLUGIN_LATEST_CHECK = "no-plugin-latest";
public static final char CHECKSUM_FAILURE_POLICY = 'C'; public static final char CHECKSUM_FAILURE_POLICY = 'C';
@ -541,9 +564,17 @@ public class MavenCli
"Update all snapshots regardless of repository policies" ).create( UPDATE_SNAPSHOTS ) ); "Update all snapshots regardless of repository policies" ).create( UPDATE_SNAPSHOTS ) );
options.addOption( OptionBuilder.withLongOpt( "activate-profiles" ).withDescription( options.addOption( OptionBuilder.withLongOpt( "activate-profiles" ).withDescription(
"Comma-delimited list of profiles to activate").hasArg().create( ACTIVATE_PROFILES ) ); "Comma-delimited list of profiles to activate").hasArg().create( ACTIVATE_PROFILES ) );
options.addOption( OptionBuilder.withLongOpt( "batch-mode" ).withDescription( "Run in non-interactive (batch) mode" ).create( BATCH_MODE ) ); options.addOption( OptionBuilder.withLongOpt( "batch-mode" ).withDescription( "Run in non-interactive (batch) mode" ).create( BATCH_MODE ) );
options.addOption( OptionBuilder.withLongOpt( FORCE_PLUGIN_UPDATES ).withDescription( "Force upToDate check for any relevant registered plugins" ).create() ); options.addOption( OptionBuilder.withLongOpt( FORCE_PLUGIN_UPDATES ).withDescription( "Force upToDate check for any relevant registered plugins" ).create() );
options.addOption( OptionBuilder.withLongOpt( FORCE_PLUGIN_UPDATES2 ).withDescription( "Synonym for " + FORCE_PLUGIN_UPDATES ).create() );
options.addOption( OptionBuilder.withLongOpt( SUPPRESS_PLUGIN_UPDATES ).withDescription( "Suppress upToDate check for any relevant registered plugins" ).create() ); options.addOption( OptionBuilder.withLongOpt( SUPPRESS_PLUGIN_UPDATES ).withDescription( "Suppress upToDate check for any relevant registered plugins" ).create() );
options.addOption( OptionBuilder.withLongOpt( FORCE_PLUGIN_LATEST_CHECK ).withDescription( "Force checking of LATEST metadata for plugin versions" ).create() );
options.addOption( OptionBuilder.withLongOpt( SUPPRESS_PLUGIN_LATEST_CHECK ).withDescription( "Suppress checking of LATEST metadata for plugin versions" ).create() );
options.addOption( OptionBuilder.withLongOpt( SUPPRESS_PLUGIN_REGISTRY ).withDescription( "Don't use ~/.m2/plugin-registry.xml for plugin versions" ).create() );
options.addOption( OptionBuilder.withLongOpt( "strict-checksums" ).withDescription( "Fail the build if checksums don't match" ).create( CHECKSUM_FAILURE_POLICY ) ); options.addOption( OptionBuilder.withLongOpt( "strict-checksums" ).withDescription( "Fail the build if checksums don't match" ).create( CHECKSUM_FAILURE_POLICY ) );
options.addOption( OptionBuilder.withLongOpt( "lax-checksums" ).withDescription( "Warn if checksums don't match" ).create( CHECKSUM_WARNING_POLICY ) ); options.addOption( OptionBuilder.withLongOpt( "lax-checksums" ).withDescription( "Warn if checksums don't match" ).create( CHECKSUM_WARNING_POLICY ) );
} }

View File

@ -17,6 +17,7 @@ import org.apache.maven.plugin.registry.io.xpp3.PluginRegistryXpp3Writer;
import org.apache.maven.project.MavenProject; import org.apache.maven.project.MavenProject;
import org.apache.maven.project.MavenProjectBuilder; import org.apache.maven.project.MavenProjectBuilder;
import org.apache.maven.project.artifact.MavenMetadataSource; import org.apache.maven.project.artifact.MavenMetadataSource;
import org.apache.maven.settings.RuntimeInfo;
import org.apache.maven.settings.Settings; import org.apache.maven.settings.Settings;
import org.codehaus.plexus.components.inputhandler.InputHandler; import org.codehaus.plexus.components.inputhandler.InputHandler;
import org.codehaus.plexus.logging.AbstractLogEnabled; import org.codehaus.plexus.logging.AbstractLogEnabled;
@ -82,11 +83,14 @@ public class DefaultPluginVersionManager
// we're not going to prompt the user to accept a plugin update until we find one. // we're not going to prompt the user to accept a plugin update until we find one.
boolean promptToPersist = false; boolean promptToPersist = false;
// determine the behavior WRT prompting the user and installing plugin updates. RuntimeInfo settingsRTInfo = settings.getRuntimeInfo();
Boolean pluginUpdateOverride = settings.getRuntimeInfo().getPluginUpdateOverride();
// second pass...if the plugin is listed in the settings.xml, use the version from <useVersion/>. // determine the behavior WRT prompting the user and installing plugin updates.
if ( StringUtils.isEmpty( version ) ) Boolean pluginUpdateOverride = settingsRTInfo.getPluginUpdateOverride();
// second pass...if we're using the plugin registry, and the plugin is listed in the plugin-registry.xml, use
// the version from <useVersion/>.
if ( StringUtils.isEmpty( version ) && settings.isUsePluginRegistry() )
{ {
// resolve existing useVersion. // resolve existing useVersion.
version = resolveExistingFromPluginRegistry( groupId, artifactId ); version = resolveExistingFromPluginRegistry( groupId, artifactId );
@ -102,8 +106,8 @@ public class DefaultPluginVersionManager
if ( Boolean.TRUE.equals( pluginUpdateOverride ) if ( Boolean.TRUE.equals( pluginUpdateOverride )
|| ( !Boolean.FALSE.equals( pluginUpdateOverride ) && shouldCheckForUpdates( groupId, artifactId ) ) ) || ( !Boolean.FALSE.equals( pluginUpdateOverride ) && shouldCheckForUpdates( groupId, artifactId ) ) )
{ {
updatedVersion = resolveMetaVersion( groupId, artifactId, project updatedVersion = resolveMetaVersion( groupId, artifactId, project.getPluginArtifactRepositories(),
.getPluginArtifactRepositories(), localRepository, ReleaseArtifactTransformation.RELEASE_VERSION ); localRepository, ReleaseArtifactTransformation.RELEASE_VERSION );
if ( StringUtils.isNotEmpty( updatedVersion ) && !updatedVersion.equals( version ) ) if ( StringUtils.isNotEmpty( updatedVersion ) && !updatedVersion.equals( version ) )
{ {
@ -120,23 +124,31 @@ public class DefaultPluginVersionManager
} }
else else
{ {
getLogger() getLogger().info(
.info( "Plugin \'" + constructPluginKey( groupId, artifactId ) + "\' has updates." ); "Plugin \'" + constructPluginKey( groupId, artifactId )
+ "\' has updates." );
} }
} }
} }
} }
} }
boolean forcePersist = false; boolean forcePersist = false;
// third pass...retrieve the version for RELEASE and also set that resolved version as the <useVersion/> // are we using the LATEST metadata to resolve plugin version?
// in settings.xml. Boolean rtCheckLatest = settingsRTInfo.getCheckLatestPluginVersion();
if ( StringUtils.isEmpty( version ) )
boolean checkLatestMetadata = Boolean.TRUE.equals( rtCheckLatest )
|| ( !Boolean.FALSE.equals( rtCheckLatest ) && Boolean.valueOf( pluginRegistry.getCheckLatest() )
.booleanValue() );
// third pass...if we're checking for latest install/deploy, retrieve the version for LATEST metadata and also
// set that resolved version as the <useVersion/> in settings.xml.
if ( StringUtils.isEmpty( version ) && checkLatestMetadata )
{ {
// 1. resolve the version to be used // 1. resolve the version to be used
version = resolveMetaVersion( groupId, artifactId, project.getPluginArtifactRepositories(), version = resolveMetaVersion( groupId, artifactId, project.getPluginArtifactRepositories(),
localRepository, ReleaseArtifactTransformation.RELEASE_VERSION ); localRepository, LatestArtifactTransformation.LATEST_VERSION );
// 2. Set the updatedVersion so the user will be prompted whether to make this version permanent. // 2. Set the updatedVersion so the user will be prompted whether to make this version permanent.
updatedVersion = version; updatedVersion = version;
@ -146,13 +158,13 @@ public class DefaultPluginVersionManager
promptToPersist = false; promptToPersist = false;
} }
// final pass...retrieve the version for LATEST and also set that resolved version as the <useVersion/> // final pass...retrieve the version for RELEASE and also set that resolved version as the <useVersion/>
// in settings.xml. // in settings.xml.
if ( StringUtils.isEmpty( version ) ) if ( StringUtils.isEmpty( version ) )
{ {
// 1. resolve the version to be used // 1. resolve the version to be used
version = resolveMetaVersion( groupId, artifactId, project.getPluginArtifactRepositories(), version = resolveMetaVersion( groupId, artifactId, project.getPluginArtifactRepositories(),
localRepository, LatestArtifactTransformation.LATEST_VERSION ); localRepository, ReleaseArtifactTransformation.RELEASE_VERSION );
// 2. Set the updatedVersion so the user will be prompted whether to make this version permanent. // 2. Set the updatedVersion so the user will be prompted whether to make this version permanent.
updatedVersion = version; updatedVersion = version;
@ -169,73 +181,78 @@ public class DefaultPluginVersionManager
"Failed to resolve a valid version for this plugin" ); "Failed to resolve a valid version for this plugin" );
} }
// determine whether this build is running in interactive mode // if the plugin registry is inactive, then the rest of this goop is useless...
// If it's not, then we'll defer to the autoUpdate setting from the registry if ( settings.isUsePluginRegistry() )
// for a decision on updating the plugin in the registry...rather than prompting
// the user.
boolean inInteractiveMode = settings.isInteractiveMode();
// determines what should be done if we're in non-interactive mode.
// if true, then just update the registry with the new versions.
String s = getPluginRegistry( groupId, artifactId ).getAutoUpdate();
boolean autoUpdate = true;
if ( s != null )
{ {
autoUpdate = Boolean.valueOf( s ).booleanValue(); // determine whether this build is running in interactive mode
} // If it's not, then we'll defer to the autoUpdate setting from the registry
// for a decision on updating the plugin in the registry...rather than prompting
// the user.
boolean inInteractiveMode = settings.isInteractiveMode();
// We should persist by default if: // determines what should be done if we're in non-interactive mode.
// // if true, then just update the registry with the new versions.
// 0. RELEASE or LATEST was used to resolve the plugin version (it's not in the registry) String s = getPluginRegistry( groupId, artifactId ).getAutoUpdate();
// boolean autoUpdate = true;
// -OR- if ( s != null )
// {
// 1. we detected a change in the plugin version from what was in the registry, or autoUpdate = Boolean.valueOf( s ).booleanValue();
// a. the plugin is not registered }
// 2. the pluginUpdateOverride flag has NOT been set to Boolean.FALSE (suppression mode)
// 3. we're in interactive mode, or
// a. the registry is declared to be in autoUpdate mode
//
// NOTE: This is only the default value; it may be changed as the result of prompting the user.
boolean persistUpdate = forcePersist || ( promptToPersist && !Boolean.FALSE.equals( pluginUpdateOverride )
&& ( inInteractiveMode || autoUpdate ) );
// retrieve the apply-to-all flag, if it's been set previously. // We should persist by default if:
Boolean applyToAll = settings.getRuntimeInfo().getApplyToAllPluginUpdates(); //
// 0. RELEASE or LATEST was used to resolve the plugin version (it's not in the registry)
//
// -OR-
//
// 1. we detected a change in the plugin version from what was in the registry, or
// a. the plugin is not registered
// 2. the pluginUpdateOverride flag has NOT been set to Boolean.FALSE (suppression mode)
// 3. we're in interactive mode, or
// a. the registry is declared to be in autoUpdate mode
//
// NOTE: This is only the default value; it may be changed as the result of prompting the user.
boolean persistUpdate = forcePersist
|| ( promptToPersist && !Boolean.FALSE.equals( pluginUpdateOverride ) && ( inInteractiveMode || autoUpdate ) );
// Incorporate interactive-mode CLI overrides, and previous decisions on apply-to-all, if appropriate. // retrieve the apply-to-all flag, if it's been set previously.
// Boolean applyToAll = settings.getRuntimeInfo().getApplyToAllPluginUpdates();
// don't prompt if RELEASE or LATEST was used to resolve the plugin version
// don't prompt if not in interactive mode.
// don't prompt if the CLI pluginUpdateOverride is set (either suppression or force mode will stop prompting)
// don't prompt if the user has selected ALL/NONE previously in this session
//
// NOTE: We're incorporating here, to make the usages of this check more consistent and
// resistant to change.
promptToPersist = promptToPersist && pluginUpdateOverride == null && applyToAll == null && inInteractiveMode;
if ( promptToPersist ) // Incorporate interactive-mode CLI overrides, and previous decisions on apply-to-all, if appropriate.
{ //
persistUpdate = promptToPersistPluginUpdate( version, updatedVersion, groupId, artifactId, settings ); // don't prompt if RELEASE or LATEST was used to resolve the plugin version
} // don't prompt if not in interactive mode.
// don't prompt if the CLI pluginUpdateOverride is set (either suppression or force mode will stop prompting)
// don't prompt if the user has selected ALL/NONE previously in this session
//
// NOTE: We're incorporating here, to make the usages of this check more consistent and
// resistant to change.
promptToPersist = promptToPersist && pluginUpdateOverride == null && applyToAll == null
&& inInteractiveMode;
// if it is determined that we should use this version, persist it as useVersion. if ( promptToPersist )
// cases where this version will be persisted: {
// 1. the user is prompted and answers yes or all persistUpdate = promptToPersistPluginUpdate( version, updatedVersion, groupId, artifactId, settings );
// 2. the user has previously answered all in this session }
// 3. the build is running in non-interactive mode, and the registry setting is for auto-update
if ( !Boolean.FALSE.equals( applyToAll ) && persistUpdate )
{
updatePluginVersionInRegistry( groupId, artifactId, updatedVersion );
// we're using the updated version of the plugin in this session as well. // if it is determined that we should use this version, persist it as useVersion.
version = updatedVersion; // cases where this version will be persisted:
} // 1. the user is prompted and answers yes or all
// otherwise, if we prompted the user to update, we should treat this as a rejectedVersion, and // 2. the user has previously answered all in this session
// persist it iff the plugin pre-exists and is in the user-level registry. // 3. the build is running in non-interactive mode, and the registry setting is for auto-update
else if ( promptToPersist ) if ( !Boolean.FALSE.equals( applyToAll ) && persistUpdate )
{ {
addNewVersionToRejectedListInExisting( groupId, artifactId, updatedVersion ); updatePluginVersionInRegistry( groupId, artifactId, updatedVersion );
// we're using the updated version of the plugin in this session as well.
version = updatedVersion;
}
// otherwise, if we prompted the user to update, we should treat this as a rejectedVersion, and
// persist it iff the plugin pre-exists and is in the user-level registry.
else if ( promptToPersist )
{
addNewVersionToRejectedListInExisting( groupId, artifactId, updatedVersion );
}
} }
return version; return version;
@ -587,26 +604,26 @@ public class DefaultPluginVersionManager
} }
private String resolveMetaVersion( String groupId, String artifactId, List remoteRepositories, private String resolveMetaVersion( String groupId, String artifactId, List remoteRepositories,
ArtifactRepository localRepository, String metaVersionId ) ArtifactRepository localRepository, String metaVersionId )
throws PluginVersionResolutionException throws PluginVersionResolutionException
{ {
Artifact artifact = artifactFactory.createArtifact( groupId, artifactId, metaVersionId, Artifact artifact = artifactFactory.createArtifact( groupId, artifactId, metaVersionId, Artifact.SCOPE_RUNTIME,
Artifact.SCOPE_RUNTIME, "pom" ); "pom" );
MavenMetadataSource metadataSource = new MavenMetadataSource( artifactResolver, projectBuilder, artifactFactory ); MavenMetadataSource metadataSource = new MavenMetadataSource( artifactResolver, projectBuilder, artifactFactory );
String version = null; String version = null;
try try
{ {
metadataSource.retrieve( artifact, localRepository, remoteRepositories ); metadataSource.retrieve( artifact, localRepository, remoteRepositories );
version = artifact.getBaseVersion(); version = artifact.getVersion();
} }
catch ( ArtifactMetadataRetrievalException e ) catch ( ArtifactMetadataRetrievalException e )
{ {
getLogger().debug( "Failed to resolve " + metaVersionId + " version", e ); getLogger().debug( "Failed to resolve " + metaVersionId + " version", e );
} }
return version; return version;
} }

View File

@ -77,6 +77,12 @@
<type>String</type> <type>String</type>
<description>Specifies whether the user should be prompted to update plugins.</description> <description>Specifies whether the user should be prompted to update plugins.</description>
</field> </field>
<field>
<name>checkLatest</name>
<version>1.0.0</version>
<type>String</type>
<description>Whether to resolve plugin versions using LATEST metadata.</description>
</field>
<field> <field>
<name>plugins</name> <name>plugins</name>
<version>1.0.0</version> <version>1.0.0</version>

View File

@ -85,6 +85,13 @@
<type>boolean</type> <type>boolean</type>
<defaultValue>true</defaultValue> <defaultValue>true</defaultValue>
</field> </field>
<field>
<name>usePluginRegistry</name>
<version>1.0.0</version>
<description><![CDATA[Whether Maven should use the plugin-registry.xml file to manage plugin versions.]]></description>
<type>boolean</type>
<defaultValue>true</defaultValue>
</field>
<!-- [JC] Not ready to use yet, so I'm making if unavailable for now. --> <!-- [JC] Not ready to use yet, so I'm making if unavailable for now. -->
<!-- field> <!-- field>
<name>passwordStore</name> <name>passwordStore</name>

View File

@ -25,11 +25,17 @@ public class RuntimeInfo
private File file; private File file;
// using Boolean for 3VL (null for not-set, otherwise override with value)
private Boolean pluginUpdateForced; private Boolean pluginUpdateForced;
// using Boolean for 3VL (null, true-to-all, false-to-all) // using Boolean for 3VL (null, true-to-all, false-to-all)
private Boolean applyToAllPluginUpdates; private Boolean applyToAllPluginUpdates;
private boolean pluginRegistryActive = true;
// using Boolean for 3VL (null for not-set, otherwise override with value)
private Boolean checkLatest;
private Map activeProfileToSourceLevel = new HashMap(); private Map activeProfileToSourceLevel = new HashMap();
private String localRepositorySourceLevel = TrackableBase.USER_LEVEL; private String localRepositorySourceLevel = TrackableBase.USER_LEVEL;
@ -120,5 +126,15 @@ public class RuntimeInfo
{ {
return localRepositorySourceLevel; return localRepositorySourceLevel;
} }
public void setCheckLatestPluginVersion( Boolean checkLatest )
{
this.checkLatest = checkLatest;
}
public Boolean getCheckLatestPluginVersion()
{
return checkLatest;
}
} }