Introduction
This post is a solution for the error of: "package org.kie.api.definition.type does not exist".
If you google the error, you will get this page: https://access.redhat.com/solutions/892893. I could not find the direct solution. Thus I post the solution here
What Is The Issue?
If you work on the JBoss BPM Suite 6.1, you will see that all the source code is in git server, which in build in the JBoss BPM Suite. You can clone the GIT repository by the following commands: [Suppose you have created a git repository of "demo"
git init git clone git clone git://localhost:9418/demo
After you check out the code from the git repositroy [In my case, I have cloned the code to : ary2013@Guojiangs-MacBook-Pro:~/jBPMS/mygit/. And I have a project, named "Insurance". Now do the following:
/Users/Gary2013/jBPMS/mygit/demo/Insurance mvn clean install
You will see errors complaining something like:
[ERROR] /Users/Gary2013/jBPMS/mygit/demo/Insurance/src/main/java/com/ggl/insurance/InsuredObject.java:[7,29] package org.kie.api.definition.type does not exist
Fix The Error
To fix the error, you will need to add the following code to the pom.xml file:
4.0.0 com.ggl.insurance Insurance 1.0 kjar Insurance guvnor-m2-repo Guvnor M2 Repo http://localhost:8080/business-central/maven2/ org.kie kie-maven-plugin 6.0.3-redhat-4 true org.kie kie-api 6.1.0.Final
The section of dependencies are added. Now if you build the project, it will be successful!
I had visited your website which was really good,Actually we dealing
ReplyDeleteApplication Security Consulting
This comment has been removed by the author.
ReplyDelete
ReplyDelete<groupid>...</groupid> should be <groupId>...</groupId> with capital "i"
<artifactid>...</artifactid> should be <artifactId>...</artifactId> with capital "i"
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.quickstarts.brms</groupId>
<artifactId>helloworld-brms-kmodule</artifactId>
<version>1.0.0</version>
<name>Helloworld BRMS KModule</name>
<description>A KIE project or module is simply a Maven Java project or module; with an additional metadata file META-INF/kmodule.xml.</description>
<build>
<plugins>
<plugin>
<groupId>org.kie</groupId>
<artifactId>kie-maven-plugin</artifactId>
<version>6.2.0.Final</version>
<extensions>true</extensions>
<dependencies>
<dependency>
<groupId>org.jbpm</groupId>
<artifactId>jbpm-bpmn2</artifactId>
<version>6.2.0.Final</version>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-decisiontables</artifactId>
<version>6.2.0.Final</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-api</artifactId>
<version>6.2.0.Final</version>
</dependency>
</dependencies>
</project>