问题
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 3.5.1, Sun JDK 1.6.0_17, m2Eclipse 0.9.8.200905041414
回答1:
Works fine here with the following configuration: Eclipse 3.5.1 20090920-1017, Sun JDK 6u16, m2eclipse 0.9.8.200905041414.
alt text 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"?
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.
回答2:
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.
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.
Good luck.
来源:https://stackoverflow.com/questions/1874004/maven-archetypes-not-appearing-in-m2eclipse-nexus-indexer