|
|
|
@ -28,20 +28,27 @@ |
|
|
|
<maven.compiler.source>25</maven.compiler.source> |
|
|
|
<maven.compiler.target>25</maven.compiler.target> |
|
|
|
<main.dir>${basedir}</main.dir> |
|
|
|
<!-- Set to true to skip only the UI builds: the Angular application in ui-ngx and the |
|
|
|
`yarn run pkg` launcher of msa/web-ui. It deliberately does NOT |
|
|
|
cover msa/js-executor, whose yarn install and sandbox tests keep running. |
|
|
|
frontend-maven-plugin reads skip.yarn itself, so that property cannot be narrowed to a |
|
|
|
subset of the modules; this one can, and it defaults to skip.yarn so that |
|
|
|
-Dskip.yarn=true still skips every yarn invocation in the project exactly as before. |
|
|
|
Either flag also skips all packaging (see the skip-pkg-without-* profiles). --> |
|
|
|
<skip.ui.build>${skip.yarn}</skip.ui.build> |
|
|
|
<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 |
|
|
|
the .deb from being produced. Any msa/* module that copies a .deb |
|
|
|
(e.g. msa/tb-node copies application's .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. --> |
|
|
|
<!-- Set to true to skip Gradle buildDeb. msa/* docker modules copy the .deb directly |
|
|
|
from the upstream module's target/ directory, and their copy execution is bound to |
|
|
|
${pkg.deb.phase} (see msa/pom.xml), 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. --> |
|
|
|
@ -50,11 +57,6 @@ |
|
|
|
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> |
|
|
|
@ -217,31 +219,46 @@ |
|
|
|
</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. --> |
|
|
|
<!-- Activated by -Dpkg.skip=true. Convenience alias that sets all four skip flags at once. --> |
|
|
|
<profile> |
|
|
|
<id>skip-deb</id> |
|
|
|
<id>skip-pkg</id> |
|
|
|
<activation> |
|
|
|
<property> |
|
|
|
<name>pkg.skip.deb</name> |
|
|
|
<name>pkg.skip</name> |
|
|
|
<value>true</value> |
|
|
|
</property> |
|
|
|
</activation> |
|
|
|
<properties> |
|
|
|
<pkg.deb.phase>none</pkg.deb.phase> |
|
|
|
<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> |
|
|
|
</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. --> |
|
|
|
<!-- Packages built without the UI are incomplete (and the JS Windows ZIPs fail on the missing |
|
|
|
launcher), so skipping the UI build skips all packaging too. One profile per flag because |
|
|
|
activation only sees CLI/system properties, not the skip.ui.build default. --> |
|
|
|
<profile> |
|
|
|
<id>skip-pkg</id> |
|
|
|
<id>skip-pkg-without-yarn</id> |
|
|
|
<activation> |
|
|
|
<property> |
|
|
|
<name>pkg.skip</name> |
|
|
|
<name>skip.yarn</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> |
|
|
|
</properties> |
|
|
|
</profile> |
|
|
|
<profile> |
|
|
|
<id>skip-pkg-without-ui-build</id> |
|
|
|
<activation> |
|
|
|
<property> |
|
|
|
<name>skip.ui.build</name> |
|
|
|
<value>true</value> |
|
|
|
</property> |
|
|
|
</activation> |
|
|
|
@ -250,7 +267,6 @@ |
|
|
|
<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> |
|
|
|
|
|
|
|
@ -540,21 +556,6 @@ |
|
|
|
</execution> |
|
|
|
</executions> |
|
|
|
</plugin> |
|
|
|
<plugin> |
|
|
|
<groupId>org.apache.maven.plugins</groupId> |
|
|
|
<artifactId>maven-jar-plugin</artifactId> |
|
|
|
<configuration> |
|
|
|
<excludes> |
|
|
|
<exclude>**/logback.xml</exclude> |
|
|
|
</excludes> |
|
|
|
<archive> |
|
|
|
<manifestEntries> |
|
|
|
<Implementation-Title>${pkg.implementationTitle}</Implementation-Title> |
|
|
|
<Implementation-Version>${project.version}</Implementation-Version> |
|
|
|
</manifestEntries> |
|
|
|
</archive> |
|
|
|
</configuration> |
|
|
|
</plugin> |
|
|
|
<plugin> |
|
|
|
<groupId>org.springframework.boot</groupId> |
|
|
|
<artifactId>spring-boot-maven-plugin</artifactId> |
|
|
|
@ -567,6 +568,8 @@ |
|
|
|
<skip>${pkg.skip.bootjar}</skip> |
|
|
|
<mainClass>${pkg.mainClass}</mainClass> |
|
|
|
<classifier>boot</classifier> |
|
|
|
<!-- Input for Gradle packaging only; don't install/deploy the fat jar --> |
|
|
|
<attach>false</attach> |
|
|
|
<layout>ZIP</layout> |
|
|
|
<executable>true</executable> |
|
|
|
<excludeDevtools>true</excludeDevtools> |
|
|
|
@ -581,7 +584,6 @@ |
|
|
|
<execution> |
|
|
|
<goals> |
|
|
|
<goal>repackage</goal> |
|
|
|
<goal>build-info</goal> |
|
|
|
</goals> |
|
|
|
</execution> |
|
|
|
</executions> |
|
|
|
@ -643,28 +645,9 @@ |
|
|
|
</goals> |
|
|
|
<configuration> |
|
|
|
<skipAssembly>${pkg.skip.zip}</skipAssembly> |
|
|
|
</configuration> |
|
|
|
</execution> |
|
|
|
</executions> |
|
|
|
</plugin> |
|
|
|
<plugin> |
|
|
|
<groupId>org.codehaus.mojo</groupId> |
|
|
|
<artifactId>build-helper-maven-plugin</artifactId> |
|
|
|
<executions> |
|
|
|
<execution> |
|
|
|
<id>attach-deb</id> |
|
|
|
<phase>${pkg.deb.phase}</phase> |
|
|
|
<goals> |
|
|
|
<goal>attach-artifact</goal> |
|
|
|
</goals> |
|
|
|
<configuration> |
|
|
|
<artifacts> |
|
|
|
<artifact> |
|
|
|
<file>${project.build.directory}/${pkg.name}.deb</file> |
|
|
|
<type>deb</type> |
|
|
|
<classifier>deb</classifier> |
|
|
|
</artifact> |
|
|
|
</artifacts> |
|
|
|
<!-- Picked up from target/; don't install/deploy the Windows zip. |
|
|
|
Set on the execution so other assemblies (e.g. rule nodes) stay attached. --> |
|
|
|
<attach>false</attach> |
|
|
|
</configuration> |
|
|
|
</execution> |
|
|
|
</executions> |
|
|
|
@ -720,6 +703,18 @@ |
|
|
|
<groupId>org.apache.maven.plugins</groupId> |
|
|
|
<artifactId>maven-jar-plugin</artifactId> |
|
|
|
<version>${jar-plugin.version}</version> |
|
|
|
<!-- Outside the packaging profile: activating any other root profile (e.g. skip-pkg) disables it --> |
|
|
|
<configuration> |
|
|
|
<excludes> |
|
|
|
<exclude>**/logback.xml</exclude> |
|
|
|
</excludes> |
|
|
|
<archive> |
|
|
|
<manifestEntries> |
|
|
|
<Implementation-Title>${pkg.implementationTitle}</Implementation-Title> |
|
|
|
<Implementation-Version>${project.version}</Implementation-Version> |
|
|
|
</manifestEntries> |
|
|
|
</archive> |
|
|
|
</configuration> |
|
|
|
</plugin> |
|
|
|
<plugin> |
|
|
|
<groupId>org.apache.maven.plugins</groupId> |
|
|
|
@ -730,6 +725,20 @@ |
|
|
|
<groupId>org.springframework.boot</groupId> |
|
|
|
<artifactId>spring-boot-maven-plugin</artifactId> |
|
|
|
<version>${spring-boot.version}</version> |
|
|
|
<executions> |
|
|
|
<!-- Outside the packaging profile: activating any other root profile (e.g. skip-pkg) disables it, |
|
|
|
and ProjectInfo needs build-info.properties at runtime --> |
|
|
|
<execution> |
|
|
|
<id>build-info</id> |
|
|
|
<goals> |
|
|
|
<goal>build-info</goal> |
|
|
|
</goals> |
|
|
|
<configuration> |
|
|
|
<!-- Overrides the packaging profile's pkg.skip.bootjar skip --> |
|
|
|
<skip>false</skip> |
|
|
|
</configuration> |
|
|
|
</execution> |
|
|
|
</executions> |
|
|
|
</plugin> |
|
|
|
<plugin> |
|
|
|
<groupId>org.thingsboard</groupId> |
|
|
|
|