缓存在m2eclipse中的存储库索引

缓存在m2eclipse中的存储库索引

本文介绍了缓存在m2eclipse中的存储库索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次我从一个新的工作区开始,m2eclipse从maven中央存储库下载nexus-maven-repository-index.gz。
这是好的。
但是,
有些时候,我只想启动一个新的工作区,而不是等待下载,
它尝试将整个.metadata目录从旧工作区复制到新的工作区,
但是maven工件列表仍然是空的。
有没有办法我可以缓存?
或至少下载一次文件,并复制/提取/重新包装它,以便m2eclipse认为它已经下载它,并允许我搜索maven工件。



或一个简短版本的问题
哪里和什么格式的nexus-maven-repository-index.gz文件存储在工作区?

解决方案

索引存储在插件的元数据位置,即

  [workspace root] /。metadata / .plugins / org.maven.ide.eclipse / nexus 

将会有用于每个远程存储库索引的一个文件夹。



您可以将插件配置为在启动时不下载索引。得到窗口 - >首选项 - > Maven并取消选中启动时下载存储库索引,您必须记住重新启动它以获取任何更新,但



更新:
我刚刚验证复制元数据是否正常。 M2Eclipse 将仍然联系到存储库下载三角形(假设上面的选项被检查),但只需要一些时间,因为它只是下载三角形。


everytime i start with a fresh new workspace, m2eclipse downloads nexus-maven-repository-index.gz from the maven central repository.this is good.but,some times, i just want to start a new workspace, and not wait for it to download,it tried copying the whole .metadata directory from an old workspace to the new one,but the list of maven artifacts are still empty.is there a way i can cache it?or at least download the file once, and the copy/extract/repackage it so that m2eclipse thinks it has already downloaded it and allows me to search for maven artifacts.

or a short version of the questionwhere and in what format is the "nexus-maven-repository-index.gz" file stored in the workspace?

解决方案

The index is stored in the plugin's metadata location, i.e.

[workspace root]/.metadata/.plugins/org.maven.ide.eclipse/nexus

There will be one folder for each remote repository index in use.

You can configure the plugin to not download the index at startup too. Got to Window->Preferences->Maven and uncheck Download repository indexes at startup, you'll have to remember to reactivate it to get any updates though

Update:I just verified that copying the metadata works. M2Eclipse will still contact the repository to download the deltas (assuming the above option is checked), but that only takes a few moments as it is only downloading the deltas.

这篇关于缓存在m2eclipse中的存储库索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 07:34