2024-12-15 20:30:05 +01:00
<?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">
2021-05-06 09:08:47 +02:00
<modelVersion > 4.0.0</modelVersion>
<parent >
<groupId > org.openhab.addons.bundles</groupId>
<artifactId > org.openhab.addons.reactor.bundles</artifactId>
2024-12-15 20:30:05 +01:00
<version > 5.0.0-SNAPSHOT</version>
2021-05-06 09:08:47 +02:00
</parent>
<artifactId > org.openhab.automation.jsscripting</artifactId>
2022-11-24 23:23:19 +01:00
<name > openHAB Add-ons :: Bundles :: Automation :: JavaScript Scripting</name>
2021-05-06 09:08:47 +02:00
<properties >
<bnd.importpackage >
!sun.misc.*,
!sun.reflect.*,
!com.sun.management.*,
!jdk.internal.reflect.*,
!jdk.vm.ci.services
</bnd.importpackage>
2024-11-05 21:16:43 +01:00
<!-- Remember to check if the fix https://github.com/openhab/openhab - core/pull/4437 still works when upgrading GraalJS -->
2024-12-22 08:09:09 +01:00
<graaljs.version > 24.1.1</graaljs.version>
2021-05-06 09:08:47 +02:00
<oh.version > ${project.version}</oh.version>
2024-12-11 16:48:05 +01:00
<ohjs.version > openhab@5.8.1</ohjs.version>
2021-05-06 09:08:47 +02:00
</properties>
<build >
<plugins >
2024-12-22 08:09:09 +01:00
<!-- bundle the modular dependencies into an uber - JAR -->
2021-05-06 09:08:47 +02:00
<plugin >
<groupId > org.apache.maven.plugins</groupId>
2024-12-22 08:09:09 +01:00
<artifactId > maven-shade-plugin</artifactId>
<version > 3.6.0</version>
2021-05-06 09:08:47 +02:00
<executions >
<execution >
2024-12-22 08:09:09 +01:00
<phase > package</phase>
2021-05-06 09:08:47 +02:00
<goals >
2024-12-22 08:09:09 +01:00
<goal > shade</goal>
2021-05-06 09:08:47 +02:00
</goals>
<configuration >
2024-12-22 08:09:09 +01:00
<artifactSet >
<excludes >
<exclude > org.lastnpe.eea:eea-all</exclude>
<exclude > org.apache.karaf.features:framework</exclude>
</excludes>
</artifactSet>
<createDependencyReducedPom > false</createDependencyReducedPom>
<transformers >
<!-- Transformer to merge module - info.class files, if needed -->
<transformer
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
2021-05-06 09:08:47 +02:00
</configuration>
</execution>
</executions>
</plugin>
2024-07-09 20:08:30 +02:00
<!-- bundle the openhab - js library -->
2021-12-13 08:13:13 +01:00
<plugin >
<groupId > com.github.eirslett</groupId>
<artifactId > frontend-maven-plugin</artifactId>
2025-01-05 00:47:18 +01:00
<version > 1.15.1</version>
2021-12-13 08:13:13 +01:00
<configuration >
2022-11-20 17:30:23 +01:00
<nodeVersion > v16.17.1</nodeVersion> <!-- DO NOT DOWNGRADE: NodeJS < 16 doesn't support Apple Silicon -->
2021-12-13 08:13:13 +01:00
<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 >
2023-01-03 20:45:23 +01:00
<!-- suppress UnresolvedMavenProperty -->
2024-09-16 12:28:46 +02:00
<arguments > install ${ohjs.version} webpack@^5.94.0 webpack-cli@^5.1.4</arguments> <!-- webpack & webpack - cli versions should match to the ones from openhab - js -->
2021-12-13 08:13:13 +01:00
</configuration>
</execution>
<execution >
2023-01-03 20:45:23 +01:00
<id > npx webpack (openhab-js globals injection)</id>
<goals >
<goal > npx</goal>
</goals>
<configuration >
<!-- suppress UnresolvedMavenProperty -->
2023-06-20 15:40:11 +02:00
<arguments > webpack -c ./node_modules/openhab/build/@globals-webpack.config.js --entry-reset --entry
./node_modules/openhab/build/@openhab-globals.js -o ./dist</arguments>
2023-01-03 20:45:23 +01:00
</configuration>
</execution>
<execution >
<id > npx webpack (openhab-js)</id>
2021-12-13 08:13:13 +01:00
<goals >
<goal > npx</goal>
</goals>
<configuration >
2023-06-20 15:40:11 +02:00
<!-- suppress UnresolvedMavenProperty -->
<arguments > webpack -c ./node_modules/openhab/build/webpack.config.js --entry-reset --entry
./node_modules/openhab/ -o ./dist</arguments>
2021-12-13 08:13:13 +01:00
</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>
2024-07-09 20:08:30 +02:00
<!-- run SAT -->
2022-12-14 20:12:54 +01:00
<plugin >
<groupId > org.openhab.tools.sat</groupId>
<artifactId > sat-plugin</artifactId>
<configuration >
<pmdFilter > ${project.basedir}/suppressions.properties</pmdFilter>
</configuration>
</plugin>
2021-05-06 09:08:47 +02:00
</plugins>
</build>
<dependencies >
2024-07-09 20:08:30 +02:00
<dependency >
2024-12-22 08:09:09 +01:00
<groupId > org.graalvm.polyglot</groupId>
<artifactId > polyglot</artifactId>
<version > ${graaljs.version}</version>
2021-05-06 09:08:47 +02:00
</dependency>
2024-07-09 20:08:30 +02:00
<!-- Graal JavaScript ScriptEngine JSR 223 support -->
2021-05-06 09:08:47 +02:00
<dependency >
<groupId > org.graalvm.js</groupId>
<artifactId > js-scriptengine</artifactId>
2024-12-22 08:09:09 +01:00
<version > ${graaljs.version}</version>
2021-05-06 09:08:47 +02:00
</dependency>
2024-07-09 20:08:30 +02:00
<!-- Graal TRegex engine (internally used by Graal JavaScript engine) -->
2021-05-06 09:08:47 +02:00
<dependency >
<groupId > org.graalvm.regex</groupId>
<artifactId > regex</artifactId>
2024-12-22 08:09:09 +01:00
<version > ${graaljs.version}</version>
2021-05-06 09:08:47 +02:00
</dependency>
2024-07-09 20:08:30 +02:00
<!-- Graal JavaScript engine (depends on Graal TRegex engine, must be added after it) -->
<dependency >
2024-12-22 08:09:09 +01:00
<groupId > org.graalvm.polyglot</groupId>
<artifactId > js-community</artifactId>
<version > ${graaljs.version}</version>
<type > pom</type>
<scope > runtime</scope>
2021-05-06 09:08:47 +02:00
</dependency>
</dependencies>
</project>