Skip to content

Conversation

jorgheymans
Copy link
Contributor

Description

It can be sometimes desirable to skip the execution of the Vaadin maven plugin, for example when running the project unit tests from the command line, to speed up the project build.

Fixes #21426

Type of change

  • Bugfix
  • [ x] Feature

Checklist

  • [x ] I have read the contribution guide: https://vaadin.com/docs/latest/guide/contributing/overview/
  • [ x] I have added a description following the guideline.
  • [ x] The issue is created in the corresponding repository and I have referenced it.
  • [x ] I have added tests to ensure my change is effective and works as intended.
  • [ x] New and existing tests are passing locally with my change.
  • [ x] I have performed self-review and corrected misspellings.

Additional for Feature type of change

  • [x ] Enhancement / new feature was discussed in a corresponding GitHub issue and Acceptance Criteria were created.

- Added skip parameter to FlowModeAbstractMojo with property
"vaadin.skip"
- Added early return in execute() method when skip=true
- Added informative log message when skipping
- Created integration test and unit test for skip functionality
- Parameter can be used with: mvn clean install -Dvaadin.skip

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@CLAassistant
Copy link

CLAassistant commented Oct 15, 2025

CLA assistant check
All committers have signed the CLA.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@mcollovati mcollovati added the Contribution PRs coming from the community or external to the team label Oct 15, 2025
Copy link
Collaborator

@mcollovati mcollovati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of preliminary comments.
About the vaadin-skip-test integration test for the maven plugin, it would be good to add a verify.bsh file that checks the build output to ensure the plugin execution has been skipped. You can take a look at the offending-dependency-project test for inspiration.

@jorgheymans jorgheymans force-pushed the feature/add-vaadin-skip-parameter branch from 8e709d7 to e7eaa41 Compare October 15, 2025 13:38
@jorgheymans
Copy link
Contributor Author

Not sure what to make of all these build errors, but locally the build passes with tests and integration tests now.

@mcollovati
Copy link
Collaborator

Not sure what to make of all these build errors, but locally the build passes with tests and integration tests now.

No further actions for you at the moment. Builds must be restarted after code review by a Vaadin team member.

BTW, thanks for the contribution!

Copy link

github-actions bot commented Oct 16, 2025

Test Results

1 272 files  +1  1 272 suites  +1   1h 19m 23s ⏱️ + 3m 35s
8 798 tests +2  8 731 ✅ +2  67 💤 ±0  0 ❌ ±0 
9 249 runs  +8  9 172 ✅ +8  77 💤 ±0  0 ❌ ±0 

Results for commit 6f0165e. ± Comparison against base commit b091938.

♻️ This comment has been updated with latest results.

@vaadin vaadin deleted a comment from github-actions bot Oct 16, 2025
@jorgheymans
Copy link
Contributor Author

Trying to run spotless to fix formatting errors gives this:

mvn spotless:apply
[INFO] Processing build on daemon b33b37ad
[INFO] Scanning for projects...
[INFO] BuildTimeEventSpy is registered.
[INFO] 
[INFO] Using the SmartBuilder implementation with a thread count of 7
[INFO] 
[INFO] --------------------< com.vaadin:flow-maven-plugin >--------------------
[INFO] Building Flow Maven plugin 25.0-SNAPSHOT
[INFO]   from pom.xml
[INFO] ----------------------------[ maven-plugin ]----------------------------
[INFO] 
[INFO] --- spotless:3.0.0:apply (default-cli) @ flow-maven-plugin ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.278 s (Wall Clock)
[INFO] Finished at: 2025-10-16T15:08:27+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] StackOverflowError -> [Help 1]
**[ERROR] java.lang.StackOverflowError**
[ERROR] 

@mcollovati
Copy link
Collaborator

Works for me. Weird error.
I pushed the formatting changes

@mcollovati
Copy link
Collaborator

mcollovati commented Oct 16, 2025

@jorgheymans are you using mvnd? Maybe an issue with it, even though I tried and could not reproduce.
Maybe a mvnd --stop and retry?
Or run with -X to get the error trace.

@jorgheymans
Copy link
Contributor Author

Indeed, mvnd was the culprit. Now it runs but with below error which I guess is not related to my changes. Thank you for pushing the format change.

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.788 s (Wall Clock)
[INFO] Finished at: 2025-10-16T15:16:05+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:3.0.0:apply (default-cli) on project flow-maven-plugin: There were 1 lint error(s), they must be fixed or suppressed.
[ERROR]   src/it/frontend-scanner-tuning-project/src/main/frontend/project-component.js:LINE_UNDEFINED prettier-format(java.lang.IllegalStateException) Can't automatically determine node executable and none was specifically supplied! (...)
[ERROR]   Resolve these lints or suppress with `<lintSuppressions>`
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]

@vaadin vaadin deleted a comment from github-actions bot Oct 16, 2025
Copy link

jorgheymans pushed a commit to jorgheymans/docs that referenced this pull request Oct 16, 2025
jorgheymans added a commit to jorgheymans/docs that referenced this pull request Oct 16, 2025
jorgheymans added a commit to jorgheymans/docs that referenced this pull request Oct 17, 2025
@mshabarov mshabarov merged commit b2c4b9a into vaadin:main Oct 20, 2025
30 checks passed
mshabarov added a commit to vaadin/docs that referenced this pull request Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Contribution PRs coming from the community or external to the team +0.0.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support a skip parameter in vaadin-maven-plugin goals

5 participants