Browse Source

Skip all packaging when the UI build is skipped

Packages built without the UI are incomplete, so -Dskip.yarn=true and
-Dskip.ui.build=true now imply -Dpkg.skip=true through dedicated profiles
in the root pom and msa/pom.xml.

This replaces the module-level pkg.skip.zip properties in msa/js-executor
and msa/web-ui, which shadowed the root skip-pkg profile and made
-Dpkg.skip=true build their Windows ZIPs again.
pull/16152/head
Viacheslav Klimov 2 months ago
parent
commit
21e5d93aec
Failed to extract signature
  1. 2
      TEST_FAST.md
  2. 5
      msa/js-executor/pom.xml
  3. 25
      msa/pom.xml
  4. 5
      msa/web-ui/pom.xml
  5. 37
      pom.xml

2
TEST_FAST.md

@ -46,6 +46,8 @@ Use `-Dpkg.skip=true` to skip all packaging at once (equivalent to all four flag
| `-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 |
`-Dskip.yarn=true` and `-Dskip.ui.build=true` imply `-Dpkg.skip=true`: packages built without the UI are incomplete.
## Testcontainers compatibility with the Docker API workaround
In case your tests failed to run testcontainers due to unsupported Docker API version

5
msa/js-executor/pom.xml

@ -30,11 +30,6 @@
<pkg.package.phase>package</pkg.package.phase>
<pkg.linux.dist>${project.build.directory}/package/linux</pkg.linux.dist>
<pkg.win.dist>${project.build.directory}/package/windows</pkg.win.dist>
<!-- The Windows ZIP bundles the native launcher that `yarn run pkg` produces, so there is
nothing to assemble when the yarn build is skipped. skip.yarn is referenced directly
(not through a profile) so that it is honoured both when it comes from the command
line and when it comes from a pom property. -->
<pkg.skip.zip>${skip.yarn}</pkg.skip.zip>
<!-- The `yarn test` execution has to be skipped when tests are skipped and also when the
yarn build as a whole is skipped: with `yarn install` skipped there is no node_modules
to run the tests from. Maven has no boolean OR, so skip.yarn is used as the default

25
msa/pom.xml

@ -83,6 +83,31 @@
<pkg.deb.phase>none</pkg.deb.phase>
</properties>
</profile>
<!-- Mirror the root skip-pkg-without-* profiles: no .deb is built when the UI build is skipped. -->
<profile>
<id>skip-pkg-without-yarn</id>
<activation>
<property>
<name>skip.yarn</name>
<value>true</value>
</property>
</activation>
<properties>
<pkg.deb.phase>none</pkg.deb.phase>
</properties>
</profile>
<profile>
<id>skip-pkg-without-ui-build</id>
<activation>
<property>
<name>skip.ui.build</name>
<value>true</value>
</property>
</activation>
<properties>
<pkg.deb.phase>none</pkg.deb.phase>
</properties>
</profile>
<profile>
<id>black-box-tests</id>
<activation>

5
msa/web-ui/pom.xml

@ -32,11 +32,6 @@
<pkg.package.phase>package</pkg.package.phase>
<pkg.linux.dist>${project.build.directory}/package/linux</pkg.linux.dist>
<pkg.win.dist>${project.build.directory}/package/windows</pkg.win.dist>
<!-- The Windows ZIP bundles the native launcher that `yarn run pkg` produces, so there is
nothing to assemble when the UI build is skipped. skip.ui.build is referenced directly
(not through a profile) so that it is honoured both when it comes from the command
line and when it comes from a pom property. -->
<pkg.skip.zip>${skip.ui.build}</pkg.skip.zip>
<docker.push-arm-amd-image.phase>pre-integration-test</docker.push-arm-amd-image.phase>
</properties>

37
pom.xml

@ -33,7 +33,8 @@
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. -->
-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>
@ -233,6 +234,40 @@
</properties>
</profile>
<!-- 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-without-yarn</id>
<activation>
<property>
<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>
<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>packaging</id>
<activation>

Loading…
Cancel
Save