devonfw / IDEasy

Tool to automate the setup and updates of a development environment for any project (Successor of devonfw-ide).
Apache License 2.0
7 stars 18 forks source link

Nightly build fails due native image building GUI #392

Closed hohwille closed 2 weeks ago

hohwille commented 3 weeks ago

Expected behavior

Build should work.

Actual behavior

Build fails:

Error:  Failed to execute goal on project gui: Could not resolve dependencies for project com.devonfw.tools.IDEasy:gui:jar:2024.06.001-alpha-SNAPSHOT: The following artifacts could not be resolved: org.openjfx:javafx-controls:jar:${javafx.platform}:21 (absent), org.openjfx:javafx-graphics:jar:${javafx.platform}:21 (absent), org.openjfx:javafx-base:jar:${javafx.platform}:21 (absent), org.openjfx:javafx-fxml:jar:${javafx.platform}:21 (absent): Could not find artifact org.openjfx:javafx-controls:jar:${javafx.platform}:21 in central (https://repo.maven.apache.org/maven2) -> [Help 1]

Steps to reproduce (bug) / Use Case of feature request (enhancement)

  1. build GUI on macos with latest stable maven

Related/Dependent Issues

349

Comments/Hints:

https://stackoverflow.com/questions/78542808/maven-project-fails-to-resolve-javafx-dependencies

slskiba commented 3 weeks ago

Unfortunately this is a problem with maven version 3.9.7, in which the javafx.platform property not being replaced correctly. Setting this property manually when building (i.e. -Djavafx.platform=win, or -Djavafx.platform=mac respectively) fixes this issue. See also: https://issues.apache.org/jira/browse/MNG-8131

I can confirm that also locally the build fails on windows and macos for the same reason. I have tested building with 3.9.6, which works just fine. This is also the version set in dev-ide-settings.

hohwille commented 2 weeks ago

Seems I solved this problem within my added changes of #372. As CI is not affected we seem to already use maven <= 3.9.6 in our regular builds but only during the graalVM setup action we have been getting the error. Since it is waste to build all modules in the matrix.os builds that just produce the native-images, I changed to only build the cli so I will now close this issue.