我有一个Kie drools workbench 6.4.0.Final在Tomcat 7服务器上运行的实例。我无法通过工作台UI向项目添加依赖项。例如,如果我尝试包含Drools Swimming Pool Model,就像user guide中所做的那样,应用程序无法加载存储库包。
检查我的Catalina日志我看到以下警告:
Nov 25, 2016 2:34:11 PM org.kie.scanner.MavenRepository resolveArtifact
WARNING: Unable to resolve artifact: org.chtijbug.drools:drools-framework-swimming-pool-model:2.0.3
我还注意到一些与此类似的错误:
SEVERE: Unable to create MavenProject from InputStream
org.kie.scanner.embedder.MavenEmbedderException: Failed to read artifact descriptor for junit:junit:jar:4.12
at org.kie.scanner.embedder.MavenEmbedder.readProject(MavenEmbedder.java:298)
at org.kie.scanner.embedder.MavenProjectLoader.parseMavenPom(MavenProjectLoader.java:62)
at org.kie.scanner.embedder.MavenProjectLoader.parseMavenPom(MavenProjectLoader.java:55)
at org.kie.scanner.MavenPomModelGenerator.parse(MavenPomModelGenerator.java:33)
at org.drools.compiler.kproject.xml.PomModel$Parser.parse(PomModel.java:110)
at org.drools.compiler.kie.builder.impl.AbstractKieModule.getPomModel(AbstractKieModule.java:436)
at org.drools.compiler.kie.builder.impl.AbstractKieModule.getJarDependencies(AbstractKieModule.java:130)
at org.kie.scanner.MavenClassLoaderResolver.getClassLoader(MavenClassLoaderResolver.java:65)
at org.drools.compiler.kie.builder.impl.KieModuleKieProject.<init>(KieModuleKieProject.java:68)
at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:188)
at org.drools.compiler.kie.builder.impl.KieServicesImpl.newKieContainer(KieServicesImpl.java:172)
at org.jbpm.kie.services.impl.KModuleDeploymentService.deploy(KModuleDeploymentService.java:136)
at org.jbpm.services.cdi.impl.DeploymentServiceCDIImpl$Proxy$_$$_WeldClientProxy.deploy(DeploymentServiceCDIImpl$Proxy$_$$_WeldClientProxy.java)
at org.jbpm.console.ng.bd.backend.server.DeploymentManagerEntryPointImpl.initDeployments(DeploymentManagerEntryPointImpl.java:128)
at org.jbpm.console.ng.bd.backend.server.DeploymentManagerEntryPointImpl$Proxy$_$$_WeldClientProxy.initDeployments(DeploymentManagerEntryPointImpl$Proxy$_$$_WeldClientProxy.java)
at org.jbpm.console.ng.bd.backend.server.AdministrationServiceImpl.bootstrapDeployments(AdministrationServiceImpl.java:194)
at org.jbpm.console.ng.bd.backend.server.AdministrationServiceImpl$Proxy$_$$_WeldClientProxy.bootstrapDeployments(AdministrationServiceImpl$Proxy$_$$_WeldClientProxy.java)
at org.kie.workbench.drools.backend.server.AppSetup.assertPlayground(AppSetup.java:190)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:267)
at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:273)
at org.jboss.weld.introspector.jlr.WeldMethodImpl.invoke(WeldMethodImpl.java:168)
at org.jboss.weld.bean.AbstractClassBean.defaultPostConstruct(AbstractClassBean.java:363)
at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.postConstruct(ManagedBean.java:178)
at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:298)
at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:104)
at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:90)
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:79)
at org.kie.workbench.drools.backend.server.AppSetup$Proxy$_$$_WeldClientProxy.toString(AppSetup$Proxy$_$$_WeldClientProxy.java)
at org.uberfire.backend.server.cdi.SystemConfigProducer.runPostConstruct(SystemConfigProducer.java:162)
at org.uberfire.backend.server.cdi.SystemConfigProducer.afterDeploymentValidation(SystemConfigProducer.java:143)
at org.uberfire.backend.server.cdi.SystemConfigProducer$Proxy$_$$_WeldClientProxy.afterDeploymentValidation(SystemConfigProducer$Proxy$_$$_WeldClientProxy.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:267)
at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:273)
at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:164)
at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:51)
at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:163)
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:245)
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:233)
at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:213)
at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:75)
at org.jboss.weld.bootstrap.events.AbstractDeploymentContainerEvent.fire(AbstractDeploymentContainerEvent.java:46)
at org.jboss.weld.bootstrap.events.AfterDeploymentValidationImpl.fire(AfterDeploymentValidationImpl.java:31)
at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:382)
at org.jboss.weld.environment.servlet.Listener.contextInitialized(Listener.java:182)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5118)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5634)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1092)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1984)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for junit:junit:jar:4.12
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:302)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:217)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.resolveCachedArtifactDescriptor(DefaultDependencyCollector.java:525)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.getArtifactDescriptorResult(DefaultDependencyCollector.java:509)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:409)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:363)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.process(DefaultDependencyCollector.java:351)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:254)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:316)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:172)
at org.apache.maven.project.DefaultProjectBuilder.resolveDependencies(DefaultProjectBuilder.java:213)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:186)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:124)
at org.kie.scanner.embedder.MavenEmbedder.readProject(MavenEmbedder.java:293)
... 68 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Could not transfer artifact junit:junit:pom:4.12 from/to central (https://repo.maven.apache.org/maven2): connect timed out
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:287)
... 81 more
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact junit:junit:pom:4.12 from/to central (https://repo.maven.apache.org/maven2): connect timed out
at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:43)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:355)
at org.eclipse.aether.util.concurrency.RunnableErrorForwarder$1.run(RunnableErrorForwarder.java:67)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:581)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:249)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
... 84 more
Caused by: java.net.SocketTimeoutException: connect timed out
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.security.ssl.SSLSocketImpl.connect(Unknown Source)
at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:524)
at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:403)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:177)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:304)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:863)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57)
at org.apache.http.impl.client.DecompressingHttpClient.execute(DecompressingHttpClient.java:158)
at org.eclipse.aether.transport.http.HttpTransporter.execute(HttpTransporter.java:279)
at org.eclipse.aether.transport.http.HttpTransporter.implGet(HttpTransporter.java:235)
at org.eclipse.aether.spi.connector.transport.AbstractTransporter.get(AbstractTransporter.java:59)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$GetTaskRunner.runTask(BasicRepositoryConnector.java:447)
at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:350)
... 89 more
Nov 25, 2016 8:25:55 AM org.kie.scanner.embedder.MavenProjectLoader parseMavenPom
SEVERE: Unable to create MavenProject from InputStream
org.kie.scanner.embedder.MavenEmbedderException: Failed to read artifact descriptor for junit:junit:jar:4.12
at org.kie.scanner.embedder.MavenEmbedder.readProject(MavenEmbedder.java:298)
at org.kie.scanner.embedder.MavenProjectLoader.parseMavenPom(MavenProjectLoader.java:62)
at org.kie.scanner.embedder.MavenProjectLoader.parseMavenPom(MavenProjectLoader.java:55)
at org.kie.scanner.MavenPomModelGenerator.parse(MavenPomModelGenerator.java:33)
at org.drools.compiler.kproject.xml.PomModel$Parser.parse(PomModel.java:110)
at org.drools.compiler.kie.builder.impl.AbstractKieModule.getPomModel(AbstractKieModule.java:436)
at org.drools.compiler.kie.builder.impl.AbstractKieModule.getJarDependencies(AbstractKieModule.java:130)
at org.jbpm.kie.services.impl.KModuleDeploymentService.deploy(KModuleDeploymentService.java:179)
at org.jbpm.services.cdi.impl.DeploymentServiceCDIImpl$Proxy$_$$_WeldClientProxy.deploy(DeploymentServiceCDIImpl$Proxy$_$$_WeldClientProxy.java)
at org.jbpm.console.ng.bd.backend.server.DeploymentManagerEntryPointImpl.initDeployments(DeploymentManagerEntryPointImpl.java:128)
at org.jbpm.console.ng.bd.backend.server.DeploymentManagerEntryPointImpl$Proxy$_$$_WeldClientProxy.initDeployments(DeploymentManagerEntryPointImpl$Proxy$_$$_WeldClientProxy.java)
at org.jbpm.console.ng.bd.backend.server.AdministrationServiceImpl.bootstrapDeployments(AdministrationServiceImpl.java:194)
at org.jbpm.console.ng.bd.backend.server.AdministrationServiceImpl$Proxy$_$$_WeldClientProxy.bootstrapDeployments(AdministrationServiceImpl$Proxy$_$$_WeldClientProxy.java)
at org.kie.workbench.drools.backend.server.AppSetup.assertPlayground(AppSetup.java:190)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:267)
at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:273)
at org.jboss.weld.introspector.jlr.WeldMethodImpl.invoke(WeldMethodImpl.java:168)
at org.jboss.weld.bean.AbstractClassBean.defaultPostConstruct(AbstractClassBean.java:363)
at org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.postConstruct(ManagedBean.java:178)
at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:298)
at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:104)
at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:90)
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:79)
at org.kie.workbench.drools.backend.server.AppSetup$Proxy$_$$_WeldClientProxy.toString(AppSetup$Proxy$_$$_WeldClientProxy.java)
at org.uberfire.backend.server.cdi.SystemConfigProducer.runPostConstruct(SystemConfigProducer.java:162)
at org.uberfire.backend.server.cdi.SystemConfigProducer.afterDeploymentValidation(SystemConfigProducer.java:143)
at org.uberfire.backend.server.cdi.SystemConfigProducer$Proxy$_$$_WeldClientProxy.afterDeploymentValidation(SystemConfigProducer$Proxy$_$$_WeldClientProxy.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:267)
at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)
at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)
at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:273)
at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:164)
at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:51)
at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:163)
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:245)
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:233)
at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:213)
at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:75)
at org.jboss.weld.bootstrap.events.AbstractDeploymentContainerEvent.fire(AbstractDeploymentContainerEvent.java:46)
at org.jboss.weld.bootstrap.events.AfterDeploymentValidationImpl.fire(AfterDeploymentValidationImpl.java:31)
at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:382)
at org.jboss.weld.environment.servlet.Listener.contextInitialized(Listener.java:182)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5118)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5634)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1092)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1984)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for junit:junit:jar:4.12
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:302)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:217)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.resolveCachedArtifactDescriptor(DefaultDependencyCollector.java:525)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.getArtifactDescriptorResult(DefaultDependencyCollector.java:509)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:409)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.processDependency(DefaultDependencyCollector.java:363)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.process(DefaultDependencyCollector.java:351)
at org.eclipse.aether.internal.impl.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:254)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:316)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:172)
at org.apache.maven.project.DefaultProjectBuilder.resolveDependencies(DefaultProjectBuilder.java:213)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:186)
at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:124)
at org.kie.scanner.embedder.MavenEmbedder.readProject(MavenEmbedder.java:293)
... 64 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Failure to transfer junit:junit:pom:4.12 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact junit:junit:pom:4.12 from/to central (https://repo.maven.apache.org/maven2): connect timed out
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:287)
... 77 more
Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Failure to transfer junit:junit:pom:4.12 from https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact junit:junit:pom:4.12 from/to central (https://repo.maven.apache.org/maven2): connect timed out
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:238)
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:206)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:585)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:503)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:421)
... 80 more
当我添加依赖项时,Maven能够在本地项目中解析游泳池模型:
<dependency>
<groupId>org.chtijbug.drools</groupId>
<artifactId>drools-framework-swimming-pool-model</artifactId>
<version>2.0.3</version>
</dependency>
到它的pom.xml
我在Tomcat的Java选项中设置了我的代理集:
-Dhttp.proxyHost=proxy_server
-Dhttp.proxyPort=8080
是否有任何可能会丢失的Drools或Maven配置会阻止Maven解析依赖关系?
新信息
经过一些实验,我意识到当不使用代理服务器时,工作台能够解析依赖关系。似乎与遇到的问题类似here。我的代理服务器已在settings.xml中设置:
<proxies>
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>proxy_server</host>
<port>8080</port>
<nonProxyHosts>127.0.0.1</nonProxyHosts>
</proxy>
这些设置适用于我的Java项目。如上所述,我在Tomcat中为我的代理服务器设置了Java选项。是否有其他工作台或Tomcat配置可以允许Workbench解决代理后面的依赖关系?
答案 0 :(得分:0)
我可能缺少任何Drools或Maven配置吗? 会阻止Maven解决依赖关系吗?
如果有任何一种解释可以帮助您解决这个问题:
列出所需的依赖项是正常的Maven配置;这就是你发现这项工作的原因:
Maven能够解决当地项目中的游泳池模型 当我添加依赖项时:
因此,将KWB项目所需的每个外部依赖项添加到KWB项目的pom.xml中。
在找不到工件后,Maven会在再次检查之前超时。来自运行的此日志消息指出:
来自https://repo.maven.apache.org/maven2的缓存在本地 存储库,在更新之前不会重新尝试解析 中心间隔已经过去或强制更新。
您可以手动使缓存过期,但这取决于您的其他工具。例如,如果只有Maven并从命令行运行,请使用“-U”选项;但是,KWB使用嵌入式Maven,因此最简单的方法是在本地仓库中手动删除相应工件的maven-metadata- *文件。如果使用Nexus等工件管理器,请使用其UI选项使代理存储库的缓存失效。
我不确定Tomcat代理设置是否有帮助/需要,因为我不知道您的配置。但是,我会在没有它们的情况下进行测试,以确保它们不会干扰。
你有像Nexus这样的工件经理吗?如果是,则相应地配置.m2 / settings.xml以使Maven使用它。