Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.1.0 #23

Merged
merged 1 commit into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ in maintenance mode. Current plan is to support community with minor enhancement

## Latest news

* 01/15/2024: Version 1.1.0 is out
* 3PP Version bumps
* easy-rules-jexl - Breaking change due to bump to Jexl 3.3

* 02/13/2023: Version 1.0.7 is out
Minor release to fix jackson vulnerability

Expand Down
2 changes: 1 addition & 1 deletion easy-rules-archetype/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parent>
<groupId>io.github.dvgaba</groupId>
<artifactId>easy-rules</artifactId>
<version>1.0.7</version>
<version>1.1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
15 changes: 6 additions & 9 deletions easy-rules-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.github.dvgaba</groupId>
<artifactId>easy-rules</artifactId>
<version>1.0.7</version>
<version>1.1.0</version>
</parent>

<artifactId>easy-rules-core</artifactId>
Expand Down Expand Up @@ -68,26 +68,23 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.8.2</version>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.8.2</version>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>4.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
7 changes: 2 additions & 5 deletions easy-rules-jexl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.github.dvgaba</groupId>
<artifactId>easy-rules</artifactId>
<version>1.0.7</version>
<version>1.1.0</version>
</parent>

<artifactId>easy-rules-jexl</artifactId>
Expand All @@ -13,7 +13,7 @@
<description>JEXL integration module</description>

<properties>
<jexl.version>3.2.1</jexl.version>
<jexl.version>3.3</jexl.version>
</properties>

<scm>
Expand Down Expand Up @@ -79,19 +79,16 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.8.2</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import java.util.Objects;
import org.apache.commons.jexl3.JexlBuilder;
import org.apache.commons.jexl3.JexlEngine;
import org.apache.commons.jexl3.introspection.JexlPermissions;
import org.jeasy.rules.api.Action;
import org.jeasy.rules.api.Condition;
import org.jeasy.rules.api.Facts;
Expand All @@ -40,7 +41,7 @@
*/
public class JexlRule extends BasicRule {

static final JexlEngine DEFAULT_JEXL = new JexlBuilder().safe(false).create();
static final JexlEngine DEFAULT_JEXL = new JexlBuilder().permissions(JexlPermissions.UNRESTRICTED).safe(false).create();

private Condition condition = Condition.FALSE;
private final List<Action> actions = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.apache.commons.jexl3.JexlBuilder;
import org.apache.commons.jexl3.JexlEngine;
import org.apache.commons.jexl3.JexlException;
import org.apache.commons.jexl3.introspection.JexlPermissions;
import org.apache.commons.jexl3.introspection.JexlSandbox;
import org.assertj.core.api.Assertions;
import org.jeasy.rules.api.Action;
Expand All @@ -49,7 +50,7 @@ public class JexlActionTest {
@Test
void testJexlActionExecution() throws Exception {
// given
Action markAsAdult = new JexlAction("person.setAdult(true);");
Action markAsAdult = new JexlAction("person.setAdult(true)");
Facts facts = new Facts();
Person foo = new Person("foo", 20);
facts.put("person", foo);
Expand Down Expand Up @@ -94,7 +95,7 @@ void testJexlActionExecutionWithFailure() throws Exception {
Assertions.assertThatThrownBy(() -> action.execute(facts))
.isInstanceOf(JexlException.Method.class)
.hasMessage(
"org.jeasy.rules.jexl.JexlAction.<init>:49 unsolvable function/method 'setBlah(Boolean)'");
"org.jeasy.rules.jexl.JexlAction.<init>:49@1:7 unsolvable function/method 'setBlah(Boolean)'");

// then
// excepted exception
Expand Down Expand Up @@ -147,7 +148,7 @@ void testWithWhiteSandbox() {
sandbox.white(System.class.getName()).execute("currentTimeMillis");
Map<String, Object> namespaces = new HashMap<>();
namespaces.put("s", System.class);
JexlEngine jexl = new JexlBuilder().sandbox(sandbox).namespaces(namespaces).create();
JexlEngine jexl = new JexlBuilder().permissions(JexlPermissions.UNRESTRICTED).sandbox(sandbox).namespaces(namespaces).create();
Facts facts = new Facts();
AtomicLong atomicLong = new AtomicLong();
facts.put("result", atomicLong);
Expand Down
5 changes: 1 addition & 4 deletions easy-rules-mvel/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.github.dvgaba</groupId>
<artifactId>easy-rules</artifactId>
<version>1.0.7</version>
<version>1.1.0</version>
</parent>

<artifactId>easy-rules-mvel</artifactId>
Expand Down Expand Up @@ -79,19 +79,16 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
5 changes: 1 addition & 4 deletions easy-rules-spel/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.github.dvgaba</groupId>
<artifactId>easy-rules</artifactId>
<version>1.0.7</version>
<version>1.1.0</version>
</parent>

<artifactId>easy-rules-spel</artifactId>
Expand Down Expand Up @@ -85,19 +85,16 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
6 changes: 1 addition & 5 deletions easy-rules-support/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.github.dvgaba</groupId>
<artifactId>easy-rules</artifactId>
<version>1.0.7</version>
<version>1.1.0</version>
</parent>

<artifactId>easy-rules-support</artifactId>
Expand Down Expand Up @@ -80,19 +80,16 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>5.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -103,7 +100,6 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>4.2.0</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion easy-rules-tutorials/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.github.dvgaba</groupId>
<artifactId>easy-rules</artifactId>
<version>1.0.7</version>
<version>1.1.0</version>
</parent>

<artifactId>easy-rules-tutorials</artifactId>
Expand Down
33 changes: 29 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>io.github.dvgaba</groupId>
<artifactId>easy-rules</artifactId>
<version>1.0.7</version>
<version>1.1.0</version>

<modules>
<module>easy-rules-archetype</module>
Expand All @@ -26,18 +26,19 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>11</java.version>
<junit.version>4.13.2</junit.version>
<assertj.version>3.22.0</assertj.version>
<mockito.version>4.4.0</mockito.version>
<assertj.version>3.25.1</assertj.version>
<mockito.version>5.9.0</mockito.version>
<system-lambda.version>1.2.1</system-lambda.version>
<slf4j.version>1.7.36</slf4j.version>
<jackson.version>2.14.2</jackson.version>
<jackson.version>2.16.1</jackson.version>
<jsr305.version>3.0.2</jsr305.version>
<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
<maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
<maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
<maven-license-plugin.version>3.0</maven-license-plugin.version>
<maven-enforcer-plugin.version>1.4.1</maven-enforcer-plugin.version>
<junit-jupiter.version>5.10.1</junit-jupiter.version>
</properties>

<scm>
Expand Down Expand Up @@ -109,12 +110,36 @@
<version>${assertj.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
Expand Down
Loading