From 34deee1c5ef2df5ba2514f77ec4dfd4a684a9d13 Mon Sep 17 00:00:00 2001 From: Kostya Date: Sun, 9 Aug 2026 14:46:25 +0300 Subject: flatten modules to repo root, vendor deps, repair Eclipse build paths Move api, engine, ui-console and ui-desktop out of modules/ up to the repo root and drop the empty exception project (GuessMarketException now lives in api). Vendor gson, jaxb, okhttp, openjfx and tomcat under lib/, and group the JUnit standalone jar into lib/junit/ alongside them. Rewrite every .classpath: drop the copy-pasted optional="true" that was masking real build path errors, point the library entries at ../lib/, and put the JUnit jar on the test source folders so the placeholder AppTest classes compile. ui-desktop: take the JavaFX jars off the modulepath (there is no module-info.java, so module="true" left the packages unresolvable) and add a Launcher that calls Application.launch, avoiding the "JavaFX runtime components are missing" check without VM arguments. engine: add LocalGuessMarketService and the GuessMarketContext provider interface, and give GuessMarketException the no-arg and cause constructors they need. --- ui-desktop/.classpath | 22 +++++++++++++++++ ui-desktop/.project | 28 ++++++++++++++++++++++ .../src/main/java/market/guess/ui/desktop/App.java | 22 +++++++++++++++++ .../java/market/guess/ui/desktop/Launcher.java | 9 +++++++ .../src/test/java/market/guess/engine/AppTest.java | 12 ++++++++++ 5 files changed, 93 insertions(+) create mode 100644 ui-desktop/.classpath create mode 100644 ui-desktop/.project create mode 100644 ui-desktop/src/main/java/market/guess/ui/desktop/App.java create mode 100644 ui-desktop/src/main/java/market/guess/ui/desktop/Launcher.java create mode 100644 ui-desktop/src/test/java/market/guess/engine/AppTest.java (limited to 'ui-desktop') diff --git a/ui-desktop/.classpath b/ui-desktop/.classpath new file mode 100644 index 0000000..bac8826 --- /dev/null +++ b/ui-desktop/.classpath @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/ui-desktop/.project b/ui-desktop/.project new file mode 100644 index 0000000..e421bbf --- /dev/null +++ b/ui-desktop/.project @@ -0,0 +1,28 @@ + + + guess-market-ui-desktop + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + + + 1786044291088 + + 30 + + org.eclipse.core.resources.regexFilterMatcher + node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__ + + + + diff --git a/ui-desktop/src/main/java/market/guess/ui/desktop/App.java b/ui-desktop/src/main/java/market/guess/ui/desktop/App.java new file mode 100644 index 0000000..f0b2b7a --- /dev/null +++ b/ui-desktop/src/main/java/market/guess/ui/desktop/App.java @@ -0,0 +1,22 @@ +package market.guess.ui.desktop; + +import javafx.application.Application; +import javafx.scene.Scene; +import javafx.scene.control.Label; +import javafx.scene.layout.StackPane; +import javafx.stage.Stage; + +public class App extends Application { + @Override + public void start(Stage stage) throws Exception { + var javaVersion = System.getProperty("java.version"); + var openjfxVersion = System.getProperty("javafx.version"); + + var label = + new Label("Hello. JavaFX " + openjfxVersion + ", running on Java " + javaVersion + "."); + var scene = new Scene(new StackPane(label), 640, 480); + + stage.setScene(scene); + stage.show(); + } +} diff --git a/ui-desktop/src/main/java/market/guess/ui/desktop/Launcher.java b/ui-desktop/src/main/java/market/guess/ui/desktop/Launcher.java new file mode 100644 index 0000000..ffe9505 --- /dev/null +++ b/ui-desktop/src/main/java/market/guess/ui/desktop/Launcher.java @@ -0,0 +1,9 @@ +package market.guess.ui.desktop; + +import javafx.application.Application; + +public final class Launcher { + public static void main(String[] args) { + Application.launch(App.class, args); + } +} diff --git a/ui-desktop/src/test/java/market/guess/engine/AppTest.java b/ui-desktop/src/test/java/market/guess/engine/AppTest.java new file mode 100644 index 0000000..0638bc1 --- /dev/null +++ b/ui-desktop/src/test/java/market/guess/engine/AppTest.java @@ -0,0 +1,12 @@ +package market.guess.engine; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +import org.junit.jupiter.api.Test; + +public class AppTest { + @Test + void deterministicTest() { + assertTrue(true); + } +} -- cgit v1.2.3