Monday, April 20, 2015

Solution for JBoss BPM Suite Maven Build Error

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!