diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2021-02-03 16:08:50 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2021-02-03 16:08:50 +0100 |
commit | 91abd0b04320a9c9d932df195aca38c1cacfcc5a (patch) | |
tree | da89b773bfda2f4dea75e8536a1ac06915f23d5f | |
parent | 36f184d736a636c8e0418e5620e661292a8a9b93 (diff) | |
download | rules-sandbox-91abd0b04320a9c9d932df195aca38c1cacfcc5a.tar.gz rules-sandbox-91abd0b04320a9c9d932df195aca38c1cacfcc5a.tar.bz2 rules-sandbox-91abd0b04320a9c9d932df195aca38c1cacfcc5a.tar.xz rules-sandbox-91abd0b04320a9c9d932df195aca38c1cacfcc5a.zip |
Moving TemplateEngine to shared API.
-rw-r--r-- | .run/ninja.run.xml | 18 | ||||
-rw-r--r-- | module/acme-planner/classpath.txt | 1 | ||||
-rw-r--r-- | module/acme/classpath.txt | 1 | ||||
-rw-r--r-- | module/ri-base/classpath.txt | 1 | ||||
-rw-r--r-- | module/ri-base/pom.xml | 29 | ||||
-rw-r--r-- | module/ri-engine/classpath.txt | 6 | ||||
-rw-r--r-- | module/ri-engine/pom.xml | 6 | ||||
-rw-r--r-- | module/ri-engine/src/main/java/io/trygvis/rules/engine/Engine.java | 2 | ||||
-rw-r--r-- | module/ri-engine/src/main/java/io/trygvis/rules/engine/TemplateEngine.java | 14 | ||||
-rw-r--r-- | module/ri-engine/src/main/java/io/trygvis/rules/engine/TemplateLoader.java | 7 | ||||
-rw-r--r-- | module/ri-module-api/classpath.txt | 23 | ||||
-rw-r--r-- | module/ri-module-api/pom.xml | 16 | ||||
-rw-r--r-- | module/ri-module-api/src/main/java/io/trygvis/rules/engine/TemplateEngine.java (renamed from module/ri-base/src/main/java/io/trygvis/rules/engine/TemplateEngine.java) | 0 | ||||
-rw-r--r-- | module/ri-wireguard/classpath.txt | 1 | ||||
-rw-r--r-- | pom.xml | 2 |
15 files changed, 85 insertions, 42 deletions
diff --git a/.run/ninja.run.xml b/.run/ninja.run.xml new file mode 100644 index 0000000..a7b68ab --- /dev/null +++ b/.run/ninja.run.xml @@ -0,0 +1,18 @@ +<component name="ProjectRunConfigurationManager"> + <configuration default="false" name="ninja" type="Application" factoryName="Application"> + <envs> + <env name="MODULE_HOME" value="modules/" /> + </envs> + <option name="MAIN_CLASS_NAME" value="io.trygvis.rules.engine.NinjaTestMain" /> + <module name="ri-engine" /> + <extension name="coverage"> + <pattern> + <option name="PATTERN" value="io.trygvis.rules.engine.*" /> + <option name="ENABLED" value="true" /> + </pattern> + </extension> + <method v="2"> + <option name="Make" enabled="true" /> + </method> + </configuration> +</component>
\ No newline at end of file diff --git a/module/acme-planner/classpath.txt b/module/acme-planner/classpath.txt index 0d4a2e7..411ee43 100644 --- a/module/acme-planner/classpath.txt +++ b/module/acme-planner/classpath.txt @@ -24,6 +24,7 @@ commons-io:commons-io:2.8.0:jar commons-net:commons-net:3.3:jar info.picocli:picocli:4.6.1:jar io.trygvis.rules-sandbox:ri-engine:1.0-SNAPSHOT:jar +io.trygvis.rules-sandbox.module:ri-module-api:1.0-SNAPSHOT:jar jakarta.activation:jakarta.activation-api:1.2.2:jar jakarta.xml.bind:jakarta.xml.bind-api:2.3.3:jar org.antlr:antlr-runtime:3.5.2:jar diff --git a/module/acme/classpath.txt b/module/acme/classpath.txt index 96576c4..e544c09 100644 --- a/module/acme/classpath.txt +++ b/module/acme/classpath.txt @@ -7,6 +7,7 @@ com.thoughtworks.xstream:xstream:1.4.14:jar commons-codec:commons-codec:1.14:jar commons-io:commons-io:2.8.0:jar io.trygvis.rules-sandbox.module:ri-base:1.0-SNAPSHOT:jar +io.trygvis.rules-sandbox.module:ri-module-api:1.0-SNAPSHOT:jar io.trygvis.rules-sandbox.module:ri-wireguard:1.0-SNAPSHOT:jar org.antlr:antlr-runtime:3.5.2:jar org.drools:drools-canonical-model:7.48.0.Final:jar diff --git a/module/ri-base/classpath.txt b/module/ri-base/classpath.txt index 1461d46..d5370b2 100644 --- a/module/ri-base/classpath.txt +++ b/module/ri-base/classpath.txt @@ -6,6 +6,7 @@ com.github.javaparser:javaparser-core:3.13.10:jar com.thoughtworks.xstream:xstream:1.4.14:jar commons-codec:commons-codec:1.14:jar commons-io:commons-io:2.8.0:jar +io.trygvis.rules-sandbox.module:ri-module-api:1.0-SNAPSHOT:jar org.antlr:antlr-runtime:3.5.2:jar org.drools:drools-canonical-model:7.48.0.Final:jar org.drools:drools-compiler:7.48.0.Final:jar diff --git a/module/ri-base/pom.xml b/module/ri-base/pom.xml index aca4f26..119368c 100644 --- a/module/ri-base/pom.xml +++ b/module/ri-base/pom.xml @@ -22,34 +22,11 @@ <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> </dependency> - - <dependency> - <groupId>org.junit.jupiter</groupId> - <artifactId>junit-jupiter-api</artifactId> - <version>5.7.0</version> - <scope>test</scope> - </dependency> <dependency> - <groupId>org.junit.jupiter</groupId> - <artifactId>junit-jupiter-params</artifactId> - <version>5.7.0</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.junit.platform</groupId> - <artifactId>junit-platform-commons</artifactId> - <version>1.7.0</version> - <scope>test</scope> + <groupId>${project.groupId}</groupId> + <artifactId>ri-module-api</artifactId> + <version>${project.version}</version> </dependency> </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.kie</groupId> - <artifactId>kie-maven-plugin</artifactId> - </plugin> - </plugins> - </build> - </project> diff --git a/module/ri-engine/classpath.txt b/module/ri-engine/classpath.txt index ce43f01..f01f5f8 100644 --- a/module/ri-engine/classpath.txt +++ b/module/ri-engine/classpath.txt @@ -6,6 +6,7 @@ com.fasterxml.jackson.core:jackson-annotations:2.12.0:jar com.fasterxml.jackson.core:jackson-core:2.12.0:jar com.fasterxml.jackson.core:jackson-databind:2.12.0:jar com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.12.0:jar +com.github.javaparser:javaparser-core:3.13.10:jar com.github.virtuald:curvesapi:1.06:jar com.google.code.findbugs:annotations:3.0.1:jar com.google.errorprone:error_prone_annotations:2.1.3:jar @@ -20,6 +21,7 @@ commons-codec:commons-codec:1.14:jar commons-io:commons-io:2.8.0:jar commons-net:commons-net:3.3:jar info.picocli:picocli:4.6.1:jar +io.trygvis.rules-sandbox.module:ri-module-api:1.0-SNAPSHOT:jar org.antlr:antlr-runtime:3.5.2:jar org.apache.commons:commons-collections4:4.4:jar org.apache.commons:commons-compress:1.19:jar @@ -31,13 +33,17 @@ org.apache.poi:poi-ooxml-schemas:4.1.2:jar org.apache.xmlbeans:xmlbeans:3.1.0:jar org.checkerframework:checker-compat-qual:2.0.0:jar org.codehaus.mojo:animal-sniffer-annotations:1.14:jar +org.drools:drools-canonical-model:7.48.0.Final:jar org.drools:drools-compiler:7.48.0.Final:jar org.drools:drools-core:7.48.0.Final:jar org.drools:drools-core-dynamic:7.48.0.Final:jar org.drools:drools-core-reflective:7.48.0.Final:jar org.drools:drools-decisiontables:7.48.0.Final:jar org.drools:drools-ecj:7.48.0.Final:jar +org.drools:drools-model-compiler:7.48.0.Final:jar org.drools:drools-mvel:7.48.0.Final:jar +org.drools:drools-mvel-compiler:7.48.0.Final:jar +org.drools:drools-mvel-parser:7.48.0.Final:jar org.drools:drools-templates:7.48.0.Final:jar org.javassist:javassist:3.24.1-GA:jar org.jsoup:jsoup:1.10.3:jar diff --git a/module/ri-engine/pom.xml b/module/ri-engine/pom.xml index 01a72cc..a2307f0 100644 --- a/module/ri-engine/pom.xml +++ b/module/ri-engine/pom.xml @@ -19,6 +19,12 @@ <dependencies> <dependency> + <groupId>${project.groupId}.module</groupId> + <artifactId>ri-module-api</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> <groupId>io.trygvis.rules-sandbox.module</groupId> <artifactId>ri-base</artifactId> <version>${project.version}</version> diff --git a/module/ri-engine/src/main/java/io/trygvis/rules/engine/Engine.java b/module/ri-engine/src/main/java/io/trygvis/rules/engine/Engine.java index 46a3302..f2247d3 100644 --- a/module/ri-engine/src/main/java/io/trygvis/rules/engine/Engine.java +++ b/module/ri-engine/src/main/java/io/trygvis/rules/engine/Engine.java @@ -23,8 +23,6 @@ import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.List; -import static io.trygvis.rules.engine.TemplateEngine.TemplateLoader; - public class Engine implements Closeable { @SuppressWarnings("FieldCanBeLocal") private final Logger logger = LoggerFactory.getLogger(getClass()); diff --git a/module/ri-engine/src/main/java/io/trygvis/rules/engine/TemplateEngine.java b/module/ri-engine/src/main/java/io/trygvis/rules/engine/TemplateEngine.java deleted file mode 100644 index e3199d9..0000000 --- a/module/ri-engine/src/main/java/io/trygvis/rules/engine/TemplateEngine.java +++ /dev/null @@ -1,14 +0,0 @@ -package io.trygvis.rules.engine; - -import java.io.IOException; -import java.util.Map; - -public interface TemplateEngine { - void clean(); - - void template(String name, String output, Map<String, Object> params) throws IOException; - - interface TemplateLoader { - String load(String name) throws IOException; - } -} diff --git a/module/ri-engine/src/main/java/io/trygvis/rules/engine/TemplateLoader.java b/module/ri-engine/src/main/java/io/trygvis/rules/engine/TemplateLoader.java new file mode 100644 index 0000000..9441264 --- /dev/null +++ b/module/ri-engine/src/main/java/io/trygvis/rules/engine/TemplateLoader.java @@ -0,0 +1,7 @@ +package io.trygvis.rules.engine; + +import java.io.IOException; + +interface TemplateLoader { + String load(String name) throws IOException; +} diff --git a/module/ri-module-api/classpath.txt b/module/ri-module-api/classpath.txt new file mode 100644 index 0000000..1f0f0a6 --- /dev/null +++ b/module/ri-module-api/classpath.txt @@ -0,0 +1,23 @@ +io.trygvis.rules-sandbox.module:ri-module-api:1.0-SNAPSHOT:jar +com.github.javaparser:javaparser-core:3.13.10:jar +com.thoughtworks.xstream:xstream:1.4.14:jar +commons-codec:commons-codec:1.14:jar +commons-io:commons-io:2.8.0:jar +org.antlr:antlr-runtime:3.5.2:jar +org.drools:drools-canonical-model:7.48.0.Final:jar +org.drools:drools-compiler:7.48.0.Final:jar +org.drools:drools-core:7.48.0.Final:jar +org.drools:drools-core-dynamic:7.48.0.Final:jar +org.drools:drools-core-reflective:7.48.0.Final:jar +org.drools:drools-ecj:7.48.0.Final:jar +org.drools:drools-model-compiler:7.48.0.Final:jar +org.drools:drools-mvel-compiler:7.48.0.Final:jar +org.drools:drools-mvel-parser:7.48.0.Final:jar +org.kie:kie-api:7.48.0.Final:jar +org.kie:kie-internal:7.48.0.Final:jar +org.kie:kie-memory-compiler:7.48.0.Final:jar +org.kie.soup:kie-soup-maven-support:7.48.0.Final:jar +org.kie.soup:kie-soup-xstream:7.48.0.Final:jar +org.slf4j:slf4j-api:1.7.30:jar +xmlpull:xmlpull:1.1.3.1:jar +xpp3:xpp3_min:1.1.4c:jar diff --git a/module/ri-module-api/pom.xml b/module/ri-module-api/pom.xml new file mode 100644 index 0000000..118b5ba --- /dev/null +++ b/module/ri-module-api/pom.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>io.trygvis.rules-sandbox.module</groupId> + <artifactId>ri-module-parent</artifactId> + <version>1.0-SNAPSHOT</version> + <relativePath>../ri-module-parent/pom.xml</relativePath> + </parent> + + <artifactId>ri-module-api</artifactId> + +</project> diff --git a/module/ri-base/src/main/java/io/trygvis/rules/engine/TemplateEngine.java b/module/ri-module-api/src/main/java/io/trygvis/rules/engine/TemplateEngine.java index eafa6e4..eafa6e4 100644 --- a/module/ri-base/src/main/java/io/trygvis/rules/engine/TemplateEngine.java +++ b/module/ri-module-api/src/main/java/io/trygvis/rules/engine/TemplateEngine.java diff --git a/module/ri-wireguard/classpath.txt b/module/ri-wireguard/classpath.txt index af74a64..ef1b057 100644 --- a/module/ri-wireguard/classpath.txt +++ b/module/ri-wireguard/classpath.txt @@ -7,6 +7,7 @@ com.thoughtworks.xstream:xstream:1.4.14:jar commons-codec:commons-codec:1.14:jar commons-io:commons-io:2.8.0:jar io.trygvis.rules-sandbox.module:ri-base:1.0-SNAPSHOT:jar +io.trygvis.rules-sandbox.module:ri-module-api:1.0-SNAPSHOT:jar org.antlr:antlr-runtime:3.5.2:jar org.drools:drools-canonical-model:7.48.0.Final:jar org.drools:drools-compiler:7.48.0.Final:jar @@ -80,6 +80,7 @@ <module>module/acme</module> <module>module/acme-planner</module> <module>module/ri-engine</module> + <module>module/ri-module-api</module> </modules> </profile> <profile> @@ -89,6 +90,7 @@ </activation> <modules> <module>module/ri-base</module> + <module>module/ri-module-api</module> <module>module/ri-module-parent</module> <module>module/ri-wireguard</module> </modules> |