Drools 6.4.0-Final - Custom maven repositories for rules authoring

1,421 views
Skip to first unread message

Nizam

unread,
Aug 8, 2016, 4:54:42 PM8/8/16
to Drools Setup
Hi,
          I am trying to host the rules authored through work bench , when built and deployed to go to custom repositories instead of default repositories <Contextroot>/kie/repositories or -Dorg.guvnor.m2repo.dir=/tmp/repo/.

 I had tried to give custom settings.xml location using -Dkie.maven.settings.custom=.../.../settings.xml. This settings.xml has all the required info about the custom repositories. When i set the following bootsraps. 


set CATALINA_OPTS=-Xmx512M -XX:MaxPermSize=512m -Dbtm.root=%CATALINA_HOME% -Dbitronix.tm.configuration=%CATALINA_HOME%\conf\btm-config.properties -Djbpm.tsr.jndi.lookup=java:comp\env\TransactionSynchronizationRegistry -Djava.security.auth.login.config=%CATALINA_HOME%\webapps\kie-drools-wb\WEB-INF\classes\login.config -Dorg.jboss.logging.provider=jdk -Dorg.kie.server.persistence.ds=java:comp/env/jdbc//jbpm -Dorg.kie.server.persistence.dialect=org.hibernate.dialect.MySQL5Dialect -Dorg.kie.demo=false -Dorg.kie.example=false -Dorg.kie.server.persistence.tm=java:comp/env/jboss//TransactionManager -Dorg.optaplanner.server.ext.disabled=true -Dorg.jbpm.server.ext.disabled=true -Dorg.kie.server.id=bnym-kie-server -Dorg.kie.server.location=http://localhost:8080/kie-server-6.4.0.Final-webc/services/rest/server -Dorg.kie.server.controller=http://localhost:8080/kie-drools-wb-distribution-wars-6.4.0.Final-tomcat7/rest/controller -Dorg.kie.server.controller.user=kieserver -Dorg.kie.server.controller.pwd=kieserver1! -Dorg.kie.server.user=kieserver -Dorg.kie.server.pwd=kieserver1! -Dkie.maven.settings.custom=C:\apache-maven-3.2.1\conf\settings.xml

 

Nizam

unread,
Aug 8, 2016, 5:40:09 PM8/8/16
to Drools Setup

Michael Anstis

unread,
Aug 9, 2016, 5:44:47 AM8/9/16
to drools...@googlegroups.com
I set -Dorg.guvnor.m2repo.dir=/tmp/repo/ and "Build & Deployed" a project in the workbench. The JAR correctly ends up in /tmp/repo.

Your custom settings.xml will need an entry for a repository in a profile (that is active by default) pointing to the Workbench's maven repository.

For example:-

<profile>
      <id>standard-extra-repos</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <repositories>
        <repository>
          <id>Workbench</id>
          <name>Workbench</name>
          <url>http://127.0.0.1:8888/maven2</url>
          <releases>
            <enabled>true</enabled>
          </releases>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
        </repository>
      </repositories>
</profile>


--
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/b5b1ddcd-4ab1-411d-a449-88ebb5e373f9%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Nizam

unread,
Aug 9, 2016, 2:03:04 PM8/9/16
to Drools Setup
HI Michael,
                 Rather than setting workbench's maven repository. Is there a way i can start telling workbench to deploy the jars into some internal maven SNAPSHOT/Corporate repositories available within the organization ?


On Monday, August 8, 2016 at 4:54:42 PM UTC-4, Nizam wrote:

Michael Anstis

unread,
Aug 9, 2016, 2:04:44 PM8/9/16
to drools...@googlegroups.com
Well.. that's a different question!

What JARs do you specifically mean?

--
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.

Nizam

unread,
Aug 9, 2016, 2:16:32 PM8/9/16
to Drools Setup
The JAR's which gets generated when you build & deploy the rules in the workbench. Can those jars be pushed to an external maven repository ?


On Monday, August 8, 2016 at 4:54:42 PM UTC-4, Nizam wrote:

Michael Anstis

unread,
Aug 9, 2016, 2:22:47 PM8/9/16
to drools...@googlegroups.com
Yes.

Configure <distributionManagement> in the Project's pom (using the Administration perspective).

--
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.

Nizam

unread,
Aug 10, 2016, 5:52:19 PM8/10/16
to Drools Setup
Thanks Michael. I was able to deploy the built jar to a maven repo using <distributionManagement>. Is there a way from Drools workbench (Deploy->Rule Deployment-> Add a Container) , Can this screen allow to select the jar from a external maven repository rather than drools workbench internal maven repository ? That way , whatever i am pushing to external repository using <distributionManagement> , the same can be pulled in by kie-execution-server to expose as a restful service




On Monday, August 8, 2016 at 4:54:42 PM UTC-4, Nizam wrote:

Nizam

unread,
Aug 24, 2016, 1:58:53 PM8/24/16
to Drools Setup
Any help on this will be much appreciated ...


On Monday, August 8, 2016 at 4:54:42 PM UTC-4, Nizam wrote:

Michael Anstis

unread,
Aug 30, 2016, 5:38:56 AM8/30/16
to drools...@googlegroups.com
I don't think that is possible.

@maciejs, @porcelli.. can you confirm (Deploy->Rule Deployment-> Add a Container, only sees JARs in the Workbench's internal M2 - and not any arbitrary remote repository?)

--
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.

Maciej Swiderski

unread,
Aug 30, 2016, 7:09:04 AM8/30/16
to Michael Anstis, drools...@googlegroups.com
As far as I know this UI for repository browsing does only consider workbench artifact repository and not any others.

Maciej
Message has been deleted

ASHISH NATHANI

unread,
Sep 5, 2017, 2:38:00 AM9/5/17
to Drools Setup
Hi All,

@Nizam , @Michael Anstis , @Michael Anstis
Can you please explain how you achieved this? I am trying to find out how to add distribution management details in the project's pom using workbench UI.

Thanks in advance.
Ashish
Reply all
Reply to author
Forward
0 new messages