CodePudding user response:
Maven will reduce the library cache to the local disk, as long as your projects refer to the new library, can burn a piece of disk space, the default directory in the system directory ${user. Home}/./m2, it is easy to cause the system space is insufficient, but can put the Settings. The XML change, pointing to the other disk, such maven in build automatically search Settings. The XML point to the directory, such as:& lt; ? The XML version="1.0" encoding="utf-8"?>
& lt; Settings XMLNS="http://maven.apache.org/POM/4.0.0"
XMLNS: xsi="http://www.w3.org/2001/XMLSchema-instance"
Xsi: schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd" & gt;
& lt; ! - local repository, the value of building the system of local warehouse path, its default value is ${user. Home}/m2/repository, - & gt;
& lt; LocalRepository> D:/Java/m2/repository
& lt; ! - whether Maven need to interact with the user for input, if Maven need to interact with the user for input, is set to true, the opposite should be false, the default is true,, & gt;
& lt; InteractiveMode> True
& lt; ! - Maven if you need to use the plugin - registry. The XML file to manage the plugin version, - & gt;
& lt; ! - if set to true, then the {user. Home}/m2 needs a plugin - registry. The XML version of the plugin to manage & gt;
& lt; ! - the default is false, & gt;
& lt; UsePluginRegistry> False
& lt; ! - whether you need said Maven in offline mode, if the build system needs to be in offline mode, it is true, the default is false, - & gt;
& lt; ! - when due to network Settings or safety factors, the build server cannot connect to a remote warehouse, the configuration is very useful, - & gt;
& lt; Offline> False
& lt; ! - when the organization of the plug-in Id (groupId) does not explicitly provide, for the search plug-in group Id (groupId) list of - & gt;
& lt; ! - this element contains a list of pluginGroup elements, each element contains a group Id (groupId), - & gt;
& lt; ! - when we use a plugin, and not the command behavior which provide group Id (groupId), Maven will use this list, - & gt;
& lt; ! -- by default the list containing the org.. Apache maven. Plugins, - & gt;
& lt; PluginGroups>
& lt; ! - the organization of the plugin Id (groupId) - & gt;
& lt; PluginGroup> Org. Codehaus. Mojo
& lt;/pluginGroups>
& lt; ! - image list for warehouse list configuration download, - & gt;
& lt; Mirrors>
& lt; ! - download mirror, a given warehouse - & gt;
& lt; Mirror>
& lt; ! - the image of a unique identifier, id used to distinguish different mirror element, - & gt;
& lt; Id> Http_repo_maven_apache_org & lt;/id>
& lt; ! - the image name - & gt;
& lt; Name> The Main repo of maven in apache.org & lt;/name>
& lt; ! - the URL of the image, the build system will give priority to use the URL, rather than use the default server URL, - & gt;
& lt; Url> http://repo.maven.apache.org/maven2/
& lt; ! - the mirror server id, for example, if we want to set up a Maven central repository (http://repo1.maven.org/maven2) mirror, - & gt;
& lt; ! - you need to set the element into a central, it must be exactly the central and central warehouse id, - & gt;
& lt; MirrorOf> Central
& lt;/mirror>
& lt;/mirrors>
& lt;/settings>
CodePudding user response:
This. Under the cache files as the index, is that I visit the library under the index of jars?CodePudding user response:
Foreign BBS has examined the Stack Overflow, https://stackoverflow.com/questions/16442292/cleaning-maven-m2e-cache-directory/31869584, this magical. Cache, is actually for M2E this plugin, this is an Eclipse marven plug-in, used to index, and when we know only a dependence on an artifactID, to search the add dependence
Will use to the index, and the huge index has three backup, two of which are in the local repository. Cache, another existing in per - workspace,
Web link is the Eclipse Fundation website official explanation:
https://www.eclipse.org/lists/m2e-users/msg02486.html
Also note that m2e keeps the at further three copies of each repository index.
The what. Gz files downloaded from remote repositories. A Shared
Lucene instance, informs the to optimize the time spent processing gz files. And
Per - workspace lucene indexes. The first two are stored under local
Repository. M2e/cache directory, the last one is per - the workspace.