Open-source IoT Platform - Device management, data collection, processing and visualization.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

261 lines
12 KiB

<!--
Copyright © 2016-2026 The Thingsboard Authors
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>
<version>4.2.2.2-SNAPSHOT</version>
<artifactId>thingsboard</artifactId>
</parent>
<artifactId>msa</artifactId>
<packaging>pom</packaging>
<name>ThingsBoard Microservices</name>
<url>https://thingsboard.io</url>
<properties>
<main.dir>${basedir}/..</main.dir>
<!-- msa/* docker modules copy the .deb from target/ directly (not via Maven reactor),
so they need the DEB-copy goal to run at the package phase regardless of
pkg.package.phase (which is "none" here since these modules don't produce packaging). -->
<pkg.deb.phase>package</pkg.deb.phase>
<docker.repo>thingsboard</docker.repo>
<docker.base.image>thingsboard/openjdk17:bookworm-slim</docker.base.image>
<dockerfile.skip>true</dockerfile.skip>
<blackBoxTests.skip>true</blackBoxTests.skip>
<exec-maven-plugin.version>3.5.1</exec-maven-plugin.version>
<docker.push-arm-amd-image.phase>none</docker.push-arm-amd-image.phase>
</properties>
<modules>
<!--Modules order is important to speedup parallel build and avoid yarn pgk parallel execution-->
<module>tb</module>
<module>web-ui</module>
<module>vc-executor</module>
<module>vc-executor-docker</module>
<module>tb-node</module>
<module>transport</module>
<module>js-executor</module>
<module>monitoring</module>
<module>edqs</module>
</modules>
<profiles>
<!-- Mirror of the root-pom skip-deb profile. Required because Maven resolves
child <properties> entries (pkg.deb.phase=package above) with higher priority
than profile properties from a parent POM. Redeclaring the profile here ensures
pkg.deb.phase=none wins when -Dpkg.skip.deb=true is passed. -->
<profile>
<id>skip-deb</id>
<activation>
<property>
<name>pkg.skip.deb</name>
<value>true</value>
</property>
</activation>
<properties>
<pkg.deb.phase>none</pkg.deb.phase>
</properties>
</profile>
<!-- Mirror of the root-pom skip-pkg profile. Same precedence reason as skip-deb above:
pkg.deb.phase=package in this POM's <properties> would win over the parent profile,
so we must redeclare it here to ensure pkg.deb.phase=none when -Dpkg.skip=true. -->
<profile>
<id>skip-pkg</id>
<activation>
<property>
<name>pkg.skip</name>
<value>true</value>
</property>
</activation>
<properties>
<pkg.deb.phase>none</pkg.deb.phase>
</properties>
</profile>
<profile>
<id>black-box-tests</id>
<activation>
<property>
<name>blackBoxTests.skip</name>
<value>false</value>
</property>
</activation>
<modules>
<module>black-box-tests</module>
</modules>
</profile>
<profile>
<id>push-docker-amd-arm-images</id>
<activation>
<property>
<name>push-docker-amd-arm-images</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>push-latest-docker-amd-arm-images</id>
<phase>${docker.push-arm-amd-image.phase}</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>docker</executable>
<workingDirectory>${project.build.directory}</workingDirectory>
<arguments>
<argument>buildx</argument>
<argument>build</argument>
<argument>-t</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
<argument>--platform=linux/amd64,linux/arm64</argument>
<argument>-o</argument>
<argument>type=registry</argument>
<argument>.</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>push-version-docker-amd-arm-images</id>
<phase>${docker.push-arm-amd-image.phase}</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>docker</executable>
<workingDirectory>${project.build.directory}</workingDirectory>
<arguments>
<argument>buildx</argument>
<argument>build</argument>
<argument>-t</argument>
<argument>${docker.repo}/${docker.name}:${project.version}</argument>
<argument>--platform=linux/amd64,linux/arm64</argument>
<argument>-o</argument>
<argument>type=registry</argument>
<argument>.</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>push-lts-docker-amd-arm-images</id>
<activation>
<property>
<name>push-lts-docker-amd-arm-images</name>
</property>
</activation>
<properties>
<docker.lts.tag>4.2.2-latest</docker.lts.tag>
<docker.skip.latest.tag>true</docker.skip.latest.tag>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>push-latest-docker-amd-arm-images</id>
<phase>${docker.push-arm-amd-image.phase}</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<skip>${docker.skip.latest.tag}</skip>
<executable>docker</executable>
<workingDirectory>${project.build.directory}</workingDirectory>
<arguments>
<argument>buildx</argument>
<argument>build</argument>
<argument>-t</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
<argument>--platform=linux/amd64,linux/arm64</argument>
<argument>-o</argument>
<argument>type=registry</argument>
<argument>.</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>push-version-docker-amd-arm-images</id>
<phase>${docker.push-arm-amd-image.phase}</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>docker</executable>
<workingDirectory>${project.build.directory}</workingDirectory>
<arguments>
<argument>buildx</argument>
<argument>build</argument>
<argument>-t</argument>
<argument>${docker.repo}/${docker.name}:${project.version}</argument>
<argument>--platform=linux/amd64,linux/arm64</argument>
<argument>-o</argument>
<argument>type=registry</argument>
<argument>.</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>push-lts-docker-amd-arm-images</id>
<phase>${docker.push-arm-amd-image.phase}</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>docker</executable>
<workingDirectory>${project.build.directory}</workingDirectory>
<arguments>
<argument>buildx</argument>
<argument>build</argument>
<argument>-t</argument>
<argument>${docker.repo}/${docker.name}:${docker.lts.tag}</argument>
<argument>--platform=linux/amd64,linux/arm64</argument>
<argument>-o</argument>
<argument>type=registry</argument>
<argument>.</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${exec-maven-plugin.version}</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>