eclipse Maven 原型未出现在 m2eclipse Nexus 索引器中
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1874004/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Maven archetypes not appearing in m2eclipse Nexus indexer
提问by Ian Dickinson
I'm setting up a new workstation for Java development in Eclipse. On my previous machine, I don't recall having to do anything special to see the standard collection of archetypes under 'New > Other > Maven project > select archetype
' with Nexus Indexer selected. On this machine, the list of archetypes is empty. I can create archetype-based projects from the command line, so it's not a show-stopper, but I just don't understand why the archetypes are missing (and it makes me wonder what else is broken that I haven't noticed yet).
我正在为 Eclipse 中的 Java 开发设置一个新工作站。在我以前的机器上,我不记得必须做任何特别的事情才能在New > Other > Maven project > select archetype
选择了 Nexus Indexer 的情况下查看“ ”下的标准原型集合。在这台机器上,原型列表是空的。我可以从命令行创建基于原型的项目,所以它不是一个表演障碍,但我只是不明白为什么缺少原型(这让我想知道还有什么我还没有注意到的坏了) .
Eclipse 3.5.1, Sun JDK 1.6.0_17, m2Eclipse 0.9.8.200905041414
Eclipse 3.5.1、Sun JDK 1.6.0_17、m2Eclipse 0.9.8.200905041414
回答by Tim O'Brien
Ian, make sure you update to 0.9.9 (the update-dev). Open the Maven Repositories view in Eclipse (this is a new view only available in a recent build of m2eclipse). From here you will be able to right click on a particular remote repository and force a redownload.
Ian,确保您更新到 0.9.9(更新开发)。在 Eclipse 中打开 Maven Repositories 视图(这是一个新视图,仅在最近的 m2eclipse 版本中可用)。从这里您将能够右键单击特定的远程存储库并强制重新下载。
Once you do that, open up the console view and select "Maven Console", you should see m2eclipse printing out log messages detailing the index download. If it succeeded or failed.
完成此操作后,打开控制台视图并选择“Maven 控制台”,您应该会看到 m2eclipse 打印出详细说明索引下载的日志消息。如果成功或失败。
Good luck.
祝你好运。
回答by Pascal Thivent
Works fine here with the following configuration: Eclipse 3.5.1 20090920-1017, Sun JDK 6u16, m2eclipse 0.9.8.200905041414.
使用以下配置在这里工作正常:Eclipse 3.5.1 20090920-1017、Sun JDK 6u16、m2eclipse 0.9.8.200905041414。
alt text http://img13.imageshack.us/img13/126/screenshotnewmavenproje.png
替代文字 http://img13.imageshack.us/img13/126/screenshotnewmavenproje.png
Are you sure m2eclipse has finished downloading nexus-maven-repository-index.gz
from the maven central repository? Does this file looks "good"?
你确定 m2eclipse 已经nexus-maven-repository-index.gz
从 maven 中央存储库下载完成了吗?这个文件看起来“好”吗?
BTW, the index is stored in the plugin's metadata location which is <workspace root>/.metadata/.plugins/org.maven.ide.eclipse/nexus
. As workaround, you could maybe try to copy the index from the machine where everything works to this destination on the "buggy" machine. But this shouldn't be necessary, things should just work.
顺便说一句,索引存储在插件的元数据位置,即<workspace root>/.metadata/.plugins/org.maven.ide.eclipse/nexus
. 作为解决方法,您可以尝试将索引从一切正常的机器复制到“有问题的”机器上的这个目的地。但这不应该是必要的,事情应该可以正常工作。