Files
openhab-addons/bundles/org.openhab.automation.jsscripting/pom.xml
T
Andrew Fiddian-GreenandGitHub a5a74fd085 [ci build] Apply spotless to fix poms (#21115)
* fix poms
* change version on itests

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
2026-07-06 21:54:17 +02:00

169 lines
5.7 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.3.0-SNAPSHOT</version>
</parent>
<artifactId>org.openhab.automation.jsscripting</artifactId>
<name>openHAB Add-ons :: Bundles :: Automation :: JavaScript Scripting</name>
<properties>
<node.version>v22.17.1</node.version>
<ohjs.version>v5.18.2</ohjs.version>
</properties>
<dependencies>
<!-- Graal Polyglot Framework -->
<dependency>
<groupId>org.openhab.osgiify</groupId>
<artifactId>org.graalvm.polyglot.polyglot</artifactId>
<version>${graalvm.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>${graalvm.version}</version>
<!-- provided as OSGi bundle at runtime, available only at compile time -->
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<!-- clone openhab-js -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
<version>2.2.1</version>
<configuration>
<providerImplementations>
<git>jgit</git>
</providerImplementations>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-provider-jgit</artifactId>
<version>2.2.1</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>checkout-openhab-js</id>
<goals>
<goal>checkout</goal>
</goals>
<phase>initialize</phase>
<configuration>
<connectionUrl>scm:git:https://github.com/openhab/openhab-js.git</connectionUrl>
<checkoutDirectory>${project.build.directory}/js/openhab-js</checkoutDirectory>
<scmVersion>${ohjs.version}</scmVersion>
<scmVersionType>tag</scmVersionType>
<shallow>true</shallow>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>2.0.1</version>
<configuration>
<installDirectory>${project.build.directory}/js</installDirectory>
<nodeVersion>${node.version}</nodeVersion>
<workingDirectory>${project.build.directory}/js/openhab-js</workingDirectory>
</configuration>
<executions>
<!-- install Node.js and npm -->
<execution>
<id>Install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<phase>generate-sources</phase>
</execution>
<!-- install dependencies -->
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<arguments>ci</arguments>
</configuration>
</execution>
<!-- bundle openhab-js -->
<execution>
<id>npx webpack (openhab-js globals injection)</id>
<goals>
<goal>npx</goal>
</goals>
<configuration>
<!--suppress UnresolvedMavenProperty -->
<arguments>webpack -c ./build/@globals-webpack.config.js --entry-reset --entry ./build/@openhab-globals.js -o ../dist</arguments>
</configuration>
</execution>
<execution>
<id>npx webpack (openhab-js)</id>
<goals>
<goal>npx</goal>
</goals>
<configuration>
<arguments>webpack -c ./build/webpack.config.js --entry-reset --entry ./ -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>
<id>add-js-resource</id>
<goals>
<goal>add-resource</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<resources>
<resource>
<directory>${project.build.directory}/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>
<!-- workaround for failing clean of checked out git repo breaking the Windows build, #19250 -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<force>true</force>
</configuration>
</plugin>
</plugins>
</build>
</project>