How to deploy drools project jar without workbench and create/start container

3,409 views
Skip to first unread message

Vijay Kumar

unread,
Nov 1, 2016, 4:28:30 PM11/1/16
to Drools Setup

Hi,

I have created Drools project using eclipse and deployed .jar file using kie workbench and created container using the same artifacts. The REST API call (GET/POST) working fine using postman rest client.

Ā 

Now I want to use only kie- server without workbench. Could you please suggest how to deploy the jar file and how to create and start container for REST API call? Is it any link or document available?


Thanks & Regards,

VJ

Maciej Swiderski

unread,
Nov 2, 2016, 3:29:20 AM11/2/16
to drools...@googlegroups.com
kjar must be in maven repository that kie server can access. So it might be as simple as your local maven repo (~/.m2/repository) or it could use some external repo. Once you have that, look at the documentation of kie server that defines how to create containers:https://docs.jboss.org/drools/release/6.5.0.Final/drools-docs/html/ch22.html#d0e24914

Maciej

--
You received this message because you are subscribed to the Google Groups "Drools Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup+unsubscribe@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-setup/8adde7cc-5ddc-4991-82d8-7e4b37bb839c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vijay Kumar

unread,
Nov 3, 2016, 1:42:04 PM11/3/16
to Drools Setup
Thanks a lot Maciej.

I am developing rules as a drools project in Eclipse. but I don't find any option to export as .kjar although other options like jar/war are available.
Could you please suggest how to export drools project as .kjar.

Thanks!!


On Wednesday, November 2, 2016 at 3:29:20 AM UTC-4, Maciej Swiderski wrote:
kjar must be in maven repository that kie server can access. So it might be as simple as your local maven repo (~/.m2/repository) or it could use some external repo. Once you have that, look at the documentation of kie server that defines how to create containers:https://docs.jboss.org/drools/release/6.5.0.Final/drools-docs/html/ch22.html#d0e24914

Maciej
2016-11-01 21:28 GMT+01:00 Vijay Kumar <vijay.br...@gmail.com>:

Hi,

I have created Drools project using eclipse and deployed .jar file using kie workbench and created container using the same artifacts. The REST API call (GET/POST) working fine using postman rest client.

Ā 

Now I want to use only kie- server without workbench. Could you please suggest how to deploy the jar file and how to create and start container for REST API call? Is it any link or document available?


Thanks & Regards,

VJ

--
You received this message because you are subscribed to the Google Groups "Drools Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup...@googlegroups.com.

Maciej Swiderski

unread,
Nov 4, 2016, 1:08:39 AM11/4/16
to drools...@googlegroups.com
Recommended is to use maven as it will then provide all information to runtime. If you can't use maven then export it as jarĀ 

MaciejĀ 

David Goldstein

unread,
Jan 26, 2017, 3:57:50 PM1/26/17
to Drools Setup
I am having a similar issue; I am not running a kieserver but have the kjar in my maven repo via:

Ā mvn install:install-file -Dfile=c:\Users\david.goldstein\workspace\eligibility-review-rules\validate-0.1.jar -DgroupId=com.david -DartifactId=validate -Dversion=0.1 -Dpackaging=jar

which I can see in my .m2 (local repository).

When I reference it:

Ā Ā  ReleaseId releaseId = ks.newReleaseId( "com.david", "validate", "0.1" );

I getĀ 

java.lang.RuntimeException: Cannot find KieModule: com.david:validate:0.1

Is running a kieserver a requirement? Ā The default kjar (ie first) on the classpath can be found, but not this one specified by release id. Ā I have even added the kjar as a dependency on the program using it.

I appreciate any thoughts you have!

David

Abhijit Humbe

unread,
Jan 27, 2017, 12:15:48 AM1/27/17
to drools...@googlegroups.com
Looks like you are using drools in embedded mode. To load kjar from maven repository you have to specify project dependency on org.kie:kie-ci artifact. Try with this approach.

Abhijit Humbe

--
You received this message because you are subscribed to the Google Groups "Drools Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup+unsubscribe@googlegroups.com.

To post to this group, send email to drools...@googlegroups.com.

Abhinav Yadav

unread,
May 29, 2017, 10:20:57 AM5/29/17
to Drools Setup
Hello Maciej

I get that it can be downloaded separately as a separate jar. However, the workbench is not very user friendly when it comes to ease of access of this functionality. Can you please guide me as to how I can convert an existing project/repo to jar, such that I can use it in other projects?

Regards
AbhinavĀ 

Maciej Swiderski

unread,
May 30, 2017, 3:09:40 AM5/30/17
to drools...@googlegroups.com
this depends what do you use as build tool for your code.Ā 

Maciej

Abhinav Yadav

unread,
May 30, 2017, 6:09:27 AM5/30/17
to Drools Setup
@Maciej

I am not able to download it as a separate JAR from the workbench. Also, I don't want to use kjar but JAR. And to answer your question, the build tool I am using is Maven.

Regards
Abhinav

Maciej Swiderski

unread,
May 30, 2017, 3:57:54 PM5/30/17
to drools...@googlegroups.com
you can export project from workbench project explorer screen


Maciej
Reply all
Reply to author
Forward
0 new messages