Skip to content

Commit

Permalink
[Core] delete now obsolete nexus-cache directory
Browse files Browse the repository at this point in the history
  • Loading branch information
HannesWell authored and Hannes Wellmann committed Mar 14, 2022
1 parent 0bc433d commit a717e95
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion m2e-core-tests
Submodule m2e-core-tests updated 23 files
+0 −2 org.eclipse.m2e.tests/META-INF/MANIFEST.MF
+0 −24 org.eclipse.m2e.tests/projects/customrepo/pom.xml
+0 −7 org.eclipse.m2e.tests/projects/resourcefiltering/p009/.classpath
+0 −23 org.eclipse.m2e.tests/projects/resourcefiltering/p009/.project
+0 −57 org.eclipse.m2e.tests/projects/resourcefiltering/p009/pom.xml
+0 −41 org.eclipse.m2e.tests/projects/resourcefiltering/p009/pom_changed.xml
+0 −59 org.eclipse.m2e.tests/src/org/eclipse/m2e/tests/BuildPathManagerTest.java
+1 −1 org.eclipse.m2e.tests/src/org/eclipse/m2e/tests/archetype/ArchetypeManagerTest.java
+0 −21 org.eclipse.m2e.tests/src/org/eclipse/m2e/tests/internal/index/AbstractNexusIndexManagerTest.java
+0 −85 org.eclipse.m2e.tests/src/org/eclipse/m2e/tests/internal/index/IndexedArtifactTest.java
+0 −211 org.eclipse.m2e.tests/src/org/eclipse/m2e/tests/internal/index/NexusIndexManagerSearchTest.java
+0 −509 org.eclipse.m2e.tests/src/org/eclipse/m2e/tests/internal/index/NexusIndexManagerTest.java
+0 −17 org.eclipse.m2e.tests/src/org/eclipse/m2e/tests/internal/index/auth_settings.xml
+0 −45 org.eclipse.m2e.tests/src/org/eclipse/m2e/tests/internal/index/customremote_settings.xml
+0 −174 org.eclipse.m2e.tests/src/org/eclipse/m2e/tests/internal/index/filter/IndexFilterTest.java
+0 −57 org.eclipse.m2e.tests/src/org/eclipse/m2e/tests/internal/index/no_mirror_rso_settings.xml
+0 −57 org.eclipse.m2e.tests/src/org/eclipse/m2e/tests/internal/index/no_mirror_settings.xml
+0 −22 org.eclipse.m2e.tests/src/org/eclipse/m2e/tests/internal/index/nonProxyHosts_settings.xml
+0 −21 org.eclipse.m2e.tests/src/org/eclipse/m2e/tests/internal/index/proxy_settings.xml
+0 −43 org.eclipse.m2e.tests/src/org/eclipse/m2e/tests/internal/index/public_mirror_repo_settings.xml
+0 −53 org.eclipse.m2e.tests/src/org/eclipse/m2e/tests/internal/index/public_nonmirrored_repo_settings.xml
+0 −43 org.eclipse.m2e.tests/src/org/eclipse/m2e/tests/internal/index/public_settings.xml
+0 −82 org.eclipse.m2e.tests/src/org/eclipse/m2e/tests/util/search/IndexSearchEngineTest.java
1 change: 0 additions & 1 deletion org.eclipse.m2e.core/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ Export-Package: org.eclipse.m2e.core,
org.eclipse.m2e.core.internal.builder.plexusbuildapi;x-internal:=true,
org.eclipse.m2e.core.internal.content;x-internal:=true,
org.eclipse.m2e.core.internal.embedder;x-internal:=true,
org.eclipse.m2e.core.internal.equinox;x-internal:=true,
org.eclipse.m2e.core.internal.index;x-internal:=true,
org.eclipse.m2e.core.internal.index.filter;x-internal:=true,
org.eclipse.m2e.core.internal.jobs;x-internal:=true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Plugin;

Expand All @@ -51,6 +52,7 @@
import org.codehaus.plexus.PlexusContainer;
import org.codehaus.plexus.PlexusContainerException;
import org.codehaus.plexus.classworlds.ClassWorld;
import org.codehaus.plexus.util.FileUtils;

import org.apache.maven.archetype.ArchetypeGenerationRequest;
import org.apache.maven.archetype.common.ArchetypeArtifactManager;
Expand Down Expand Up @@ -252,6 +254,10 @@ public void start(final BundleContext context) throws Exception {
Map<String, Object> properties = Map.of(URLConstants.URL_HANDLER_PROTOCOL, new String[] {"mvn"});
this.protocolHandlerService = context.registerService(URLStreamHandlerService.class,
new MvnProtocolHandlerService(), FrameworkUtil.asDictionary(properties));

// Automatically delete now obsolete nexus cache (can be removed again if some time has passed and it is unlikely an old workspace that need to be cleaned up is used).
IPath nexusCache = Platform.getStateLocation(context.getBundle()).append("nexus");
FileUtils.deleteDirectory(nexusCache.toFile());
}

private DefaultPlexusContainer newPlexusContainer(ClassLoader cl) throws PlexusContainerException {
Expand Down

0 comments on commit a717e95

Please sign in to comment.