brett 2004/11/10 01:20:47 Modified: src/java/org/apache/maven/plugin Tag: MAVEN-1_0-BRANCH PluginCacheManager.java PluginManager.java xdocs Tag: MAVEN-1_0-BRANCH changes.xml Log: plugin cache bugfix Revision Changes Path No revision No revision 1.16.4.19 +6 -0 maven/src/java/org/apache/maven/plugin/PluginCacheManager.java Index: PluginCacheManager.java =================================================================== RCS file: /home/cvs/maven/src/java/org/apache/maven/plugin/PluginCacheManager.java,v retrieving revision 1.16.4.18 retrieving revision 1.16.4.19 diff -u -r1.16.4.18 -r1.16.4.19 --- PluginCacheManager.java 30 Jun 2004 11:59:50 -0000 1.16.4.18 +++ PluginCacheManager.java 10 Nov 2004 09:20:46 -0000 1.16.4.19 @@ -440,6 +440,11 @@ sessionLog.debug( "removing dynatag dependency cache entry" ); pluginDynaTagDepsCache.remove( pluginName ); } + if ( artifactIdCache.containsKey( pluginName ) ) + { + sessionLog.debug( "removing artifactId cache entry" ); + artifactIdCache.remove( pluginName ); + } dirty = true; } @@ -460,6 +465,7 @@ sessionLog.error( "plugin " + pluginName + " is cached (" + desc + ") but no longer valid" ); return null; } + return housing; } 1.70.4.61 +15 -6 maven/src/java/org/apache/maven/plugin/PluginManager.java Index: PluginManager.java =================================================================== RCS file: /home/cvs/maven/src/java/org/apache/maven/plugin/PluginManager.java,v retrieving revision 1.70.4.60 retrieving revision 1.70.4.61 diff -u -r1.70.4.60 -r1.70.4.61 --- PluginManager.java 8 Nov 2004 08:22:24 -0000 1.70.4.60 +++ PluginManager.java 10 Nov 2004 09:20:46 -0000 1.70.4.61 @@ -283,10 +283,10 @@ pluginFiles.putAll( userPluginFiles ); } - Map pluginDirs = expandPluginFiles( pluginFiles ); - cacheManager.loadCache( unpackedPluginsDir ); + Map pluginDirs = expandPluginFiles( pluginFiles ); + log.debug( "Now mapping cached plugins" ); if ( !cacheManager.mapPlugins( mapper, this, pluginDirs ) ) { @@ -315,7 +315,11 @@ { String name = (String) i.next(); File jarFile = (File) pluginFiles.get( name ); - File dir = jarFile.isDirectory() ? jarFile : unpackPlugin( name, jarFile ); + File dir = jarFile; + if ( !dir.isDirectory() ) + { + dir = unpackPlugin( name, jarFile, true ); + } pluginDirs.put( name, dir ); } return pluginDirs; @@ -880,7 +884,7 @@ } // expand it - File unpackedPluginDir = unpackPlugin( pluginName, file ); + File unpackedPluginDir = unpackPlugin( pluginName, file, cache ); if ( unpackedPluginDir != null ) { JellyScriptHousing housing = createLazyPluginHousing( unpackedPluginDir ); @@ -1036,7 +1040,7 @@ * * @throws MavenException if there was a problem unpacking */ - File unpackPlugin( String pluginName, File jarFile ) throws MavenException + File unpackPlugin( String pluginName, File jarFile, boolean cache ) throws MavenException { File unzipDir = new File( unpackedPluginsDir, pluginName ); @@ -1047,6 +1051,11 @@ if ( log.isDebugEnabled() ) { log.debug( "Unpacking " + jarFile.getName() + " to directory --> " + unzipDir.getAbsolutePath() ); + } + + if ( cache ) + { + cacheManager.invalidateCache( pluginName ); } try No revision No revision 1.14.4.50 +1 -0 maven/xdocs/changes.xml Index: changes.xml =================================================================== RCS file: /home/cvs/maven/xdocs/changes.xml,v retrieving revision 1.14.4.49 retrieving revision 1.14.4.50 diff -u -r1.14.4.49 -r1.14.4.50 --- changes.xml 8 Nov 2004 08:22:24 -0000 1.14.4.49 +++ changes.xml 10 Nov 2004 09:20:47 -0000 1.14.4.50 @@ -25,6 +25,7 @@ </properties> <body> <release version="1.0.1-SNAPSHOT" date="in CVS MAVEN-1_0-BRANCH"> + <action dev="brett" type="fix">Ensure plugin:install correctly refreshes the cache when the plugin with the same version was previously installed</action> <action dev="brett" type="fix" issue="MAVEN-1471">Move dependency verification until the point where the project is in a consistent state, so that the reactor succeeds when ignoreFailures is true</action> <action dev="brett" type="fix">Upgrade to Ant Tag Library 1.0 to avoid an error when the ant project is in a certain state</action> <action dev="brett" type="fix" issue="MAVEN-1427">Improve plugin dependency handling by removing old plugins before using a different version</action>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]