我现在已经使用Tycho几个月了。但昨天我在用Tycho构建我的应用程序时遇到了一个问题。初看起来,它是一个失败的存储库。但今天我有同样的问题,不仅仅是一般的Eclipse 4.7回购,还有其他回购。
我在目标文件中使用这些存储库:
<repository location="http://download.eclipse.org/eclipse/updates/4.7/" />
<repository location="http://download.eclipse.org/technology/epp/packages/oxygen" />
<repository location="http://download.eclipse.org/nattable/releases/1.5.0/repository/"/>
<repository location="http://download.eclipse.org/releases/oxygen/"/>
<repository location="http://download.eclipse.org/nebula/snapshot/"/>
<repository location="http://download.eclipse.org/nebula/incubation/snapshot/"/>
<repository location="http://download.eclipse.org/nattable/snapshots/latest/repository/"/>
我在dev和构建服务器上构建它时遇到的错误是:
[ERROR] Failed to resolve target definition D:\Jenkins\workspace\Client Staging\neon\neon.target: Failed to load p2 metadata repository from location http://download.eclipse.org/eclipse/updates/4.7/: Unable to read repository at http://download.eclipse.org/eclipse/updates/4.7. HTTP Server 'Bad Gateway' : http://download.eclipse.org/eclipse/updates/4.7/R-4.7.3a-201803300640/content.xml.xz: HttpComponents connection error response code 502. -> [Help 1]
有人知道如何解决这个问题吗?我需要这个以自动方式构建我的应用程序并在不同的位置部署应用程序。
完整的Maven错误如下:
org.apache.maven.MavenExecutionException: Failed to resolve target definition C:\Users\test\Downloads\test\neon\neon.target: Failed to load p2 metadata repository from location http://download.eclipse.org/eclipse/updates/4.7/
at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:100)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:267)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.eclipse.tycho.core.shared.BuildFailureException: Failed to resolve target definition C:\Users\test\Downloads\test\neon\neon.target: Failed to load p2 metadata repository from location http://download.eclipse.org/eclipse/updates/4.7/
at org.eclipse.tycho.p2.target.TargetDefinitionResolver.resolveContent(TargetDefinitionResolver.java:99)
at org.eclipse.tycho.p2.target.TargetDefinitionResolverService.resolveFromArguments(TargetDefinitionResolverService.java:70)
at org.eclipse.tycho.p2.target.TargetDefinitionResolverService.getTargetDefinitionContent(TargetDefinitionResolverService.java:60)
at org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl.resolveTargetDefinitions(TargetPlatformFactoryImpl.java:214)
at org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl.createTargetPlatform(TargetPlatformFactoryImpl.java:155)
at org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl.createTargetPlatform(TargetPlatformFactoryImpl.java:128)
at org.eclipse.tycho.p2.target.TargetPlatformFactoryImpl.createTargetPlatform(TargetPlatformFactoryImpl.java:1)
at org.eclipse.tycho.p2.manager.ReactorRepositoryManagerImpl.computePreliminaryTargetPlatform(ReactorRepositoryManagerImpl.java:84)
at org.eclipse.tycho.p2.resolver.P2DependencyResolver.computePreliminaryTargetPlatform(P2DependencyResolver.java:223)
at org.eclipse.tycho.core.resolver.DefaultTychoResolver.resolveProject(DefaultTychoResolver.java:109)
at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:95)
... 14 more
Caused by: org.eclipse.tycho.p2.target.facade.TargetDefinitionResolutionException: Failed to load p2 metadata repository from location http://download.eclipse.org/eclipse/updates/4.7/
at org.eclipse.tycho.p2.target.TargetDefinitionResolver$LoadedIULocation.loadRepository(TargetDefinitionResolver.java:290)
at org.eclipse.tycho.p2.target.TargetDefinitionResolver$LoadedIULocation.<init>(TargetDefinitionResolver.java:282)
at org.eclipse.tycho.p2.target.TargetDefinitionResolver$ResolverRun.addLocation(TargetDefinitionResolver.java:154)
at org.eclipse.tycho.p2.target.TargetDefinitionResolver.resolveContentWithExceptions(TargetDefinitionResolver.java:121)
at org.eclipse.tycho.p2.target.TargetDefinitionResolver.resolveContent(TargetDefinitionResolver.java:94)
... 24 more
Caused by: org.eclipse.equinox.p2.core.ProvisionException: Unable to read repository at http://download.eclipse.org/eclipse/updates/4.7.
at org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository.addChild(CompositeMetadataRepository.java:185)
at org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository.<init>(CompositeMetadataRepository.java:106)
at org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepositoryFactory.load(CompositeMetadataRepositoryFactory.java:122)
at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.factoryLoad(MetadataRepositoryManager.java:57)
at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:768)
at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:668)
at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:96)
at org.eclipse.tycho.p2.remote.RemoteMetadataRepositoryManager.loadRepository(RemoteMetadataRepositoryManager.java:61)
at org.eclipse.tycho.p2.remote.RemoteMetadataRepositoryManager.loadRepository(RemoteMetadataRepositoryManager.java:53)
at org.eclipse.tycho.p2.target.TargetDefinitionResolver$LoadedIULocation.loadRepository(TargetDefinitionResolver.java:288)
... 28 more
Caused by: org.eclipse.equinox.p2.core.ProvisionException: HTTP Server 'Bad Gateway' : http://download.eclipse.org/eclipse/updates/4.7/R-4.7-201706120950/content.xml.xz
at org.eclipse.equinox.internal.p2.repository.CacheManager.updateCache(CacheManager.java:428)
at org.eclipse.equinox.internal.p2.repository.CacheManager.createCacheFromFile(CacheManager.java:132)
at org.eclipse.tycho.p2.remote.RemoteRepositoryCacheManager.createCacheFromFile(RemoteRepositoryCacheManager.java:85)
at org.eclipse.equinox.internal.p2.metadata.repository.XZedSimpleMetadataRepositoryFactory.getLocalFile(XZedSimpleMetadataRepositoryFactory.java:56)
at org.eclipse.equinox.internal.p2.metadata.repository.XZedSimpleMetadataRepositoryFactory.load(XZedSimpleMetadataRepositoryFactory.java:78)
at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.factoryLoad(MetadataRepositoryManager.java:57)
at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:768)
at org.eclipse.equinox.internal.p2.repository.helpers.AbstractRepositoryManager.loadRepository(AbstractRepositoryManager.java:668)
at org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager.loadRepository(MetadataRepositoryManager.java:96)
at org.eclipse.tycho.p2.remote.RemoteMetadataRepositoryManager.loadRepository(RemoteMetadataRepositoryManager.java:61)
at org.eclipse.tycho.p2.remote.RemoteMetadataRepositoryManager.loadRepository(RemoteMetadataRepositoryManager.java:53)
at org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository.addChild(CompositeMetadataRepository.java:166)
... 37 more
Caused by: org.eclipse.ecf.filetransfer.IncomingFileTransferException: HttpComponents connection error response code 502.
at org.eclipse.ecf.provider.filetransfer.httpclient4.HttpClientRetrieveFileTransfer.openStreams(HttpClientRetrieveFileTransfer.java:667)
at org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer.sendRetrieveRequest(AbstractRetrieveFileTransfer.java:885)
at org.eclipse.ecf.provider.filetransfer.retrieve.MultiProtocolRetrieveAdapter.sendRetrieveRequest(MultiProtocolRetrieveAdapter.java:146)
at org.eclipse.equinox.internal.p2.transport.ecf.FileReader.sendRetrieveRequest(FileReader.java:424)
at org.eclipse.equinox.internal.p2.transport.ecf.FileReader.readInto(FileReader.java:360)
at org.eclipse.equinox.internal.p2.transport.ecf.RepositoryTransport.download(RepositoryTransport.java:101)
at org.eclipse.equinox.internal.p2.transport.ecf.RepositoryTransport.download(RepositoryTransport.java:156)
at org.eclipse.equinox.internal.p2.repository.CacheManager.updateCache(CacheManager.java:402)
... 48 more
答案 0 :(得分:0)
问题是不稳定的p2存储库。没有改变任何事情,今天它工作得很好。