Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: prevent failure when Spring MainClassFinder is not available #3210

Merged
merged 4 commits into from
Feb 11, 2025

Conversation

mcollovati
Copy link
Contributor

Description

If AotBrowserCallableFinder is invoked by flow-maven-plugin, it fails because the dependency to
org.springframework.boot:spring-boot-loader-tools that contains the MainClassFinder is provided only by hilla-maven-plugin and vaadin-maven-plugin.
This can happen for example in MPR projects that are forced to use flow-maven-plugin because they require the Vaadin 8 version of vaadin-maven-plugin.
This change catches the failure and provide some insight on how to potentially fix the issue, by excluding Hilla or using hilla-maven-plugin.

Fixes #3206

Type of change

  • Bugfix
  • Feature

Checklist

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

Additional for Feature type of change

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

Copy link

codecov bot commented Feb 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.91%. Comparing base (d9374fc) to head (430ae74).
Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3210   +/-   ##
=======================================
  Coverage   86.91%   86.91%           
=======================================
  Files         118      118           
  Lines        8191     8191           
  Branches     1256     1256           
=======================================
  Hits         7119     7119           
  Misses       1058     1058           
  Partials       14       14           
Flag Coverage Δ
unittests 86.91% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

If AotBrowserCallableFinder is invoked by flow-maven-plugin, it fails
because the dependency to
org.springframework.boot:spring-boot-loader-tools that contains the
MainClassFinder is provided only by hilla-maven-plugin and
vaadin-maven-plugin.
This can happen for example in MPR projects that are forced to use
flow-maven-plugin because they require the Vaadin 8 version of
vaadin-maven-plugin.
This change catches the failure and provide some insight on how to
potentially fix the issue, by excluding Hilla or using
hilla-maven-plugin.

Fixes #3206
@mcollovati mcollovati force-pushed the issues/3206-taskgenerateopenapi_classnotfound branch from 18489b2 to be3f8d8 Compare February 6, 2025 10:55
@mcollovati mcollovati marked this pull request as ready for review February 7, 2025 08:01
cromoteca
cromoteca previously approved these changes Feb 10, 2025
@cromoteca cromoteca merged commit c70d3c6 into main Feb 11, 2025
15 checks passed
@cromoteca cromoteca deleted the issues/3206-taskgenerateopenapi_classnotfound branch February 11, 2025 17:00
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Hilla 24.7.0.alpha12 and is also targeting the upcoming stable 24.7.0 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ClassNotFoundException when running TaskGenerateOpenAPI with flow-maven-plugin
3 participants