Drools:无法在远程Kie服务器上启动容器,因为“找不到工件...”。 [英] Drools: cannot start container on remote kie-server, for "Could not find artifact ..."

查看:351
本文介绍了Drools:无法在远程Kie服务器上启动容器,因为“找不到工件...”。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在安装了Drools Workbench和KIE服务器的服务器上,我编写了一个项目,并进行了构建和部署。另外,我可以在本地为其启动容器

On a server with drools workbench and KIE server both installed, I authored a project, and got it built and deployed. Also, I can start a container for it locally.

但是我无法在远程服务器上为其创建容器,并且在远程服务器上出现以下错误:

But I could not create a container for it on a remote server, and got the following error on remote server:

Unable to resolve artifact: testdrools:firstApplication:pom:1.3
org.eclipse.aether.resolution.ArtifactResolutionException: Could not find artifact testdrools:firstApplication:pom:1.3 in central (http://repo1.maven.org/maven2/)

由于对MAVEN的了解有限,我从,似乎是KIE服务器尝试解决的问题, testdrools:firstApplication:pom:1.3 的确存在,因为从* .jar文件中提取的pom.xml的一部分如下:

With the limited knowledge on MAVEN I learnt from this, it seems what the KIE server tries to resolve, "testdrools:firstApplication:pom:1.3", does exist, since part of the pom.xml extracted from *.jar file is as follows:

  <groupId>testdrools</groupId>
  <artifactId>firstApplication</artifactId>
  <version>1.3</version>
  <name>firstApplication</name>
  <build>
    <plugins>
      <plugin>
        <groupId>org.kie</groupId>
        <artifactId>kie-maven-plugin</artifactId>
        <version>6.2.0.Final</version>
        <extensions>true</extensions>
      </plugin>
    </plugins>
  </build>
</project>

有人可以给我任何关于为什么不能为此创建远程容器的提示情况

Could somebody give me any hint on why I can't create a remote container for this case?

我们找到了解决此问题的方法。尝试重现此问题时,我们再次出现错误:

We found a workaround for this problem. While trying to re-produce this problem, we got the error again:

Could not find artifact droolstest:droolsTestProj2:pom:1.1 in local (file:/root/.m2/repository/)

所以我们下载了 droolsTestProj2-工作台工件存储库中的 1.1.jar文件,并将其复制到 /root/.m2/repository/droolstest/droolsTestProj2/1.1。容器在刷新后启动。

So we downloaded the "droolsTestProj2-1.1.jar" file from artifact repository of workbench, and copy it to "/root/.m2/repository/droolstest/droolsTestProj2/1.1". Container started up after refreshing.

似乎工作台无法将* .jar文件发送到KIE服务器。请分享您对此的想法。

It seems workbench failed to send the *.jar file to KIE server. Share your ideas on this, please.

推荐答案

您可以尝试设置自定义的 settings.xml 将包含对本地存储库的引用?此存储库可以在工作台和Kie服务器之间共享。

Can you try to set a custom settings.xml which would contain reference to local repository? This repository can be shared between workbench and Kie server.

要设置自定义 settings.xml ,您需要定义在运行应用程序的容器中,系统属性 kie.maven.settings.custom

To set a custom settings.xml you need to define the system property "kie.maven.settings.custom" in containers where you run applications.

此属性应引用 settings.xml 文件的位置。在该文件中,您应该定义标签< localRepository> ,该标签将引用放置工作台和Kie服务器之间共享的本地存储库的目录。

This property should reference to location of your settings.xml file. In that file you should define tag <localRepository>, which will reference the directory where you will place the local repository shared between workbench and Kie server.

有关更多信息,请参见 Drools文档

For more info, see the Drools Documentation.

这篇关于Drools:无法在远程Kie服务器上启动容器,因为“找不到工件...”。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆