简体   繁体   中英

How to move Nexus maven repository index (nexus-maven-repository-index) to other directory (not temp)

I am using laptop with limited disk space and therefore I would like to move Nexus Maven repository index (automatically generated directory or file with name nexus-maven-repository-index.gz8276.dir or something like this) from its default location of application temp directory (eg Windows Vista has it at C:\\Users\\\\AppData\\Local\\Temp) to custom locataion. I have already use Maven repository from the external HDD and it would be nice to have repository there as well.

How to configure (and what to configure) to disable automatic indexing or to ask, that index should be stored in specified directory.

I can prevent indexing from Netbeans by selecting 'Index update frequence' - Never (Tools - Options - Misellaneous - Maven).

In Eclipse I have uncheked 'Window - Preferences - Maven - Download repository index updates on startup' (I am using Spring Tool Suite and sometimes also older Eclipse Juno), but this is of no help.

From time to time something is creating index in Temp directory and it consumes a lot of HDD space (it grows to GB and more).

You can disable downloading remote indexes and disable search for the repository, which will reduce the size of the index. Otherwise I would suggest to just relocate the whole sonatype-work directory to a location where you have more room. Beyond that you can use the scheduled task to clean out unused artifacts from the repo to reduce storage. And make sure to clean up logs and such.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM