* [jsscripting] Share the lock mechanism that was used only for rules This change moves the lock object that was originally created for ThreadsafeSimpleRuleDelegate to OpenhabGraalJSScriptEngine to make share it across the whole engine. * [jsscripting] Inject the lock object into the JS runtime * [jsscripting] Update `setTimeout` & `setInterval` polyfills to enable threadsafety * [jsscripting] Upgrade GraalJS from 21.3.0 to 22.3.0 * [jsscripting] Reduce compiler warnings * [jsscripting] Update node version of frontend-maven-plugin Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
172 lines
5.3 KiB
XML
172 lines
5.3 KiB
XML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<parent>
|
|
<groupId>org.openhab.addons.bundles</groupId>
|
|
<artifactId>org.openhab.addons.reactor.bundles</artifactId>
|
|
<version>3.4.0-SNAPSHOT</version>
|
|
</parent>
|
|
|
|
<artifactId>org.openhab.automation.jsscripting</artifactId>
|
|
|
|
<name>openHAB Add-ons :: Bundles :: Automation :: JSScripting</name>
|
|
|
|
<properties>
|
|
<bnd.importpackage>
|
|
!sun.misc.*,
|
|
!sun.reflect.*,
|
|
!com.sun.management.*,
|
|
!jdk.internal.reflect.*,
|
|
!jdk.vm.ci.services
|
|
</bnd.importpackage>
|
|
<graal.version>22.3.0</graal.version>
|
|
<asm.version>6.2.1</asm.version>
|
|
<oh.version>${project.version}</oh.version>
|
|
<ohjs.version>openhab@2.0.4</ohjs.version>
|
|
</properties>
|
|
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-dependency-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<id>embed-dependencies</id>
|
|
<goals>
|
|
<goal>unpack-dependencies</goal>
|
|
</goals>
|
|
<configuration>
|
|
<excludes>META-INF/services/com.oracle.truffle.api.TruffleLanguage$Provider</excludes> <!-- we'll provide this -->
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>com.github.eirslett</groupId>
|
|
<artifactId>frontend-maven-plugin</artifactId>
|
|
<version>1.12.0</version>
|
|
<configuration>
|
|
<nodeVersion>v16.17.1</nodeVersion>
|
|
<workingDirectory>target/js</workingDirectory>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<id>Install node and npm</id>
|
|
<goals>
|
|
<goal>install-node-and-npm</goal>
|
|
</goals>
|
|
<phase>generate-sources</phase>
|
|
</execution>
|
|
<execution>
|
|
<id>npm install</id>
|
|
<goals>
|
|
<goal>npm</goal>
|
|
</goals>
|
|
<configuration>
|
|
<arguments>install ${ohjs.version} webpack webpack-cli</arguments>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>npx webpack</id>
|
|
<goals>
|
|
<goal>npx</goal>
|
|
</goals>
|
|
<configuration>
|
|
<arguments>webpack -c ./node_modules/openhab/webpack.config.js --entry ./node_modules/openhab/ -o ./dist</arguments>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>build-helper-maven-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<goals>
|
|
<goal>add-resource</goal>
|
|
</goals>
|
|
<phase>generate-sources</phase>
|
|
<configuration>
|
|
<resources>
|
|
<resource>
|
|
<directory>target/js/dist</directory>
|
|
<targetPath>node_modules</targetPath>
|
|
</resource>
|
|
</resources>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.graalvm.truffle</groupId>
|
|
<artifactId>truffle-api</artifactId>
|
|
<version>${graal.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.graalvm.js</groupId>
|
|
<artifactId>js-scriptengine</artifactId>
|
|
<version>${graal.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.graalvm.js</groupId>
|
|
<artifactId>js-launcher</artifactId>
|
|
<version>${graal.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.graalvm.sdk</groupId>
|
|
<artifactId>graal-sdk</artifactId>
|
|
<version>${graal.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.graalvm.regex</groupId>
|
|
<artifactId>regex</artifactId>
|
|
<version>${graal.version}</version>
|
|
</dependency>
|
|
<dependency> <!-- this must come AFTER the regex lib -->
|
|
<groupId>org.graalvm.js</groupId>
|
|
<artifactId>js</artifactId>
|
|
<version>${graal.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.ibm.icu</groupId>
|
|
<artifactId>icu4j</artifactId>
|
|
<version>69.1</version>
|
|
</dependency>
|
|
|
|
<!-- include as version required is older than OH provides -->
|
|
<dependency>
|
|
<groupId>org.ow2.asm</groupId>
|
|
<artifactId>asm</artifactId>
|
|
<version>${asm.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.ow2.asm</groupId>
|
|
<artifactId>asm-commons</artifactId>
|
|
<version>${asm.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.ow2.asm</groupId>
|
|
<artifactId>asm-tree</artifactId>
|
|
<version>${asm.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.ow2.asm</groupId>
|
|
<artifactId>asm-util</artifactId>
|
|
<version>${asm.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.ow2.asm</groupId>
|
|
<artifactId>asm-analysis</artifactId>
|
|
<version>${asm.version}</version>
|
|
</dependency>
|
|
</dependencies>
|
|
</project>
|