flow
flow copied to clipboard
Support a skip parameter in vaadin-maven-plugin goals
Describe your motivation
The vaadin:build-frontend goal is time-consuming and often unnecessary in CI pipelines or multi-module projects where the frontend was already built earlier. Currently, there's no simple way to skip this goal without using Maven profiles or external scripting, which makes builds harder to manage.
Describe the solution you'd like
Add a skip parameter to the build-frontend goal (e.g., -DskipBuildFrontend=true) to allow skipping its execution when not needed. Example:
<execution>
<goals>
<goal>build-frontend</goal>
</goals>
<configuration>
<skip>${skipBuildFrontend}</skip>
</configuration>
</execution>
Another option is to have custom skip parameters per goal, like skipBuildFrontend skipPrepareFrontend
<execution>
<goals>
<goal>prepare-frontend</goal>
<goal>build-frontend</goal>
</goals>
<configuration>
<skipPrepareFrontend>${skipFrontend}</skipPrepareFrontend>
<skipBuildFrontend>${skipFrontend}</skipBuildFrontend>
</configuration>
</execution>
Describe alternatives you've considered
- Using Maven profiles to conditionally define the execution, but it adds lots of unnecessary lines to the pom.xml and increases complexity.
- Custom logic in CI scripts to bypass the Maven phase.
Additional context
- This would align the plugin with common Maven patterns (skipTests, skipDocs, etc.) and improve control in CI/CD pipelines.
- It would also simplify builds where the frontend is reused across jobs or modules.
- Even with caching in place, the build-frontend goal still runs and slows down builds.