m2e无法使用Artifactory解析原型

时间:2013-03-27 09:51:44

标签: maven m2eclipse artifactory

我有这类问题:

我已将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

感谢。

1 个答案:

答案 0 :(得分:5)

为了保持Q&amp; A顺序,我会复制@ charlee-chitsuk回答:

因为它显示为java.lang.OutOfMemoryError: GC overhead limit exceeded。您可以尝试通过增加XmxXms来设置Eclipse VM Arguments,如wiki.eclipse.org/Eclipse.ini所述。