mirror of
https://github.com/danieldemus/openhab-addons
synced 2026-07-29 12:34:21 +02:00
128 lines
4.5 KiB
XML
128 lines
4.5 KiB
XML
<?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 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>5.1.0-SNAPSHOT</version>
|
|
</parent>
|
|
|
|
<artifactId>org.openhab.automation.jsscripting</artifactId>
|
|
|
|
<name>openHAB Add-ons :: Bundles :: Automation :: JavaScript Scripting</name>
|
|
|
|
<properties>
|
|
<!-- Remember to check if the fix https://github.com/openhab/openhab-core/pull/4437 still works when upgrading GraalJS -->
|
|
<graaljs.version>24.2.1</graaljs.version>
|
|
<ohjs.version>openhab@5.11.1</ohjs.version>
|
|
</properties>
|
|
|
|
<dependencies>
|
|
<!-- Graal Polyglot Framework -->
|
|
<dependency>
|
|
<groupId>org.openhab.osgiify</groupId>
|
|
<artifactId>org.graalvm.polyglot.polyglot</artifactId>
|
|
<version>${graaljs.version}</version>
|
|
<!-- provided as OSGi bundle at runtime, available only at compile time -->
|
|
<scope>provided</scope>
|
|
</dependency>
|
|
<!-- Graal JavaScript ScriptEngine JSR 223 support -->
|
|
<dependency>
|
|
<groupId>org.openhab.osgiify</groupId>
|
|
<artifactId>org.graalvm.js.js-scriptengine</artifactId>
|
|
<version>${graaljs.version}</version>
|
|
<!-- provided as OSGi bundle at runtime, available only at compile time -->
|
|
<scope>provided</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<plugins>
|
|
<!-- bundle the openhab-js library -->
|
|
<plugin>
|
|
<groupId>com.github.eirslett</groupId>
|
|
<artifactId>frontend-maven-plugin</artifactId>
|
|
<version>1.15.1</version>
|
|
<configuration>
|
|
<nodeVersion>v22.13.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>
|
|
<!--suppress UnresolvedMavenProperty -->
|
|
<arguments>install ${ohjs.version} webpack@^5.94.0 webpack-cli@^5.1.4 --prefix .</arguments>
|
|
<!-- webpack & webpack-cli versions should match to the ones from openhab-js -->
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>npx webpack (openhab-js globals injection)</id>
|
|
<goals>
|
|
<goal>npx</goal>
|
|
</goals>
|
|
<configuration>
|
|
<!--suppress UnresolvedMavenProperty -->
|
|
<arguments>webpack -c ./node_modules/openhab/build/@globals-webpack.config.js --entry-reset --entry
|
|
./node_modules/openhab/build/@openhab-globals.js -o ./dist</arguments>
|
|
</configuration>
|
|
</execution>
|
|
<execution>
|
|
<id>npx webpack (openhab-js)</id>
|
|
<goals>
|
|
<goal>npx</goal>
|
|
</goals>
|
|
<configuration>
|
|
<!--suppress UnresolvedMavenProperty -->
|
|
<arguments>webpack -c ./node_modules/openhab/build/webpack.config.js --entry-reset --entry
|
|
./node_modules/openhab/ -o ./dist</arguments>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
<!-- embed the JS resources into the bundle -->
|
|
<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>
|
|
<!-- run SAT -->
|
|
<plugin>
|
|
<groupId>org.openhab.tools.sat</groupId>
|
|
<artifactId>sat-plugin</artifactId>
|
|
<configuration>
|
|
<pmdFilter>${project.basedir}/suppressions.properties</pmdFilter>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</project>
|