I have tried just about every combination to get the latest ofbiz to compile on Windows. I either get missing dependencies, versions of gradle/groovy/jdk being too old, or too new to work with each other. Does anyone have the secret sauce?

I've spent hours fixing one part only to just have that break another dependency or compatibility with a version of some other part. If someone has a combination that works, or wrote down all the steps they took to get any version of ofbiz working that would be handy as a starting point, so at least I know I'm not just trying to fix from a starting point that will never result in a working system.

What I find amazing is the first time I tried to get it running on a laptop within WSL it just worked, until I tried to work with creating a plugin - using the demo, "gradlew createPlugin -PpluginId=ofbizDemo" would just result in an error.

Many Thanks!

2

There are 2 best solutions below

1
Michael Brohl On BEST ANSWER

I have just updated the installation instructions in the INSTALL file to reflect the latest requirements for JDK17 instead of JDK11.

With these instructions, you should be able to compile OFBiz trunk.

0
JacquesLeRoux On

I have no problem doing so using the trunk. Which version are you using?

Microsoft Windows [version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Tous droits réservés.

C:\projectsASF\Git\ofbiz-framework>gradlew createPlugin -PpluginId=ofbizDemo
Starting a Gradle Daemon (subsequent builds will be faster)
> Task :buildSrc:extractPluginRequests UP-TO-DATE
> Task :buildSrc:generatePluginAdapters UP-TO-DATE
> Task :buildSrc:compileJava UP-TO-DATE
> Task :buildSrc:compileGroovy NO-SOURCE
> Task :buildSrc:compileGroovyPlugins UP-TO-DATE
> Task :buildSrc:pluginDescriptors UP-TO-DATE
> Task :buildSrc:processResources UP-TO-DATE
> Task :buildSrc:classes UP-TO-DATE
> Task :buildSrc:jar UP-TO-DATE
> Task :buildSrc:assemble UP-TO-DATE
> Task :buildSrc:compileTestJava NO-SOURCE
> Task :buildSrc:compileTestGroovy NO-SOURCE
> Task :buildSrc:pluginUnderTestMetadata UP-TO-DATE
> Task :buildSrc:processTestResources NO-SOURCE
> Task :buildSrc:testClasses UP-TO-DATE
> Task :buildSrc:test NO-SOURCE
> Task :buildSrc:validatePlugins UP-TO-DATE
> Task :buildSrc:check UP-TO-DATE
> Task :buildSrc:build UP-TO-DATE

> Task :createPlugin
plugin successfully created in directory C:\projectsASF\Git\ofbiz-framework/plugins/ofbizDemo.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.6/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 25s
10 actionable tasks: 1 executed, 9 up-to-date
C:\projectsASF\Git\ofbiz-framework>