Browse Source

Merge pull request #15311 from thingsboard/rc

Merge rc into master
pull/14133/merge
Viacheslav Klimov 4 weeks ago
committed by GitHub
parent
commit
16636f05a1
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 16
      TEST_FAST.md
  2. 5
      application/pom.xml
  3. 2
      build.sh
  4. 5
      edqs/pom.xml
  5. 5
      monitoring/pom.xml
  6. 26
      msa/black-box-tests/pom.xml
  7. 110
      msa/edqs/pom.xml
  8. 59
      msa/js-executor/pom.xml
  9. 110
      msa/monitoring/pom.xml
  10. 50
      msa/pom.xml
  11. 110
      msa/tb-node/pom.xml
  12. 205
      msa/tb/pom.xml
  13. 110
      msa/transport/coap/pom.xml
  14. 110
      msa/transport/http/pom.xml
  15. 110
      msa/transport/lwm2m/pom.xml
  16. 110
      msa/transport/mqtt/pom.xml
  17. 110
      msa/transport/snmp/pom.xml
  18. 110
      msa/vc-executor-docker/pom.xml
  19. 5
      msa/vc-executor/pom.xml
  20. 59
      msa/web-ui/pom.xml
  21. 3
      packaging/java/build.gradle
  22. 3
      packaging/js/build.gradle
  23. 115
      pom.xml
  24. 5
      transport/coap/pom.xml
  25. 5
      transport/http/pom.xml
  26. 5
      transport/lwm2m/pom.xml
  27. 5
      transport/mqtt/pom.xml
  28. 5
      transport/snmp/pom.xml

16
TEST_FAST.md

@ -6,7 +6,9 @@ export MAVEN_OPTS="-Xmx1024m"
export NODE_OPTIONS="--max_old_space_size=4096"
export SUREFIRE_JAVA_OPTS="-Xmx1200m -Xss256k -XX:+ExitOnOutOfMemoryError"
mvn clean install -T6 -DskipTests
# Compile and install all modules, skip packaging artifacts not needed for tests
mvn clean install -T6 -DskipTests -Dpkg.skip=true
mvn test -pl='!application,!dao,!ui-ngx,!msa/js-executor,!msa/web-ui' -T4
mvn test -pl dao -Dparallel=packages -DforkCount=4
@ -31,6 +33,18 @@ mvn test -pl application -Dtest='
' -DforkCount=6 -Dparallel=packages -Dsurefire.rerunFailingTestsCount=2 -Dsurefire.failOnFlakeCount=5
```
## pkg.skip.* flags reference
Use `-Dpkg.skip=true` to skip all packaging at once (equivalent to all four flags below).
| Flag | Skips | Safe to skip for tests? |
|----------------------------|-------------------------------------------|--------------------------------------------------------------|
| `-Dpkg.skip=true` | All of the below (bootjar + deb + rpm + zip) | Yes |
| `-Dpkg.skip.bootjar=true` | `spring-boot:repackage` (`*-boot.jar`) | Yes — tests use the regular `.jar`, not the fat boot jar |
| `-Dpkg.skip.deb=true` | Gradle `buildDeb` + Maven `attach-artifact` | Yes — MSA docker modules copy the DEB from `target/` directly |
| `-Dpkg.skip.rpm=true` | Gradle `buildRpm` | Yes — no test depends on the RPM |
| `-Dpkg.skip.zip=true` | `maven-assembly-plugin` Windows ZIP | Yes — no test depends on the ZIP |
## Testcontainers compatibility with the Docker API workaround
In case your tests failed to run testcontainers due to unsupported Docker API version

5
application/pom.xml

@ -35,7 +35,6 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<main.dir>${basedir}/..</main.dir>
<pkg.type>java</pkg.type>
<pkg.disabled>false</pkg.disabled>
<pkg.process-resources.phase>process-resources</pkg.process-resources.phase>
<pkg.package.phase>package</pkg.package.phase>
<pkg.name>thingsboard</pkg.name>
@ -498,10 +497,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>

2
build.sh

@ -31,7 +31,7 @@ java -version
#echo "Cleaning ui-ngx/node_modules" && rm -rf ui-ngx/node_modules
MAVEN_OPTS="-Xmx1024m" NODE_OPTIONS="--max_old_space_size=4096" DOCKER_CLI_EXPERIMENTAL=enabled DOCKER_BUILDKIT=0 \
mvn -T2 license:format clean install -DskipTests \
mvn -T6 license:format clean install -DskipTests -Dpkg.skip=true \
$PROJECTS --also-make
# \
# -Dpush-docker-amd-arm-images

5
edqs/pom.xml

@ -33,7 +33,6 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<main.dir>${basedir}/..</main.dir>
<pkg.type>java</pkg.type>
<pkg.disabled>false</pkg.disabled>
<pkg.process-resources.phase>process-resources</pkg.process-resources.phase>
<pkg.package.phase>package</pkg.package.phase>
<pkg.name>tb-edqs</pkg.name>
@ -179,10 +178,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>

5
monitoring/pom.xml

@ -33,7 +33,6 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<main.dir>${basedir}/..</main.dir>
<pkg.type>java</pkg.type>
<pkg.disabled>false</pkg.disabled>
<pkg.process-resources.phase>process-resources</pkg.process-resources.phase>
<pkg.package.phase>package</pkg.package.phase>
<pkg.name>tb-monitoring</pkg.name>
@ -154,8 +153,8 @@
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

26
msa/black-box-tests/pom.xml

@ -128,42 +128,50 @@
<dependency>
<groupId>org.thingsboard.msa</groupId>
<artifactId>js-executor</artifactId>
<type>docker-info</type>
<version>${project.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.thingsboard.msa</groupId>
<artifactId>web-ui</artifactId>
<type>docker-info</type>
<version>${project.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.thingsboard.msa</groupId>
<artifactId>tb-node</artifactId>
<type>docker-info</type>
<version>${project.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.thingsboard.msa.transport</groupId>
<artifactId>coap</artifactId>
<type>docker-info</type>
<version>${project.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.thingsboard.msa.transport</groupId>
<artifactId>http</artifactId>
<type>docker-info</type>
<version>${project.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.thingsboard.msa.transport</groupId>
<artifactId>mqtt</artifactId>
<type>docker-info</type>
<version>${project.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.thingsboard.msa.transport</groupId>
<artifactId>lwm2m</artifactId>
<type>docker-info</type>
<version>${project.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.thingsboard.msa.transport</groupId>
<artifactId>snmp</artifactId>
<type>docker-info</type>
<version>${project.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.thingsboard.common</groupId>
@ -206,7 +214,7 @@
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-testng</artifactId>
<version>${surefire.version}</version>
<version>${maven-surefire-plugin.version}</version>
</dependency>
</dependencies>
</plugin>

110
msa/edqs/pom.xml

@ -33,7 +33,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<main.dir>${basedir}/../..</main.dir>
<main.dir>${maven.multiModuleProjectDirectory}</main.dir>
<pkg.name>tb-edqs</pkg.name>
<docker.name>tb-edqs</docker.name>
<pkg.logFolder>/var/log/${pkg.name}</pkg.logFolder>
@ -46,8 +46,6 @@
<groupId>org.thingsboard</groupId>
<artifactId>edqs</artifactId>
<version>${project.version}</version>
<classifier>deb</classifier>
<type>deb</type>
<scope>provided</scope>
</dependency>
</dependencies>
@ -56,25 +54,21 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>copy-edqs</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<id>enforce-deb-exists</id>
<phase>${pkg.deb.phase}</phase>
<goals><goal>enforce</goal></goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.thingsboard</groupId>
<artifactId>edqs</artifactId>
<classifier>deb</classifier>
<type>deb</type>
<destFileName>${pkg.name}.deb</destFileName>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
</artifactItems>
<rules>
<requireFilesExist>
<files>
<file>${main.dir}/edqs/target/${pkg.name}.deb</file>
</files>
<message>DEB artifact not found at ${main.dir}/edqs/target/${pkg.name}.deb — build the upstream module first or pass -Dpkg.skip.deb=true.</message>
</requireFilesExist>
</rules>
</configuration>
</execution>
</executions>
@ -99,36 +93,60 @@
</resources>
</configuration>
</execution>
<execution>
<id>copy-edqs</id>
<phase>${pkg.deb.phase}</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
<overwrite>true</overwrite>
<resources>
<resource>
<directory>${main.dir}/edqs/target</directory>
<includes>
<include>${pkg.name}.deb</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>build-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>build</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<skip>${dockerfile.skip}</skip>
<repository>${docker.repo}/${docker.name}</repository>
<verbose>true</verbose>
<googleContainerRegistryEnabled>false</googleContainerRegistryEnabled>
<contextDirectory>${project.build.directory}</contextDirectory>
<executable>docker</executable>
<workingDirectory>${project.build.directory}</workingDirectory>
<arguments>
<argument>build</argument>
<argument>-t</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
<argument>.</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>tag-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>tag</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<skip>${dockerfile.skip}</skip>
<repository>${docker.repo}/${docker.name}</repository>
<tag>${project.version}</tag>
<executable>docker</executable>
<arguments>
<argument>tag</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
<argument>${docker.repo}/${docker.name}:${project.version}</argument>
</arguments>
</configuration>
</execution>
</executions>
@ -146,29 +164,31 @@
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>push-latest-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>push</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<tag>latest</tag>
<repository>${docker.repo}/${docker.name}</repository>
<executable>docker</executable>
<arguments>
<argument>push</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>push-version-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>push</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<tag>${project.version}</tag>
<repository>${docker.repo}/${docker.name}</repository>
<executable>docker</executable>
<arguments>
<argument>push</argument>
<argument>${docker.repo}/${docker.name}:${project.version}</argument>
</arguments>
</configuration>
</execution>
</executions>

59
msa/js-executor/pom.xml

@ -37,7 +37,6 @@
<docker.name>tb-js-executor</docker.name>
<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>
<pkg.linux.dist>${project.build.directory}/package/linux</pkg.linux.dist>
@ -146,33 +145,37 @@
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>build-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>build</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<skip>${dockerfile.skip}</skip>
<repository>${docker.repo}/${docker.name}</repository>
<verbose>true</verbose>
<googleContainerRegistryEnabled>false</googleContainerRegistryEnabled>
<contextDirectory>${project.build.directory}</contextDirectory>
<executable>docker</executable>
<workingDirectory>${project.build.directory}</workingDirectory>
<arguments>
<argument>build</argument>
<argument>-t</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
<argument>.</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>tag-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>tag</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<skip>${dockerfile.skip}</skip>
<repository>${docker.repo}/${docker.name}</repository>
<tag>${project.version}</tag>
<executable>docker</executable>
<arguments>
<argument>tag</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
<argument>${docker.repo}/${docker.name}:${project.version}</argument>
</arguments>
</configuration>
</execution>
</executions>
@ -222,29 +225,31 @@
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>push-latest-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>push</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<tag>latest</tag>
<repository>${docker.repo}/${docker.name}</repository>
<executable>docker</executable>
<arguments>
<argument>push</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>push-version-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>push</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<tag>${project.version}</tag>
<repository>${docker.repo}/${docker.name}</repository>
<executable>docker</executable>
<arguments>
<argument>push</argument>
<argument>${docker.repo}/${docker.name}:${project.version}</argument>
</arguments>
</configuration>
</execution>
</executions>

110
msa/monitoring/pom.xml

@ -34,7 +34,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<main.dir>${basedir}/../..</main.dir>
<main.dir>${maven.multiModuleProjectDirectory}</main.dir>
<pkg.name>tb-monitoring</pkg.name>
<docker.name>tb-monitoring</docker.name>
<pkg.logFolder>/var/log/${pkg.name}</pkg.logFolder>
@ -47,8 +47,6 @@
<groupId>org.thingsboard</groupId>
<artifactId>monitoring</artifactId>
<version>${project.version}</version>
<classifier>deb</classifier>
<type>deb</type>
<scope>provided</scope>
</dependency>
</dependencies>
@ -57,25 +55,21 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>copy-tb-monitoring-deb</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<id>enforce-deb-exists</id>
<phase>${pkg.deb.phase}</phase>
<goals><goal>enforce</goal></goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.thingsboard</groupId>
<artifactId>monitoring</artifactId>
<classifier>deb</classifier>
<type>deb</type>
<destFileName>${pkg.name}.deb</destFileName>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
</artifactItems>
<rules>
<requireFilesExist>
<files>
<file>${main.dir}/monitoring/target/${pkg.name}.deb</file>
</files>
<message>DEB artifact not found at ${main.dir}/monitoring/target/${pkg.name}.deb — build the upstream module first or pass -Dpkg.skip.deb=true.</message>
</requireFilesExist>
</rules>
</configuration>
</execution>
</executions>
@ -100,36 +94,60 @@
</resources>
</configuration>
</execution>
<execution>
<id>copy-tb-monitoring-deb</id>
<phase>${pkg.deb.phase}</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
<overwrite>true</overwrite>
<resources>
<resource>
<directory>${main.dir}/monitoring/target</directory>
<includes>
<include>${pkg.name}.deb</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>build-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>build</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<skip>${dockerfile.skip}</skip>
<repository>${docker.repo}/${docker.name}</repository>
<verbose>true</verbose>
<googleContainerRegistryEnabled>false</googleContainerRegistryEnabled>
<contextDirectory>${project.build.directory}</contextDirectory>
<executable>docker</executable>
<workingDirectory>${project.build.directory}</workingDirectory>
<arguments>
<argument>build</argument>
<argument>-t</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
<argument>.</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>tag-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>tag</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<skip>${dockerfile.skip}</skip>
<repository>${docker.repo}/${docker.name}</repository>
<tag>${project.version}</tag>
<executable>docker</executable>
<arguments>
<argument>tag</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
<argument>${docker.repo}/${docker.name}:${project.version}</argument>
</arguments>
</configuration>
</execution>
</executions>
@ -147,29 +165,31 @@
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>push-latest-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>push</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<tag>latest</tag>
<repository>${docker.repo}/${docker.name}</repository>
<executable>docker</executable>
<arguments>
<argument>push</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>push-version-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>push</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<tag>${project.version}</tag>
<repository>${docker.repo}/${docker.name}</repository>
<executable>docker</executable>
<arguments>
<argument>push</argument>
<argument>${docker.repo}/${docker.name}:${project.version}</argument>
</arguments>
</configuration>
</execution>
</executions>

50
msa/pom.xml

@ -31,11 +31,15 @@
<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/openjdk25:trixie-slim</docker.base.image>
<dockerfile.skip>true</dockerfile.skip>
<blackBoxTests.skip>true</blackBoxTests.skip>
<dockerfile-maven.version>1.4.13</dockerfile-maven.version>
<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>
@ -53,6 +57,37 @@
</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>
@ -213,19 +248,12 @@
</profile>
</profiles>
<build>
<extensions>
<extension>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-extension</artifactId>
<version>${dockerfile-maven.version}</version>
</extension>
</extensions>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<version>${dockerfile-maven.version}</version>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${exec-maven-plugin.version}</version>
</plugin>
</plugins>
</pluginManagement>

110
msa/tb-node/pom.xml

@ -33,7 +33,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<main.dir>${basedir}/../..</main.dir>
<main.dir>${maven.multiModuleProjectDirectory}</main.dir>
<pkg.name>thingsboard</pkg.name>
<docker.name>tb-node</docker.name>
<pkg.unixLogFolder>/var/log/${pkg.name}</pkg.unixLogFolder>
@ -46,8 +46,6 @@
<groupId>org.thingsboard</groupId>
<artifactId>application</artifactId>
<version>${project.version}</version>
<classifier>deb</classifier>
<type>deb</type>
<scope>provided</scope>
</dependency>
</dependencies>
@ -56,25 +54,21 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>copy-tb-deb</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<id>enforce-deb-exists</id>
<phase>${pkg.deb.phase}</phase>
<goals><goal>enforce</goal></goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.thingsboard</groupId>
<artifactId>application</artifactId>
<classifier>deb</classifier>
<type>deb</type>
<destFileName>${pkg.name}.deb</destFileName>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
</artifactItems>
<rules>
<requireFilesExist>
<files>
<file>${main.dir}/application/target/${pkg.name}.deb</file>
</files>
<message>DEB artifact not found at ${main.dir}/application/target/${pkg.name}.deb — build the upstream module first or pass -Dpkg.skip.deb=true.</message>
</requireFilesExist>
</rules>
</configuration>
</execution>
</executions>
@ -99,36 +93,60 @@
</resources>
</configuration>
</execution>
<execution>
<id>copy-tb-deb</id>
<phase>${pkg.deb.phase}</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
<overwrite>true</overwrite>
<resources>
<resource>
<directory>${main.dir}/application/target</directory>
<includes>
<include>${pkg.name}.deb</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>build-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>build</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<skip>${dockerfile.skip}</skip>
<repository>${docker.repo}/${docker.name}</repository>
<verbose>true</verbose>
<googleContainerRegistryEnabled>false</googleContainerRegistryEnabled>
<contextDirectory>${project.build.directory}</contextDirectory>
<executable>docker</executable>
<workingDirectory>${project.build.directory}</workingDirectory>
<arguments>
<argument>build</argument>
<argument>-t</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
<argument>.</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>tag-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>tag</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<skip>${dockerfile.skip}</skip>
<repository>${docker.repo}/${docker.name}</repository>
<tag>${project.version}</tag>
<executable>docker</executable>
<arguments>
<argument>tag</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
<argument>${docker.repo}/${docker.name}:${project.version}</argument>
</arguments>
</configuration>
</execution>
</executions>
@ -146,29 +164,31 @@
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>push-latest-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>push</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<tag>latest</tag>
<repository>${docker.repo}/${docker.name}</repository>
<executable>docker</executable>
<arguments>
<argument>push</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>push-version-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>push</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<tag>${project.version}</tag>
<repository>${docker.repo}/${docker.name}</repository>
<executable>docker</executable>
<arguments>
<argument>push</argument>
<argument>${docker.repo}/${docker.name}:${project.version}</argument>
</arguments>
</configuration>
</execution>
</executions>

205
msa/tb/pom.xml

@ -33,7 +33,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<main.dir>${basedir}/../..</main.dir>
<main.dir>${maven.multiModuleProjectDirectory}</main.dir>
<pkg.name>thingsboard</pkg.name>
<tb-postgres.docker.name>tb-postgres</tb-postgres.docker.name>
<tb-cassandra.docker.name>tb-cassandra</tb-cassandra.docker.name>
@ -45,8 +45,6 @@
<groupId>org.thingsboard</groupId>
<artifactId>application</artifactId>
<version>${project.version}</version>
<classifier>deb</classifier>
<type>deb</type>
<scope>provided</scope>
</dependency>
</dependencies>
@ -55,44 +53,21 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>copy-tb-postgres-deb</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.thingsboard</groupId>
<artifactId>application</artifactId>
<classifier>deb</classifier>
<type>deb</type>
<destFileName>${pkg.name}.deb</destFileName>
<outputDirectory>${project.build.directory}/docker-postgres</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
<execution>
<id>copy-tb-cassandra-deb</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<id>enforce-deb-exists</id>
<phase>${pkg.deb.phase}</phase>
<goals><goal>enforce</goal></goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.thingsboard</groupId>
<artifactId>application</artifactId>
<classifier>deb</classifier>
<type>deb</type>
<destFileName>${pkg.name}.deb</destFileName>
<outputDirectory>${project.build.directory}/docker-cassandra</outputDirectory>
</artifactItem>
</artifactItems>
<rules>
<requireFilesExist>
<files>
<file>${main.dir}/application/target/${pkg.name}.deb</file>
</files>
<message>DEB artifact not found at ${main.dir}/application/target/${pkg.name}.deb — build the upstream module first or pass -Dpkg.skip.deb=true.</message>
</requireFilesExist>
</rules>
</configuration>
</execution>
</executions>
@ -101,7 +76,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<execution>
<id>copy-docker-tb-postgres-config</id>
<phase>process-resources</phase>
<goals>
@ -141,64 +116,112 @@
</resources>
</configuration>
</execution>
<execution>
<id>copy-tb-postgres-deb</id>
<phase>${pkg.deb.phase}</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/docker-postgres</outputDirectory>
<overwrite>true</overwrite>
<resources>
<resource>
<directory>${main.dir}/application/target</directory>
<includes>
<include>${pkg.name}.deb</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>copy-tb-cassandra-deb</id>
<phase>${pkg.deb.phase}</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/docker-cassandra</outputDirectory>
<overwrite>true</overwrite>
<resources>
<resource>
<directory>${main.dir}/application/target</directory>
<includes>
<include>${pkg.name}.deb</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>build-docker-tb-postgres-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>build</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<skip>${dockerfile.skip}</skip>
<repository>${docker.repo}/${tb-postgres.docker.name}</repository>
<verbose>true</verbose>
<googleContainerRegistryEnabled>false</googleContainerRegistryEnabled>
<contextDirectory>${project.build.directory}/docker-postgres</contextDirectory>
<noCache>true</noCache>
<executable>docker</executable>
<workingDirectory>${project.build.directory}/docker-postgres</workingDirectory>
<arguments>
<argument>build</argument>
<argument>--no-cache</argument>
<argument>-t</argument>
<argument>${docker.repo}/${tb-postgres.docker.name}:latest</argument>
<argument>.</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>tag-docker-tb-postgres-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>tag</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<skip>${dockerfile.skip}</skip>
<repository>${docker.repo}/${tb-postgres.docker.name}</repository>
<tag>${project.version}</tag>
<executable>docker</executable>
<arguments>
<argument>tag</argument>
<argument>${docker.repo}/${tb-postgres.docker.name}:latest</argument>
<argument>${docker.repo}/${tb-postgres.docker.name}:${project.version}</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>build-docker-tb-cassandra-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>build</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<skip>${dockerfile.skip}</skip>
<repository>${docker.repo}/${tb-cassandra.docker.name}</repository>
<verbose>true</verbose>
<googleContainerRegistryEnabled>false</googleContainerRegistryEnabled>
<contextDirectory>${project.build.directory}/docker-cassandra</contextDirectory>
<noCache>true</noCache>
<executable>docker</executable>
<workingDirectory>${project.build.directory}/docker-cassandra</workingDirectory>
<arguments>
<argument>build</argument>
<argument>--no-cache</argument>
<argument>-t</argument>
<argument>${docker.repo}/${tb-cassandra.docker.name}:latest</argument>
<argument>.</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>tag-docker-tb-cassandra-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>tag</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<skip>${dockerfile.skip}</skip>
<repository>${docker.repo}/${tb-cassandra.docker.name}</repository>
<tag>${project.version}</tag>
<executable>docker</executable>
<arguments>
<argument>tag</argument>
<argument>${docker.repo}/${tb-cassandra.docker.name}:latest</argument>
<argument>${docker.repo}/${tb-cassandra.docker.name}:${project.version}</argument>
</arguments>
</configuration>
</execution>
</executions>
@ -216,51 +239,55 @@
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>push-latest-docker-tb-postgres-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>push</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<tag>latest</tag>
<repository>${docker.repo}/${tb-postgres.docker.name}</repository>
<executable>docker</executable>
<arguments>
<argument>push</argument>
<argument>${docker.repo}/${tb-postgres.docker.name}:latest</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>push-version-docker-tb-postgres-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>push</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<tag>${project.version}</tag>
<repository>${docker.repo}/${tb-postgres.docker.name}</repository>
<executable>docker</executable>
<arguments>
<argument>push</argument>
<argument>${docker.repo}/${tb-postgres.docker.name}:${project.version}</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>push-latest-docker-tb-cassandra-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>push</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<tag>latest</tag>
<repository>${docker.repo}/${tb-cassandra.docker.name}</repository>
<executable>docker</executable>
<arguments>
<argument>push</argument>
<argument>${docker.repo}/${tb-cassandra.docker.name}:latest</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>push-version-docker-tb-cassandra-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>push</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<tag>${project.version}</tag>
<repository>${docker.repo}/${tb-cassandra.docker.name}</repository>
<executable>docker</executable>
<arguments>
<argument>push</argument>
<argument>${docker.repo}/${tb-cassandra.docker.name}:${project.version}</argument>
</arguments>
</configuration>
</execution>
</executions>

110
msa/transport/coap/pom.xml

@ -33,7 +33,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<main.dir>${basedir}/../../..</main.dir>
<main.dir>${maven.multiModuleProjectDirectory}</main.dir>
<pkg.name>tb-coap-transport</pkg.name>
<docker.name>tb-coap-transport</docker.name>
<pkg.logFolder>/var/log/${pkg.name}</pkg.logFolder>
@ -46,8 +46,6 @@
<groupId>org.thingsboard.transport</groupId>
<artifactId>coap</artifactId>
<version>${project.version}</version>
<classifier>deb</classifier>
<type>deb</type>
<scope>provided</scope>
</dependency>
</dependencies>
@ -56,25 +54,21 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>copy-tb-coap-transport-deb</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<id>enforce-deb-exists</id>
<phase>${pkg.deb.phase}</phase>
<goals><goal>enforce</goal></goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.thingsboard.transport</groupId>
<artifactId>coap</artifactId>
<classifier>deb</classifier>
<type>deb</type>
<destFileName>${pkg.name}.deb</destFileName>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
</artifactItems>
<rules>
<requireFilesExist>
<files>
<file>${main.dir}/transport/coap/target/${pkg.name}.deb</file>
</files>
<message>DEB artifact not found at ${main.dir}/transport/coap/target/${pkg.name}.deb — build the upstream module first or pass -Dpkg.skip.deb=true.</message>
</requireFilesExist>
</rules>
</configuration>
</execution>
</executions>
@ -99,36 +93,60 @@
</resources>
</configuration>
</execution>
<execution>
<id>copy-tb-coap-transport-deb</id>
<phase>${pkg.deb.phase}</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
<overwrite>true</overwrite>
<resources>
<resource>
<directory>${main.dir}/transport/coap/target</directory>
<includes>
<include>${pkg.name}.deb</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>build-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>build</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<skip>${dockerfile.skip}</skip>
<repository>${docker.repo}/${docker.name}</repository>
<verbose>true</verbose>
<googleContainerRegistryEnabled>false</googleContainerRegistryEnabled>
<contextDirectory>${project.build.directory}</contextDirectory>
<executable>docker</executable>
<workingDirectory>${project.build.directory}</workingDirectory>
<arguments>
<argument>build</argument>
<argument>-t</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
<argument>.</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>tag-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>tag</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<skip>${dockerfile.skip}</skip>
<repository>${docker.repo}/${docker.name}</repository>
<tag>${project.version}</tag>
<executable>docker</executable>
<arguments>
<argument>tag</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
<argument>${docker.repo}/${docker.name}:${project.version}</argument>
</arguments>
</configuration>
</execution>
</executions>
@ -146,29 +164,31 @@
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>push-latest-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>push</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<tag>latest</tag>
<repository>${docker.repo}/${docker.name}</repository>
<executable>docker</executable>
<arguments>
<argument>push</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>push-version-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>push</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<tag>${project.version}</tag>
<repository>${docker.repo}/${docker.name}</repository>
<executable>docker</executable>
<arguments>
<argument>push</argument>
<argument>${docker.repo}/${docker.name}:${project.version}</argument>
</arguments>
</configuration>
</execution>
</executions>

110
msa/transport/http/pom.xml

@ -33,7 +33,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<main.dir>${basedir}/../../..</main.dir>
<main.dir>${maven.multiModuleProjectDirectory}</main.dir>
<pkg.name>tb-http-transport</pkg.name>
<docker.name>tb-http-transport</docker.name>
<pkg.logFolder>/var/log/${pkg.name}</pkg.logFolder>
@ -46,8 +46,6 @@
<groupId>org.thingsboard.transport</groupId>
<artifactId>http</artifactId>
<version>${project.version}</version>
<classifier>deb</classifier>
<type>deb</type>
<scope>provided</scope>
</dependency>
</dependencies>
@ -56,25 +54,21 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>copy-tb-http-transport-deb</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<id>enforce-deb-exists</id>
<phase>${pkg.deb.phase}</phase>
<goals><goal>enforce</goal></goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.thingsboard.transport</groupId>
<artifactId>http</artifactId>
<classifier>deb</classifier>
<type>deb</type>
<destFileName>${pkg.name}.deb</destFileName>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
</artifactItems>
<rules>
<requireFilesExist>
<files>
<file>${main.dir}/transport/http/target/${pkg.name}.deb</file>
</files>
<message>DEB artifact not found at ${main.dir}/transport/http/target/${pkg.name}.deb — build the upstream module first or pass -Dpkg.skip.deb=true.</message>
</requireFilesExist>
</rules>
</configuration>
</execution>
</executions>
@ -99,36 +93,60 @@
</resources>
</configuration>
</execution>
<execution>
<id>copy-tb-http-transport-deb</id>
<phase>${pkg.deb.phase}</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
<overwrite>true</overwrite>
<resources>
<resource>
<directory>${main.dir}/transport/http/target</directory>
<includes>
<include>${pkg.name}.deb</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>build-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>build</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<skip>${dockerfile.skip}</skip>
<repository>${docker.repo}/${docker.name}</repository>
<verbose>true</verbose>
<googleContainerRegistryEnabled>false</googleContainerRegistryEnabled>
<contextDirectory>${project.build.directory}</contextDirectory>
<executable>docker</executable>
<workingDirectory>${project.build.directory}</workingDirectory>
<arguments>
<argument>build</argument>
<argument>-t</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
<argument>.</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>tag-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>tag</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<skip>${dockerfile.skip}</skip>
<repository>${docker.repo}/${docker.name}</repository>
<tag>${project.version}</tag>
<executable>docker</executable>
<arguments>
<argument>tag</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
<argument>${docker.repo}/${docker.name}:${project.version}</argument>
</arguments>
</configuration>
</execution>
</executions>
@ -146,29 +164,31 @@
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>push-latest-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>push</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<tag>latest</tag>
<repository>${docker.repo}/${docker.name}</repository>
<executable>docker</executable>
<arguments>
<argument>push</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>push-version-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>push</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<tag>${project.version}</tag>
<repository>${docker.repo}/${docker.name}</repository>
<executable>docker</executable>
<arguments>
<argument>push</argument>
<argument>${docker.repo}/${docker.name}:${project.version}</argument>
</arguments>
</configuration>
</execution>
</executions>

110
msa/transport/lwm2m/pom.xml

@ -33,7 +33,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<main.dir>${basedir}/../../..</main.dir>
<main.dir>${maven.multiModuleProjectDirectory}</main.dir>
<pkg.name>tb-lwm2m-transport</pkg.name>
<docker.name>tb-lwm2m-transport</docker.name>
<pkg.logFolder>/var/log/${pkg.name}</pkg.logFolder>
@ -46,8 +46,6 @@
<groupId>org.thingsboard.transport</groupId>
<artifactId>lwm2m</artifactId>
<version>${project.version}</version>
<classifier>deb</classifier>
<type>deb</type>
<scope>provided</scope>
</dependency>
</dependencies>
@ -56,25 +54,21 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>copy-tb-lwm2m-transport-deb</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<id>enforce-deb-exists</id>
<phase>${pkg.deb.phase}</phase>
<goals><goal>enforce</goal></goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.thingsboard.transport</groupId>
<artifactId>lwm2m</artifactId>
<classifier>deb</classifier>
<type>deb</type>
<destFileName>${pkg.name}.deb</destFileName>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
</artifactItems>
<rules>
<requireFilesExist>
<files>
<file>${main.dir}/transport/lwm2m/target/${pkg.name}.deb</file>
</files>
<message>DEB artifact not found at ${main.dir}/transport/lwm2m/target/${pkg.name}.deb — build the upstream module first or pass -Dpkg.skip.deb=true.</message>
</requireFilesExist>
</rules>
</configuration>
</execution>
</executions>
@ -99,36 +93,60 @@
</resources>
</configuration>
</execution>
<execution>
<id>copy-tb-lwm2m-transport-deb</id>
<phase>${pkg.deb.phase}</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
<overwrite>true</overwrite>
<resources>
<resource>
<directory>${main.dir}/transport/lwm2m/target</directory>
<includes>
<include>${pkg.name}.deb</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>build-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>build</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<skip>${dockerfile.skip}</skip>
<repository>${docker.repo}/${docker.name}</repository>
<verbose>true</verbose>
<googleContainerRegistryEnabled>false</googleContainerRegistryEnabled>
<contextDirectory>${project.build.directory}</contextDirectory>
<executable>docker</executable>
<workingDirectory>${project.build.directory}</workingDirectory>
<arguments>
<argument>build</argument>
<argument>-t</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
<argument>.</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>tag-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>tag</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<skip>${dockerfile.skip}</skip>
<repository>${docker.repo}/${docker.name}</repository>
<tag>${project.version}</tag>
<executable>docker</executable>
<arguments>
<argument>tag</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
<argument>${docker.repo}/${docker.name}:${project.version}</argument>
</arguments>
</configuration>
</execution>
</executions>
@ -146,29 +164,31 @@
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>push-latest-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>push</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<tag>latest</tag>
<repository>${docker.repo}/${docker.name}</repository>
<executable>docker</executable>
<arguments>
<argument>push</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>push-version-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>push</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<tag>${project.version}</tag>
<repository>${docker.repo}/${docker.name}</repository>
<executable>docker</executable>
<arguments>
<argument>push</argument>
<argument>${docker.repo}/${docker.name}:${project.version}</argument>
</arguments>
</configuration>
</execution>
</executions>

110
msa/transport/mqtt/pom.xml

@ -33,7 +33,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<main.dir>${basedir}/../../..</main.dir>
<main.dir>${maven.multiModuleProjectDirectory}</main.dir>
<pkg.name>tb-mqtt-transport</pkg.name>
<docker.name>tb-mqtt-transport</docker.name>
<pkg.logFolder>/var/log/${pkg.name}</pkg.logFolder>
@ -46,8 +46,6 @@
<groupId>org.thingsboard.transport</groupId>
<artifactId>mqtt</artifactId>
<version>${project.version}</version>
<classifier>deb</classifier>
<type>deb</type>
<scope>provided</scope>
</dependency>
</dependencies>
@ -56,25 +54,21 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>copy-tb-mqtt-transport-deb</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<id>enforce-deb-exists</id>
<phase>${pkg.deb.phase}</phase>
<goals><goal>enforce</goal></goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.thingsboard.transport</groupId>
<artifactId>mqtt</artifactId>
<classifier>deb</classifier>
<type>deb</type>
<destFileName>${pkg.name}.deb</destFileName>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
</artifactItems>
<rules>
<requireFilesExist>
<files>
<file>${main.dir}/transport/mqtt/target/${pkg.name}.deb</file>
</files>
<message>DEB artifact not found at ${main.dir}/transport/mqtt/target/${pkg.name}.deb — build the upstream module first or pass -Dpkg.skip.deb=true.</message>
</requireFilesExist>
</rules>
</configuration>
</execution>
</executions>
@ -99,36 +93,60 @@
</resources>
</configuration>
</execution>
<execution>
<id>copy-tb-mqtt-transport-deb</id>
<phase>${pkg.deb.phase}</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
<overwrite>true</overwrite>
<resources>
<resource>
<directory>${main.dir}/transport/mqtt/target</directory>
<includes>
<include>${pkg.name}.deb</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>build-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>build</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<skip>${dockerfile.skip}</skip>
<repository>${docker.repo}/${docker.name}</repository>
<verbose>true</verbose>
<googleContainerRegistryEnabled>false</googleContainerRegistryEnabled>
<contextDirectory>${project.build.directory}</contextDirectory>
<executable>docker</executable>
<workingDirectory>${project.build.directory}</workingDirectory>
<arguments>
<argument>build</argument>
<argument>-t</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
<argument>.</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>tag-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>tag</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<skip>${dockerfile.skip}</skip>
<repository>${docker.repo}/${docker.name}</repository>
<tag>${project.version}</tag>
<executable>docker</executable>
<arguments>
<argument>tag</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
<argument>${docker.repo}/${docker.name}:${project.version}</argument>
</arguments>
</configuration>
</execution>
</executions>
@ -146,29 +164,31 @@
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>push-latest-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>push</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<tag>latest</tag>
<repository>${docker.repo}/${docker.name}</repository>
<executable>docker</executable>
<arguments>
<argument>push</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>push-version-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>push</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<tag>${project.version}</tag>
<repository>${docker.repo}/${docker.name}</repository>
<executable>docker</executable>
<arguments>
<argument>push</argument>
<argument>${docker.repo}/${docker.name}:${project.version}</argument>
</arguments>
</configuration>
</execution>
</executions>

110
msa/transport/snmp/pom.xml

@ -34,7 +34,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<main.dir>${basedir}/../../..</main.dir>
<main.dir>${maven.multiModuleProjectDirectory}</main.dir>
<pkg.name>tb-snmp-transport</pkg.name>
<docker.name>tb-snmp-transport</docker.name>
<pkg.logFolder>/var/log/${pkg.name}</pkg.logFolder>
@ -47,8 +47,6 @@
<groupId>org.thingsboard.transport</groupId>
<artifactId>snmp</artifactId>
<version>${project.version}</version>
<classifier>deb</classifier>
<type>deb</type>
<scope>provided</scope>
</dependency>
</dependencies>
@ -57,25 +55,21 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>copy-tb-snmp-transport-deb</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<id>enforce-deb-exists</id>
<phase>${pkg.deb.phase}</phase>
<goals><goal>enforce</goal></goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.thingsboard.transport</groupId>
<artifactId>snmp</artifactId>
<classifier>deb</classifier>
<type>deb</type>
<destFileName>${pkg.name}.deb</destFileName>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
</artifactItems>
<rules>
<requireFilesExist>
<files>
<file>${main.dir}/transport/snmp/target/${pkg.name}.deb</file>
</files>
<message>DEB artifact not found at ${main.dir}/transport/snmp/target/${pkg.name}.deb — build the upstream module first or pass -Dpkg.skip.deb=true.</message>
</requireFilesExist>
</rules>
</configuration>
</execution>
</executions>
@ -100,36 +94,60 @@
</resources>
</configuration>
</execution>
<execution>
<id>copy-tb-snmp-transport-deb</id>
<phase>${pkg.deb.phase}</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
<overwrite>true</overwrite>
<resources>
<resource>
<directory>${main.dir}/transport/snmp/target</directory>
<includes>
<include>${pkg.name}.deb</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>build-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>build</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<skip>${dockerfile.skip}</skip>
<repository>${docker.repo}/${docker.name}</repository>
<verbose>true</verbose>
<googleContainerRegistryEnabled>false</googleContainerRegistryEnabled>
<contextDirectory>${project.build.directory}</contextDirectory>
<executable>docker</executable>
<workingDirectory>${project.build.directory}</workingDirectory>
<arguments>
<argument>build</argument>
<argument>-t</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
<argument>.</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>tag-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>tag</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<skip>${dockerfile.skip}</skip>
<repository>${docker.repo}/${docker.name}</repository>
<tag>${project.version}</tag>
<executable>docker</executable>
<arguments>
<argument>tag</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
<argument>${docker.repo}/${docker.name}:${project.version}</argument>
</arguments>
</configuration>
</execution>
</executions>
@ -147,29 +165,31 @@
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>push-latest-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>push</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<tag>latest</tag>
<repository>${docker.repo}/${docker.name}</repository>
<executable>docker</executable>
<arguments>
<argument>push</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>push-version-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>push</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<tag>${project.version}</tag>
<repository>${docker.repo}/${docker.name}</repository>
<executable>docker</executable>
<arguments>
<argument>push</argument>
<argument>${docker.repo}/${docker.name}:${project.version}</argument>
</arguments>
</configuration>
</execution>
</executions>

110
msa/vc-executor-docker/pom.xml

@ -33,7 +33,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<main.dir>${basedir}/../..</main.dir>
<main.dir>${maven.multiModuleProjectDirectory}</main.dir>
<pkg.name>tb-vc-executor</pkg.name>
<docker.name>tb-vc-executor</docker.name>
<pkg.logFolder>/var/log/${pkg.name}</pkg.logFolder>
@ -46,8 +46,6 @@
<groupId>org.thingsboard.msa</groupId>
<artifactId>vc-executor</artifactId>
<version>${project.version}</version>
<classifier>deb</classifier>
<type>deb</type>
<scope>provided</scope>
</dependency>
</dependencies>
@ -56,25 +54,21 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>copy-tb-vc-executor-deb</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<id>enforce-deb-exists</id>
<phase>${pkg.deb.phase}</phase>
<goals><goal>enforce</goal></goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.thingsboard.msa</groupId>
<artifactId>vc-executor</artifactId>
<classifier>deb</classifier>
<type>deb</type>
<destFileName>${pkg.name}.deb</destFileName>
<outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem>
</artifactItems>
<rules>
<requireFilesExist>
<files>
<file>${main.dir}/msa/vc-executor/target/${pkg.name}.deb</file>
</files>
<message>DEB artifact not found at ${main.dir}/msa/vc-executor/target/${pkg.name}.deb — build the upstream module first or pass -Dpkg.skip.deb=true.</message>
</requireFilesExist>
</rules>
</configuration>
</execution>
</executions>
@ -99,36 +93,60 @@
</resources>
</configuration>
</execution>
<execution>
<id>copy-tb-vc-executor-deb</id>
<phase>${pkg.deb.phase}</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
<overwrite>true</overwrite>
<resources>
<resource>
<directory>${main.dir}/msa/vc-executor/target</directory>
<includes>
<include>${pkg.name}.deb</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>build-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>build</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<skip>${dockerfile.skip}</skip>
<repository>${docker.repo}/${docker.name}</repository>
<verbose>true</verbose>
<googleContainerRegistryEnabled>false</googleContainerRegistryEnabled>
<contextDirectory>${project.build.directory}</contextDirectory>
<executable>docker</executable>
<workingDirectory>${project.build.directory}</workingDirectory>
<arguments>
<argument>build</argument>
<argument>-t</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
<argument>.</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>tag-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>tag</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<skip>${dockerfile.skip}</skip>
<repository>${docker.repo}/${docker.name}</repository>
<tag>${project.version}</tag>
<executable>docker</executable>
<arguments>
<argument>tag</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
<argument>${docker.repo}/${docker.name}:${project.version}</argument>
</arguments>
</configuration>
</execution>
</executions>
@ -146,29 +164,31 @@
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>push-latest-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>push</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<tag>latest</tag>
<repository>${docker.repo}/${docker.name}</repository>
<executable>docker</executable>
<arguments>
<argument>push</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>push-version-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>push</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<tag>${project.version}</tag>
<repository>${docker.repo}/${docker.name}</repository>
<executable>docker</executable>
<arguments>
<argument>push</argument>
<argument>${docker.repo}/${docker.name}:${project.version}</argument>
</arguments>
</configuration>
</execution>
</executions>

5
msa/vc-executor/pom.xml

@ -35,7 +35,6 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<main.dir>${basedir}/../..</main.dir>
<pkg.type>java</pkg.type>
<pkg.disabled>false</pkg.disabled>
<pkg.process-resources.phase>process-resources</pkg.process-resources.phase>
<pkg.package.phase>package</pkg.package.phase>
<pkg.name>tb-vc-executor</pkg.name>
@ -115,8 +114,8 @@
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

59
msa/web-ui/pom.xml

@ -39,7 +39,6 @@
<docker.name>tb-web-ui</docker.name>
<pkg.name>tb-web-ui</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>
<pkg.linux.dist>${project.build.directory}/package/linux</pkg.linux.dist>
@ -193,33 +192,37 @@
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>build-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>build</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<skip>${dockerfile.skip}</skip>
<repository>${docker.repo}/${docker.name}</repository>
<verbose>true</verbose>
<googleContainerRegistryEnabled>false</googleContainerRegistryEnabled>
<contextDirectory>${project.build.directory}</contextDirectory>
<executable>docker</executable>
<workingDirectory>${project.build.directory}</workingDirectory>
<arguments>
<argument>build</argument>
<argument>-t</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
<argument>.</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>tag-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>tag</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<skip>${dockerfile.skip}</skip>
<repository>${docker.repo}/${docker.name}</repository>
<tag>${project.version}</tag>
<executable>docker</executable>
<arguments>
<argument>tag</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
<argument>${docker.repo}/${docker.name}:${project.version}</argument>
</arguments>
</configuration>
</execution>
</executions>
@ -269,29 +272,31 @@
<build>
<plugins>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>push-latest-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>push</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<tag>latest</tag>
<repository>${docker.repo}/${docker.name}</repository>
<executable>docker</executable>
<arguments>
<argument>push</argument>
<argument>${docker.repo}/${docker.name}:latest</argument>
</arguments>
</configuration>
</execution>
<execution>
<id>push-version-docker-image</id>
<phase>pre-integration-test</phase>
<goals>
<goal>push</goal>
</goals>
<goals><goal>exec</goal></goals>
<configuration>
<tag>${project.version}</tag>
<repository>${docker.repo}/${docker.name}</repository>
<executable>docker</executable>
<arguments>
<argument>push</argument>
<argument>${docker.repo}/${docker.name}:${project.version}</argument>
</arguments>
</configuration>
</execution>
</executions>

3
packaging/java/build.gradle

@ -193,3 +193,6 @@ buildDeb {
link("${pkgInstallFolder}/bin/${pkgName}.yml", "${pkgInstallFolder}/conf/${pkgName}.yml")
link("/etc/${pkgName}/conf", "${pkgInstallFolder}/conf")
}
buildDeb.onlyIf { findProperty('skipDeb') != 'true' }
buildRpm.onlyIf { findProperty('skipRpm') != 'true' }

3
packaging/js/build.gradle

@ -137,3 +137,6 @@ buildDeb {
link("/etc/${pkgName}/conf", "${pkgInstallFolder}/conf")
}
buildDeb.onlyIf { findProperty('skipDeb') != 'true' }
buildRpm.onlyIf { findProperty('skipRpm') != 'true' }

115
pom.xml

@ -31,9 +31,33 @@
<maven.compiler.source>25</maven.compiler.source>
<maven.compiler.target>25</maven.compiler.target>
<main.dir>${basedir}</main.dir>
<pkg.disabled>true</pkg.disabled>
<pkg.process-resources.phase>none</pkg.process-resources.phase>
<pkg.package.phase>none</pkg.package.phase>
<!-- Use -Dpkg.skip=true to skip all packaging at once (bootjar + deb + rpm + zip).
Individual flags below can be set independently for finer control. -->
<!-- Set to true to skip spring-boot:repackage (the boot jar, i.e. the *-boot.jar artifact).
The boot jar is the mandatory input to Gradle buildDeb; skipping it also prevents
the .deb from being produced. Any msa/* module that depends on a .deb artifact
(e.g. msa/tb-node depends on application:deb) will FAIL when the boot jar and
consequently the .deb are missing. Each packaging module overrides this to false. -->
<pkg.skip.bootjar>false</pkg.skip.bootjar>
<!-- Set to true to skip Gradle buildDeb and suppress the Maven attach-artifact goal
that registers the .deb with the reactor. msa/* docker modules copy the .deb
directly from the upstream module's target/ directory (not from .m2), and their
copy execution is bound to ${pkg.deb.phase}, so they are silently skipped too. -->
<pkg.skip.deb>false</pkg.skip.deb>
<!-- Set to true to skip Gradle buildRpm. No Maven reactor module depends on the RPM
artifact, so this flag can be toggled freely without breaking downstream modules. -->
<pkg.skip.rpm>false</pkg.skip.rpm>
<!-- Set to true to skip the maven-assembly-plugin Windows ZIP archive. No Maven reactor
module depends on the ZIP artifact, so this flag can be toggled freely without
breaking downstream modules. -->
<pkg.skip.zip>false</pkg.skip.zip>
<!-- Internal: resolved phase for the build-helper attach-deb execution. Overridden to
"none" by the skip-deb profile when pkg.skip.deb=true so the goal is silently
skipped instead of failing on a non-existent .deb file. Packaging modules inherit
"package" via pkg.package.phase; msa/* docker modules set it explicitly in msa/pom.xml. -->
<pkg.deb.phase>${pkg.package.phase}</pkg.deb.phase>
<pkg.user>thingsboard</pkg.user>
<pkg.implementationTitle>${project.name}</pkg.implementationTitle>
<pkg.unixLogFolder>/var/log/${pkg.name}</pkg.unixLogFolder>
@ -69,8 +93,10 @@
<paho.client.version>1.2.5</paho.client.version>
<paho.mqttv5.client.version>1.2.5</paho.mqttv5.client.version>
<os-maven-plugin.version>1.7.1</os-maven-plugin.version>
<surefire.version>3.5.4</surefire.version>
<jar-plugin.version>3.5.0</jar-plugin.version>
<maven-surefire-plugin.version>3.5.4</maven-surefire-plugin.version>
<maven-install-plugin.version>3.1.4</maven-install-plugin.version>
<maven-deploy-plugin.version>3.1.4</maven-deploy-plugin.version>
<springdoc-swagger.version>2.8.8TB</springdoc-swagger.version>
<swagger-annotations.version>2.2.30</swagger-annotations.version>
<spatial4j.version>0.8</spatial4j.version>
@ -181,6 +207,43 @@
</properties>
</profile>
<!-- Activated by -Dpkg.skip.deb=true. Sets the attach-artifact lifecycle phase to "none"
so the build-helper goal that registers the .deb with the Maven reactor is silently
skipped. Without this, the goal would fail because the .deb file does not exist. -->
<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>
<!-- Activated by -Dpkg.skip=true. Convenience alias that sets all four skip flags at
once. Also sets pkg.deb.phase=none directly because Maven profile activation is
evaluated against CLI/system properties only — a property set inside another profile
cannot trigger a second profile, so skip-deb would not fire automatically. -->
<profile>
<id>skip-pkg</id>
<activation>
<property>
<name>pkg.skip</name>
<value>true</value>
</property>
</activation>
<properties>
<pkg.skip.bootjar>true</pkg.skip.bootjar>
<pkg.skip.deb>true</pkg.skip.deb>
<pkg.skip.rpm>true</pkg.skip.rpm>
<pkg.skip.zip>true</pkg.skip.zip>
<pkg.deb.phase>none</pkg.deb.phase>
</properties>
</profile>
<profile>
<id>packaging</id>
<activation>
@ -486,7 +549,12 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<skip>${pkg.disabled}</skip>
<!-- Note: pkg.skip.bootjar and pkg.skip.deb are independent flags.
Passing only -Dpkg.skip.deb=true still builds the boot jar here
because Gradle's buildDeb task depends on it as its primary input.
Use -Dpkg.skip.bootjar=true to skip the boot jar entirely
(which also breaks buildDeb — see pkg.skip.* table in TEST_FAST.md). -->
<skip>${pkg.skip.bootjar}</skip>
<mainClass>${pkg.mainClass}</mainClass>
<classifier>boot</classifier>
<layout>ZIP</layout>
@ -530,6 +598,8 @@
<arg>-PpkgInstallFolder=${pkg.installFolder}</arg>
<arg>-PpkgCopyInstallScripts=${pkg.copyInstallScripts}</arg>
<arg>-PpkgLogFolder=${pkg.unixLogFolder}</arg>
<arg>-PskipDeb=${pkg.skip.deb}</arg>
<arg>-PskipRpm=${pkg.skip.rpm}</arg>
<arg>--project-cache-dir</arg>
<arg>${project.build.directory}/.gradle</arg>
<arg>--warning-mode</arg>
@ -549,6 +619,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<skipAssembly>${pkg.skip.zip}</skipAssembly>
<finalName>${pkg.name}</finalName>
<descriptors>
<descriptor>${main.dir}/packaging/${pkg.type}/assembly/windows.xml</descriptor>
@ -565,23 +636,24 @@
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<configuration>
<file>${project.build.directory}/${pkg.name}.deb</file>
<artifactId>${project.artifactId}</artifactId>
<groupId>${project.groupId}</groupId>
<version>${project.version}</version>
<classifier>deb</classifier>
<packaging>deb</packaging>
</configuration>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>install-deb</id>
<phase>${pkg.package.phase}</phase>
<id>attach-deb</id>
<phase>${pkg.deb.phase}</phase>
<goals>
<goal>install-file</goal>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${project.build.directory}/${pkg.name}.deb</file>
<type>deb</type>
<classifier>deb</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
@ -660,7 +732,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<argLine>
-XX:+UseStringDeduplication -XX:MaxGCPauseMillis=200
@ -674,12 +746,17 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>3.0.0-M1</version>
<version>${maven-install-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.0.0-M1</version>
<version>${maven-deploy-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.5.0</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>

5
transport/coap/pom.xml

@ -34,7 +34,6 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<main.dir>${basedir}/../..</main.dir>
<pkg.type>java</pkg.type>
<pkg.disabled>false</pkg.disabled>
<pkg.process-resources.phase>process-resources</pkg.process-resources.phase>
<pkg.package.phase>package</pkg.package.phase>
<pkg.name>tb-coap-transport</pkg.name>
@ -109,8 +108,8 @@
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

5
transport/http/pom.xml

@ -34,7 +34,6 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<main.dir>${basedir}/../..</main.dir>
<pkg.type>java</pkg.type>
<pkg.disabled>false</pkg.disabled>
<pkg.process-resources.phase>process-resources</pkg.process-resources.phase>
<pkg.package.phase>package</pkg.package.phase>
<pkg.name>tb-http-transport</pkg.name>
@ -109,8 +108,8 @@
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

5
transport/lwm2m/pom.xml

@ -34,7 +34,6 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<main.dir>${basedir}/../..</main.dir>
<pkg.type>java</pkg.type>
<pkg.disabled>false</pkg.disabled>
<pkg.process-resources.phase>process-resources</pkg.process-resources.phase>
<pkg.package.phase>package</pkg.package.phase>
<pkg.name>tb-lwm2m-transport</pkg.name>
@ -163,8 +162,8 @@
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

5
transport/mqtt/pom.xml

@ -34,7 +34,6 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<main.dir>${basedir}/../..</main.dir>
<pkg.type>java</pkg.type>
<pkg.disabled>false</pkg.disabled>
<pkg.process-resources.phase>process-resources</pkg.process-resources.phase>
<pkg.package.phase>package</pkg.package.phase>
<pkg.name>tb-mqtt-transport</pkg.name>
@ -109,8 +108,8 @@
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

5
transport/snmp/pom.xml

@ -36,7 +36,6 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<main.dir>${basedir}/../..</main.dir>
<pkg.type>java</pkg.type>
<pkg.disabled>false</pkg.disabled>
<pkg.process-resources.phase>process-resources</pkg.process-resources.phase>
<pkg.package.phase>package</pkg.package.phase>
<pkg.name>tb-snmp-transport</pkg.name>
@ -94,8 +93,8 @@
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Loading…
Cancel
Save