Project build error: Unknown packaging: kjar
Project build error: Unknown packaging: kjar
从这里使用 Jbpm 6.4.0 完整安装程序:http://www.jbpm.org/download/download.html
开始演示:蚂蚁start.demo
使用 eclipse,从 jBPM playground 6.3 和 select 翻译项目创建一个新的 jBPM 项目
为项目添加maven性质
尝试 install/compile 您可以在问题选项卡上看到以下错误:
Project build error: Unknown packaging: kjar
问题是:什么是kjar包装?项目在演示环境中如何工作?
我的 Eclipse 是:
编辑:
我找到了关于什么是 kjar 的定义,特别是官方文档中的这一部分:
Version 6, on the other hand moves away from proprietary packages in
favor of, well known and mature, Apache Maven based packaging - known
as knowledge archives - kjar. Processes, rules etc (aka business
assets) are now part of a simple jar file built and managed by Maven.
Along the business assets, java classes and other file types are
stored in the jar file too. Moreover, as any other maven artifact,
kjar can have defined dependencies on other artifacts including other
kjars. What makes the kjar special when compared with regular jars is
a single descriptor file kept inside META-INF directory of the kjar -
kmodule.xml. That descriptor allows to define:
knowledge bases and their properties
knowledge sessions and their properties
work item handlers
event listeners
By default, this descriptor is empty (just kmodule root element) and
is considered as marker file. Whenever a runtime component (such as
jbpm console) is about to process kjar it looks up kmodule.xml to
build its runtime representation. In addition to kmodule.xml a
deployment descriptor (that provides fine graind control over
deployment) is available (since 6.1).
读完后不清楚如何构建这些 kjar 以及为什么 jbpm 的官方在线示例包含 kjar 作为打包值
¿您是否测试过评论该行是否有效?
只需注释第 8 行:
改变这个:
<packaging>kjar</packaging>
进入这个:
<!-- <packaging>kjar</packaging> -->
我不确定,但我认为代码和文档之间存在版本不匹配。我认为默认打包是jar,所以从配置中删除第8行就可以了。
这与以前称为 KIE Workbench 和现在的 Business Central 的项目建模环境兼容。在该设置中,kie-maven-plugin 已正确设置并且可以正常工作。
在大多数情况下,您不需要 kjar 和 maven 中的构建标签。
Business Central 作为 JBPM 的 Web 前端,处理打包和部署。然而,在不使用或不能使用 Business Central 的环境中,KJar 打包用于 Maven 构建(例如,从命令行构建或像 Eclipse 这样的 IDE。)
Maven使用kie-maven-plugin来组织、编译和打包资源。但是,kie-maven-plugin 似乎存在一些与状态相关的问题,因为我的项目不可靠地创建了 kjrar 和 jar;创建 kjar 的记录方法是使用 kie-maven-plugin:
<plugin>
<groupId>org.kie</groupId>
<artifactId>kie-maven-plugin</artifactId>
<version>${jbpm.version}</version>
<extensions>true</extensions>
...
<plugin>
插件配置中需要什么取决于您使用的 JBPM 资源。
从这里使用 Jbpm 6.4.0 完整安装程序:http://www.jbpm.org/download/download.html
开始演示:蚂蚁start.demo
使用 eclipse,从 jBPM playground 6.3 和 select 翻译项目创建一个新的 jBPM 项目
为项目添加maven性质
尝试 install/compile 您可以在问题选项卡上看到以下错误:
Project build error: Unknown packaging: kjar
问题是:什么是kjar包装?项目在演示环境中如何工作?
我的 Eclipse 是:
编辑:
我找到了关于什么是 kjar 的定义,特别是官方文档中的这一部分:
Version 6, on the other hand moves away from proprietary packages in favor of, well known and mature, Apache Maven based packaging - known as knowledge archives - kjar. Processes, rules etc (aka business assets) are now part of a simple jar file built and managed by Maven. Along the business assets, java classes and other file types are stored in the jar file too. Moreover, as any other maven artifact, kjar can have defined dependencies on other artifacts including other kjars. What makes the kjar special when compared with regular jars is a single descriptor file kept inside META-INF directory of the kjar - kmodule.xml. That descriptor allows to define:
knowledge bases and their properties
knowledge sessions and their properties
work item handlers
event listeners
By default, this descriptor is empty (just kmodule root element) and is considered as marker file. Whenever a runtime component (such as jbpm console) is about to process kjar it looks up kmodule.xml to build its runtime representation. In addition to kmodule.xml a deployment descriptor (that provides fine graind control over deployment) is available (since 6.1).
读完后不清楚如何构建这些 kjar 以及为什么 jbpm 的官方在线示例包含 kjar 作为打包值
¿您是否测试过评论该行是否有效? 只需注释第 8 行: 改变这个:
<packaging>kjar</packaging>
进入这个:
<!-- <packaging>kjar</packaging> -->
我不确定,但我认为代码和文档之间存在版本不匹配。我认为默认打包是jar,所以从配置中删除第8行就可以了。
这与以前称为 KIE Workbench 和现在的 Business Central 的项目建模环境兼容。在该设置中,kie-maven-plugin 已正确设置并且可以正常工作。
在大多数情况下,您不需要 kjar 和 maven 中的构建标签。
Business Central 作为 JBPM 的 Web 前端,处理打包和部署。然而,在不使用或不能使用 Business Central 的环境中,KJar 打包用于 Maven 构建(例如,从命令行构建或像 Eclipse 这样的 IDE。)
Maven使用kie-maven-plugin来组织、编译和打包资源。但是,kie-maven-plugin 似乎存在一些与状态相关的问题,因为我的项目不可靠地创建了 kjrar 和 jar;创建 kjar 的记录方法是使用 kie-maven-plugin:
<plugin>
<groupId>org.kie</groupId>
<artifactId>kie-maven-plugin</artifactId>
<version>${jbpm.version}</version>
<extensions>true</extensions>
...
<plugin>
插件配置中需要什么取决于您使用的 JBPM 资源。