我有这种类型的问题:
我已经将 Artifactory 配置为内部代理存储库,并且一切正常,除了现在我无法使用 m2Eclipse 向导创建新项目。
我以这种方式修改了 settings.xml:
<proxies>
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username></username>
<password></password>
<host>myproxymachine.mycompany.com</host>
<port>8080</port>
<nonProxyHosts>*.mycompany.com|127.0.0.1</nonProxyHosts>
</proxy>
</proxies>
<servers>
<server>
<username>user</username>
<password>pwd</password>
<id>central</id>
</server>
<server>
<username>user</username>
<password>pwd</password>
<id>snapshots</id>
</server>
<profile>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>libs-release</name>
<url>http://srvmmaven.mycompany.com:8081/artifactory/libs-release</url>
</repository>
<repository>
<snapshots />
<id>snapshots</id>
<name>libs-snapshot</name>
<url>http://srvmmaven.mycompany.com:8081/artifactory/libs-snapshot</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>repo</name>
<url>http://srvmmaven.mycompany.com:8081/artifactory/repo</url>
</pluginRepository>
<pluginRepository>
<snapshots />
<id>snapshots</id>
<name>repo</name>
<url>http://srvmmaven.mycompany.com:8081/artifactory/repo</url>
</pluginRepository>
</pluginRepositories>
<id>artifactory</id>
</profile>
<activeProfiles>
<activeProfile>artifactory</activeProfile>
</activeProfiles>
当我尝试创建一个新项目时,Eclipse 在尝试加载 Nexus 目录时崩溃。
这是堆栈跟踪:
!ENTRY org.eclipse.core.jobs 4 2 2013-03-27 10:16:19.803
!MESSAGE An internal error occurred during: "Retrieving archetypes:".
!STACK 0
java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.util.Arrays.copyOfRange(Unknown Source)
at java.lang.String.<init>(Unknown Source)
at org.apache.lucene.index.TermBuffer.toTerm(TermBuffer.java:122)
at org.apache.lucene.index.SegmentTermEnum.term(SegmentTermEnum.java:167)
at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:251)
at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:218)
at org.apache.lucene.index.SegmentTermDocs.seek(SegmentTermDocs.java:55)
at org.apache.lucene.index.MultiSegmentReader$MultiTermDocs.termDocs(MultiSegmentReader.java:608)
at org.apache.lucene.index.MultiSegmentReader$MultiTermDocs.next(MultiSegmentReader.java:559)
at org.apache.lucene.search.FieldCacheImpl$10.createValue(FieldCacheImpl.java:384)
at org.apache.lucene.search.FieldCacheImpl$Cache.get(FieldCacheImpl.java:71)
at org.apache.lucene.search.FieldCacheImpl.getStringIndex(FieldCacheImpl.java:351)
at org.apache.lucene.search.FieldSortedHitQueue.comparatorString(FieldSortedHitQueue.java:415)
at org.apache.lucene.search.FieldSortedHitQueue$1.createValue(FieldSortedHitQueue.java:206)
at org.apache.lucene.search.FieldCacheImpl$Cache.get(FieldCacheImpl.java:71)
at org.apache.lucene.search.FieldSortedHitQueue.getCachedComparator(FieldSortedHitQueue.java:167)
at org.apache.lucene.search.FieldSortedHitQueue.<init>(FieldSortedHitQueue.java:55)
at org.apache.lucene.search.TopFieldDocCollector.<init>(TopFieldDocCollector.java:43)
at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:121)
at org.apache.lucene.search.Hits.getMoreDocs(Hits.java:113)
at org.apache.lucene.search.Hits.<init>(Hits.java:90)
at org.apache.lucene.search.Searcher.search(Searcher.java:61)
at org.apache.maven.index.DefaultSearchEngine.searchFlat(DefaultSearchEngine.java:191)
at org.apache.maven.index.DefaultSearchEngine.searchFlatPaged(DefaultSearchEngine.java:111)
at org.apache.maven.index.DefaultSearchEngine.searchFlatPaged(DefaultSearchEngine.java:89)
at org.apache.maven.index.DefaultNexusIndexer.searchFlat(DefaultNexusIndexer.java:404)
at org.apache.maven.index.archetype.NexusArchetypeDataSource.getArchetypeCatalog(NexusArchetypeDataSource.java:67)
at org.eclipse.m2e.core.internal.archetype.ArchetypeCatalogFactory$NexusIndexerCatalogFactory.getArchetypeCatalog(ArchetypeCatalogFactory.java:87)
at org.eclipse.m2e.core.ui.internal.wizards.MavenProjectWizardArchetypePage.getArchetypesForCatalog(MavenProjectWizardArchetypePage.java:519)
at org.eclipse.m2e.core.ui.internal.wizards.MavenProjectWizardArchetypePage$15.run(MavenProjectWizardArchetypePage.java:557)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
如果我从命令行使用 Maven 创建一个新项目,一切正常。
我正在使用 Eclipse Indigo SR2 和 m2Eclipse 插件版本 1.3.1.20130219-1424
谢谢。