feisishui / rules

Ant's simple rule engine for Java, Java 8, Scala and Node.js.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rules

Simple Rule Engine from Ant's blog. Able to process MVEL and Javascript rules in JVM, or run on Node.js.

Version 2.3.1:

  • Removed constructors and methods which took Java 8 streams because it's not a good idea to pass streams around. Added constructors for using additional variables and static methods. See maxant#9.

Version 2.2.2:

  • Updated dependency versions and copyright notices.

Version 2.2.1:

  • Fixed maxant#4 - added checks to log level in order to improve performance.
  • Updated dependencies to latest versions

Version 2.2.0:

Version 2.1.0:

Also see the test classes, e.g. https://github.com/maxant/rules/tree/master/rules/src/test/java/ch/maxant/rules/blackbox, https://github.com/maxant/rules/tree/master/rules-java8/src/test/java/ch/maxant/rules/blackbox and https://github.com/maxant/rules/tree/master/rules-scala/src/test/scala/ch/maxant/rules/blackbox, or https://github.com/maxant/rules/tree/master/rules-js/test/rules-test.js.

Release Notes and Licence (LGPL) can be found here: https://github.com/maxant/rules/tree/master/rules/src/main/resources.

Building

# update versions in poms, to snapshot version, e.g. "2.3.1-SNAPSHOT"

# update dependency versions in poms

# update copyright years in all files

cd rules-parent

# ensure all is working
mvn clean package

# make changes

# ensure all is working
mvn clean package

# update release notes in "releaseNotes.txt" as well as in "README.md".

# build
mvn clean deploy

# when pop up requests password for gpg key, use the correct password!

# the above might require you to create a gpg key.
# see https://central.sonatype.org/pages/working-with-pgp-signatures.html
#   gpg --gen-key
#   gpg --list-keys
#
# now upload it:
#   gpg --keyserver keyserver.gpg.com  --send-keys ABCDEF
#   gpg --keyserver pool.sks-keyservers.net --send-keys ABCDEF
#   gpg --keyserver keys.gnupg.net --send-keys ABCDEF
#   gpg --keyserver keyserver.ubuntu.com --send-keys ABCDEF
#
# or maybe with hkp protocol?
#
#   gpg --keyserver hkp://keyserver.gpg.com  --send-keys ABCDEF
#   gpg --keyserver hkp://pool.sks-keyservers.net --send-keys ABCDEF
#   gpg --keyserver hkp://keys.gnupg.net --send-keys ABCDEF
#   gpg --keyserver hkp://keyserver.ubuntu.com --send-keys ABCDEF
#
# then go have a coffee. check
# http://keyserver.ubuntu.com/pks/lookup?search=ant%40maxant.co.uk&hash=on&op=vindex
# to see if the key is available.
#
# if it isn't try this:
#
#   gpg --armor --export ant@maxant.co.uk
#
# and import that manually at http://keyserver.ubuntu.com
#
# the above takes the letters (ID) which follow the "pub" key
# it is OK to create a brand new gpg key e.g. if your laptop explodes.
# see http://central.sonatype.org/pages/ossrh-guide.html
# need to ensure that servers section of maven settings.xml contains the following:
#    <server>
#      <id>ossrh</id>
#      <username>YOUR_USERNAME</username>
#      <password>YOUR_PASSWORD</password>
#    </server>
# note that the ID is the same as the one contained in the distributionManagement section of the parent pom

# after deployment, check the maven logs. you'll find something like this:
#    Uploading to sonatype: https://oss.sonatype.org/content/repositories/snapshots/ch/maxant/rules-java8/2.3.1-SNAPSHOT/maven-metadata.xml

# Go to https://oss.sonatype.org/content/repositories/snapshots/ch/maxant/ and double check it's all there

# Now if that all works, do the release:
# update versions in poms, to release version, e.g. "2.3.1"

# build
mvn clean deploy

# then you should either get a failed report, or logging like this:

  [INFO]  * Upload of locally staged artifacts finished.
  [INFO]  * Closing staging repository with ID "chmaxant-1012".

  Waiting for operation to complete...
  ........

  [INFO] Remote staged 1 repositories, finished with success.
  [INFO] Remote staging repositories are being released...

  Waiting for operation to complete...
  .........

  [INFO] Remote staging repositories released.
  [INFO] ------------------------------------------------------------------------
  [INFO] Reactor Summary:
  [INFO]
  [INFO] rules .............................................. SUCCESS [ 12.109 s]
  [INFO] rules .............................................. SUCCESS [ 24.242 s]
  [INFO] rules-java8 ........................................ SUCCESS [  4.704 s]
  [INFO] rules-scala ........................................ SUCCESS [01:55 min]
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD SUCCESS
  [INFO] ------------------------------------------------------------------------

# Your release will be ready here: https://oss.sonatype.org/#nexus-search;quick~maxant

# Finally go have a coffee and after a while, your release will also be ready in maven central:
#   https://mvnrepository.com/artifact/ch.maxant/rules

# don't forget to create a release in GitHub:

git commit -a -m'...'

git push origin master

git tag -a v2.3.1 -m'...'

git push origin v2.3.1

# go here and enter details, with title = v2.3.1
https://github.com/maxant/rules/releases/new

About

Ant's simple rule engine for Java, Java 8, Scala and Node.js.


Languages

Language:JavaScript 68.8%Language:Java 18.2%Language:HTML 10.2%Language:CSS 1.4%Language:Scala 1.4%