Skip to content

Commit

Permalink
Renamed generated jar file jrule-items.jar -> jrule-generated.jar
Browse files Browse the repository at this point in the history
  • Loading branch information
seime committed Oct 16, 2022
1 parent 247983f commit fe4bc61
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ The following jar files can be found under the jrule/jar-folder:

| Jar File | Description |
| -------------------------------------- | --------------------------------------------------------------------------------------------- |
| jrule-items.jar | Contains all generated items, which will be used when developing rules |
| jrule-generated.jar | Contains all generated items, which will be used when developing rules |
| jrule.jar | JRule Addon classes neeed as dependency when doing development |


Expand All @@ -63,7 +63,7 @@ The following jar files can be found under the jrule/jar-folder:
2. Compile java source files and create a resulting jrule.jar file under /etc/openhab/automation/jrule/jar
3. Compile any java rules file under /etc/openhab/automation/jrule/rules/org/openhab/automation/jrule/rules/user/
It is possible to use package structure with subdirectories in this folder, or the can be place in a flat structure right under this folder
4. Create jar files with dependencies to be used when creating your java-rules (jrule-items.jar).
4. Create jar files with dependencies to be used when creating your java-rules (jrule-generated.jar).
The two jar files needed for Java rules development can be found under /etc/openhab/automation/jrule/jar

Once the JAVA rule engine has started and compiled items successfully you can either copy the jar files
Expand Down Expand Up @@ -684,8 +684,13 @@ public void startTrackingNonOnlineThing(JRuleEvent event) {
}
```


# Changelog

## NEXT

- Added thing rule support
- BREAKING: jrule-items.jar has been renamed to jrule-generated.jar

## BETA13
- Fixed a bug with naming of JRuleItems.java
- Fixed issues with post and sendCommand to groups
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public class JRuleCompiler {
private static final String JAVA_CLASS_PATH_PROPERTY = "java.class.path";
private static final String CLASSPATH_OPTION = "-classpath";
public static final String JAR_JRULE_NAME = "jrule.jar";
public static final String JAR_JRULE_ITEMS_NAME = "jrule-items.jar";
public static final String JAR_JRULE_GENERATED_JAR_NAME = "jrule-generated.jar";
private static final String LOG_NAME_COMPILER = "JRuleCompiler";
private static final String FRONT_SLASH = "/";

Expand Down Expand Up @@ -270,7 +270,7 @@ public String getJarPath(String jarName) {
public boolean compileRules() {
String rulesClassPath = //
System.getProperty(JAVA_CLASS_PATH_PROPERTY) + File.pathSeparator //
+ getJarPath(JAR_JRULE_ITEMS_NAME) + File.pathSeparator //
+ getJarPath(JAR_JRULE_GENERATED_JAR_NAME) + File.pathSeparator //
+ getJarPath(JAR_JRULE_NAME) + File.pathSeparator; //
String extLibPath = getExtLibPaths();
logDebug("extLibPath: {}", extLibPath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ private synchronized Boolean compileItemsAndThingsInternal() {

logInfo("Creating items and things jar");
JRuleUtil.createJarFile(config.getItemsRootDirectory(),
compiler.getJarPath(JRuleCompiler.JAR_JRULE_ITEMS_NAME));
compiler.getJarPath(JRuleCompiler.JAR_JRULE_GENERATED_JAR_NAME));
result = true;
} else {
logError("Compilation failed, not creating jar file");
Expand Down

0 comments on commit fe4bc61

Please sign in to comment.