2018-09-27 12:15:48 +03:00
|
|
|
<!--
|
|
|
|
|
|
2025-02-25 09:39:16 +02:00
|
|
|
Copyright © 2016-2025 The Thingsboard Authors
|
2018-09-27 12:15:48 +03:00
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
|
limitations under the License.
|
|
|
|
|
|
|
|
|
|
-->
|
|
|
|
|
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
|
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
|
<parent>
|
|
|
|
|
<groupId>org.thingsboard</groupId>
|
2025-07-24 12:58:19 +03:00
|
|
|
<version>4.3.0-SNAPSHOT</version>
|
2018-09-27 12:15:48 +03:00
|
|
|
<artifactId>msa</artifactId>
|
|
|
|
|
</parent>
|
|
|
|
|
<groupId>org.thingsboard.msa</groupId>
|
|
|
|
|
<artifactId>js-executor</artifactId>
|
|
|
|
|
<packaging>pom</packaging>
|
|
|
|
|
|
|
|
|
|
<name>ThingsBoard JavaScript Executor Microservice</name>
|
|
|
|
|
<url>https://thingsboard.io</url>
|
|
|
|
|
<description>Service executing JavaScript functions in sandboxed environment</description>
|
|
|
|
|
|
|
|
|
|
<properties>
|
|
|
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
|
|
|
<main.dir>${basedir}/../..</main.dir>
|
2018-10-04 19:44:01 +03:00
|
|
|
<docker.name>tb-js-executor</docker.name>
|
2020-05-21 19:31:44 +03:00
|
|
|
<pkg.name>tb-js-executor</pkg.name>
|
|
|
|
|
<pkg.type>js</pkg.type>
|
|
|
|
|
<pkg.disabled>false</pkg.disabled>
|
|
|
|
|
<pkg.process-resources.phase>process-resources</pkg.process-resources.phase>
|
|
|
|
|
<pkg.package.phase>package</pkg.package.phase>
|
2018-09-27 12:15:48 +03:00
|
|
|
<pkg.linux.dist>${project.build.directory}/package/linux</pkg.linux.dist>
|
|
|
|
|
<pkg.win.dist>${project.build.directory}/package/windows</pkg.win.dist>
|
2021-12-14 10:17:55 +02:00
|
|
|
<docker.push-arm-amd-image.phase>pre-integration-test</docker.push-arm-amd-image.phase>
|
2018-09-27 12:15:48 +03:00
|
|
|
</properties>
|
|
|
|
|
|
|
|
|
|
<dependencies>
|
|
|
|
|
<dependency>
|
|
|
|
|
<groupId>com.sun.winsw</groupId>
|
|
|
|
|
<artifactId>winsw</artifactId>
|
|
|
|
|
<classifier>bin</classifier>
|
|
|
|
|
<type>exe</type>
|
|
|
|
|
<scope>provided</scope>
|
|
|
|
|
</dependency>
|
|
|
|
|
</dependencies>
|
|
|
|
|
|
|
|
|
|
<build>
|
|
|
|
|
<plugins>
|
|
|
|
|
<plugin>
|
|
|
|
|
<groupId>com.github.eirslett</groupId>
|
|
|
|
|
<artifactId>frontend-maven-plugin</artifactId>
|
|
|
|
|
<configuration>
|
|
|
|
|
<installDirectory>target</installDirectory>
|
|
|
|
|
<workingDirectory>${basedir}</workingDirectory>
|
|
|
|
|
</configuration>
|
|
|
|
|
<executions>
|
|
|
|
|
<execution>
|
2020-08-28 12:59:19 +03:00
|
|
|
<id>install node and yarn</id>
|
2018-09-27 12:15:48 +03:00
|
|
|
<goals>
|
2020-08-28 12:59:19 +03:00
|
|
|
<goal>install-node-and-yarn</goal>
|
2018-09-27 12:15:48 +03:00
|
|
|
</goals>
|
|
|
|
|
<configuration>
|
2024-11-04 12:21:36 +02:00
|
|
|
<nodeVersion>v20.18.0</nodeVersion>
|
2024-11-04 10:55:56 +02:00
|
|
|
<yarnVersion>v1.22.22</yarnVersion>
|
2018-09-27 12:15:48 +03:00
|
|
|
</configuration>
|
|
|
|
|
</execution>
|
|
|
|
|
<execution>
|
2020-08-28 12:59:19 +03:00
|
|
|
<id>yarn install</id>
|
2018-09-27 12:15:48 +03:00
|
|
|
<goals>
|
2020-08-28 12:59:19 +03:00
|
|
|
<goal>yarn</goal>
|
2018-09-27 12:15:48 +03:00
|
|
|
</goals>
|
|
|
|
|
<configuration>
|
2024-03-12 19:40:12 +01:00
|
|
|
<arguments>install --non-interactive --network-concurrency 4 --network-timeout 100000 --mutex network</arguments>
|
2018-09-27 12:15:48 +03:00
|
|
|
</configuration>
|
|
|
|
|
</execution>
|
2021-12-14 17:29:03 +02:00
|
|
|
<execution>
|
|
|
|
|
<id>yarn pkg</id>
|
|
|
|
|
<goals>
|
|
|
|
|
<goal>yarn</goal>
|
|
|
|
|
</goals>
|
2022-07-07 12:43:22 +03:00
|
|
|
<phase>compile</phase>
|
2021-12-14 17:29:03 +02:00
|
|
|
<configuration>
|
|
|
|
|
<arguments>run pkg</arguments>
|
|
|
|
|
</configuration>
|
|
|
|
|
</execution>
|
2018-09-27 12:15:48 +03:00
|
|
|
</executions>
|
|
|
|
|
</plugin>
|
|
|
|
|
<plugin>
|
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
|
<artifactId>maven-dependency-plugin</artifactId>
|
|
|
|
|
</plugin>
|
|
|
|
|
<plugin>
|
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
|
<artifactId>maven-resources-plugin</artifactId>
|
2021-12-14 17:29:03 +02:00
|
|
|
<executions>
|
|
|
|
|
<execution>
|
|
|
|
|
<id>copy-src-root</id>
|
|
|
|
|
<phase>process-resources</phase>
|
|
|
|
|
<goals>
|
|
|
|
|
<goal>copy-resources</goal>
|
|
|
|
|
</goals>
|
|
|
|
|
<configuration>
|
|
|
|
|
<outputDirectory>${project.build.directory}/src</outputDirectory>
|
|
|
|
|
<resources>
|
|
|
|
|
<resource>
|
|
|
|
|
<directory>${basedir}</directory>
|
|
|
|
|
<includes>
|
|
|
|
|
<include>package.json</include>
|
|
|
|
|
<include>yarn.lock</include>
|
|
|
|
|
</includes>
|
|
|
|
|
<filtering>false</filtering>
|
|
|
|
|
</resource>
|
|
|
|
|
</resources>
|
|
|
|
|
</configuration>
|
|
|
|
|
</execution>
|
|
|
|
|
</executions>
|
2018-09-27 12:15:48 +03:00
|
|
|
</plugin>
|
|
|
|
|
<plugin>
|
2020-01-16 18:58:45 +02:00
|
|
|
<groupId>org.thingsboard</groupId>
|
2018-09-27 12:15:48 +03:00
|
|
|
<artifactId>gradle-maven-plugin</artifactId>
|
|
|
|
|
</plugin>
|
|
|
|
|
<plugin>
|
|
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
|
|
<artifactId>maven-assembly-plugin</artifactId>
|
|
|
|
|
</plugin>
|
2018-10-02 11:50:55 +03:00
|
|
|
<plugin>
|
|
|
|
|
<groupId>com.spotify</groupId>
|
|
|
|
|
<artifactId>dockerfile-maven-plugin</artifactId>
|
|
|
|
|
<executions>
|
|
|
|
|
<execution>
|
|
|
|
|
<id>build-docker-image</id>
|
|
|
|
|
<phase>pre-integration-test</phase>
|
|
|
|
|
<goals>
|
|
|
|
|
<goal>build</goal>
|
|
|
|
|
</goals>
|
2018-10-24 19:56:25 +03:00
|
|
|
<configuration>
|
|
|
|
|
<skip>${dockerfile.skip}</skip>
|
|
|
|
|
<repository>${docker.repo}/${docker.name}</repository>
|
|
|
|
|
<verbose>true</verbose>
|
|
|
|
|
<googleContainerRegistryEnabled>false</googleContainerRegistryEnabled>
|
|
|
|
|
<contextDirectory>${project.build.directory}</contextDirectory>
|
|
|
|
|
</configuration>
|
|
|
|
|
</execution>
|
|
|
|
|
<execution>
|
|
|
|
|
<id>tag-docker-image</id>
|
|
|
|
|
<phase>pre-integration-test</phase>
|
|
|
|
|
<goals>
|
|
|
|
|
<goal>tag</goal>
|
|
|
|
|
</goals>
|
|
|
|
|
<configuration>
|
|
|
|
|
<skip>${dockerfile.skip}</skip>
|
|
|
|
|
<repository>${docker.repo}/${docker.name}</repository>
|
|
|
|
|
<tag>${project.version}</tag>
|
|
|
|
|
</configuration>
|
2018-10-02 11:50:55 +03:00
|
|
|
</execution>
|
|
|
|
|
</executions>
|
|
|
|
|
</plugin>
|
2018-09-27 12:15:48 +03:00
|
|
|
</plugins>
|
|
|
|
|
</build>
|
|
|
|
|
<profiles>
|
|
|
|
|
<profile>
|
2020-08-28 12:59:19 +03:00
|
|
|
<id>yarn-start</id>
|
2018-09-27 12:15:48 +03:00
|
|
|
<activation>
|
|
|
|
|
<property>
|
2020-08-28 12:59:19 +03:00
|
|
|
<name>yarn-start</name>
|
2018-09-27 12:15:48 +03:00
|
|
|
</property>
|
|
|
|
|
</activation>
|
|
|
|
|
<build>
|
|
|
|
|
<plugins>
|
|
|
|
|
<plugin>
|
|
|
|
|
<groupId>com.github.eirslett</groupId>
|
|
|
|
|
<artifactId>frontend-maven-plugin</artifactId>
|
|
|
|
|
<configuration>
|
|
|
|
|
<installDirectory>target</installDirectory>
|
|
|
|
|
<workingDirectory>${basedir}</workingDirectory>
|
|
|
|
|
</configuration>
|
|
|
|
|
<executions>
|
|
|
|
|
<execution>
|
2020-08-28 12:59:19 +03:00
|
|
|
<id>yarn start</id>
|
2018-09-27 12:15:48 +03:00
|
|
|
<goals>
|
2020-08-28 12:59:19 +03:00
|
|
|
<goal>yarn</goal>
|
2018-09-27 12:15:48 +03:00
|
|
|
</goals>
|
|
|
|
|
|
|
|
|
|
<configuration>
|
|
|
|
|
<arguments>start</arguments>
|
|
|
|
|
</configuration>
|
|
|
|
|
</execution>
|
|
|
|
|
</executions>
|
|
|
|
|
</plugin>
|
|
|
|
|
</plugins>
|
|
|
|
|
</build>
|
|
|
|
|
</profile>
|
2018-10-24 19:56:25 +03:00
|
|
|
<profile>
|
|
|
|
|
<id>push-docker-image</id>
|
|
|
|
|
<activation>
|
|
|
|
|
<property>
|
|
|
|
|
<name>push-docker-image</name>
|
|
|
|
|
</property>
|
|
|
|
|
</activation>
|
|
|
|
|
<build>
|
|
|
|
|
<plugins>
|
|
|
|
|
<plugin>
|
|
|
|
|
<groupId>com.spotify</groupId>
|
|
|
|
|
<artifactId>dockerfile-maven-plugin</artifactId>
|
|
|
|
|
<executions>
|
|
|
|
|
<execution>
|
|
|
|
|
<id>push-latest-docker-image</id>
|
|
|
|
|
<phase>pre-integration-test</phase>
|
|
|
|
|
<goals>
|
|
|
|
|
<goal>push</goal>
|
|
|
|
|
</goals>
|
|
|
|
|
<configuration>
|
|
|
|
|
<tag>latest</tag>
|
|
|
|
|
<repository>${docker.repo}/${docker.name}</repository>
|
|
|
|
|
</configuration>
|
|
|
|
|
</execution>
|
|
|
|
|
<execution>
|
|
|
|
|
<id>push-version-docker-image</id>
|
|
|
|
|
<phase>pre-integration-test</phase>
|
|
|
|
|
<goals>
|
|
|
|
|
<goal>push</goal>
|
|
|
|
|
</goals>
|
|
|
|
|
<configuration>
|
|
|
|
|
<tag>${project.version}</tag>
|
|
|
|
|
<repository>${docker.repo}/${docker.name}</repository>
|
|
|
|
|
</configuration>
|
|
|
|
|
</execution>
|
|
|
|
|
</executions>
|
|
|
|
|
</plugin>
|
|
|
|
|
</plugins>
|
|
|
|
|
</build>
|
|
|
|
|
</profile>
|
2018-09-27 12:15:48 +03:00
|
|
|
</profiles>
|
|
|
|
|
<repositories>
|
|
|
|
|
<repository>
|
|
|
|
|
<id>jenkins</id>
|
|
|
|
|
<name>Jenkins Repository</name>
|
2020-06-10 18:20:32 +03:00
|
|
|
<url>https://repo.jenkins-ci.org/releases</url>
|
2018-09-27 12:15:48 +03:00
|
|
|
<snapshots>
|
|
|
|
|
<enabled>false</enabled>
|
|
|
|
|
</snapshots>
|
|
|
|
|
</repository>
|
|
|
|
|
</repositories>
|
|
|
|
|
</project>
|