Skip to content

JavaFX Workaround: Set javafx.platform property in scripts - #3456

Merged
infeo merged 2 commits into
cryptomator:developfrom
purejava:fix-#3453
Jun 12, 2024
Merged

infeo merged 2 commits into
cryptomator:developfrom
purejava:fix-#3453

Conversation

@purejava

Copy link
Copy Markdown
Contributor

Fixes #3453

@coderabbitai

coderabbitai Bot commented Jun 11, 2024 •

Copy link
Copy Markdown

Walkthrough

The changes across multiple GitHub Actions workflow files involve adding the -Djavafx.platform flag to the Maven commands. This flag specifies the JavaFX platform (Linux, Mac, or Windows) for the build process, ensuring that the correct dependencies are resolved for each platform. These updates aim to fix build issues related to unresolved JavaFX dependencies.

Changes

Files Change Summary
.github/workflows/appimage.yml, .github/workflows/build.yml, .github/workflows/debian.yml, .github/workflows/pullrequest.yml, .github/workflows/release-check.yml Added -Djavafx.platform=linux flag to Maven commands to specify the JavaFX platform as Linux.
.github/workflows/dependency-check.yml Added check-command: 'mvn -B validate -Pdependency-check -Djavafx.platform=linux' for dependency checking.
.github/workflows/mac-dmg.yml Added -Djavafx.platform=mac flag to Maven commands for the Mac DMG build.
.github/workflows/win-exe.yml Added -Djavafx.platform=win flag to Maven commands for Windows builds.

Sequence Diagram(s)

No sequence diagrams are necessary as the changes are straightforward modifications to build commands.

Assessment against linked issues

Objective Addressed Explanation
Fix build.sh for mac dmg fails with unresolved JavaFX dependencies (#3453) ✅

Poem

In the code, a rabbit hops with glee,
Adding flags for JavaFX dependency,
Linux, Mac, and Windows too,
Now the builds will surely go through.
With each command, the platform's set,
No more errors, no more fret.
🎉🐇✨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 91d6264 and 8108128.

Files ignored due to path filters (1)
  • dist/mac/dmg/build.sh is excluded by !dist/**
Files selected for processing (1)
  • .github/workflows/mac-dmg.yml (2 hunks)
Files skipped from review due to trivial changes (1)
  • .github/workflows/mac-dmg.yml

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 8108128 and 2307950.

Files ignored due to path filters (2)
  • dist/linux/appimage/build.sh is excluded by !dist/**
  • dist/win/build.ps1 is excluded by !dist/**
Files selected for processing (7)
  • .github/workflows/appimage.yml (1 hunks)
  • .github/workflows/build.yml (1 hunks)
  • .github/workflows/debian.yml (1 hunks)
  • .github/workflows/dependency-check.yml (1 hunks)
  • .github/workflows/pullrequest.yml (1 hunks)
  • .github/workflows/release-check.yml (1 hunks)
  • .github/workflows/win-exe.yml (3 hunks)
Files skipped from review due to trivial changes (3)
  • .github/workflows/build.yml
  • .github/workflows/dependency-check.yml
  • .github/workflows/pullrequest.yml
Additional comments not posted (5)
.github/workflows/release-check.yml (1)

63-63: The addition of -Djavafx.platform=linux correctly specifies the JavaFX platform for Linux, aligning with the PR's objective to address the JavaFX bug.

.github/workflows/debian.yml (1)

56-56: The addition of -Djavafx.platform=linux in the Maven command ensures that the JavaFX platform is correctly specified for Linux builds.

.github/workflows/appimage.yml (1)

71-71: The addition of -Djavafx.platform=linux in the Maven command ensures that the JavaFX platform is correctly specified for Linux builds.

.github/workflows/win-exe.yml (2)

80-80: The addition of -Djavafx.platform=win in the Maven command ensures that the JavaFX platform is correctly specified for Windows builds.


202-202: The addition of -Djavafx.platform=win in the Maven command for generating licenses ensures that the JavaFX platform is correctly specified for Windows builds.

@infeo infeo changed the title Temporary work around for JavaFX upstream bug JavaFX Workaround: Set javafx.platform property in scripts Jun 12, 2024
@SailReal

Copy link
Copy Markdown
Member

@infeo

infeo commented Jun 12, 2024

Copy link
Copy Markdown
Member

I extendend the scope of this PR to fix the issue for all workflows, because i'm sure Maven will be updated also on other systems.

Note, that setting the javafx.platform property inside the pom does not work, so i added to all maven resolve/compile executions the property.

@infeo

infeo commented Jun 12, 2024

Copy link
Copy Markdown
Member

@SailReal Since we can control there the maven version, it is not necessary. Only if we update maven to version 3.9.7 or higher the property must be set

@infeo
infeo merged commit 32a4637 into cryptomator:develop Jun 12, 2024
@infeo

infeo commented Jun 12, 2024

Copy link
Copy Markdown
Member

@purejava Thanks for the research and PR! I extended the PR to not stumble into this problem on other platforms.

@infeo infeo added this to the minor milestone Jun 12, 2024
@SailReal

Copy link
Copy Markdown
Member

In Archlinux we use the maven dependency from Arch packages so we are not in control of its version and it is already 3.9.7 (https://archlinux.org/packages/extra/any/maven).

@purejava

Copy link
Copy Markdown
Contributor Author

In Archlinux we use the maven dependency from Arch packages so we are not in control of its version and it is already 3.9.7 (https://archlinux.org/packages/extra/any/maven).

You are right @SailReal. I gave it a test on my Arch linux box and it bites us there too. I'll prepare a quick PR within no time and test Flatpak too.

@purejava

Copy link
Copy Markdown
Contributor Author

@SailReal Since we can control there the maven version, it is not necessary. Only if we update maven to version 3.9.7 or higher the property must be set

I took a look at the flatpaked Cryptomator, but that wouldn't have been necessary, as @infeo pointed out earlier. We control the Maven version there:

url: https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz

https://github.com/flathub/org.cryptomator.Cryptomator/blob/0e1a7bd7d00e57ad01b32f899a4430c1391aba38/org.cryptomator.Cryptomator.yaml#L170

@purejava
purejava deleted the fix-#3453 branch June 13, 2024 05:24
@coderabbitai coderabbitai Bot mentioned this pull request Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build.sh for mac dmg fails with cannot resolve dependencies with ${javafx.platform}

3 participants