Skip to content

Commit a6588da

Browse files
committed
stored run config. fixed issue with javafx
1 parent 2e3121e commit a6588da

File tree

7 files changed

+61
-26
lines changed

7 files changed

+61
-26
lines changed

.run/LeafletTestJFX.run.xml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.run/jlmap [javafx_run].run.xml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="jlmap [javafx:run]" type="MavenRunConfiguration" factoryName="Maven" nameIsGenerated="true">
3+
<MavenSettings>
4+
<option name="myGeneralSettings" />
5+
<option name="myRunnerSettings" />
6+
<option name="myRunnerParameters">
7+
<MavenRunnerParameters>
8+
<option name="cmdOptions" />
9+
<option name="profiles">
10+
<set />
11+
</option>
12+
<option name="goals">
13+
<list>
14+
<option value="javafx:run" />
15+
</list>
16+
</option>
17+
<option name="multimoduleDir" />
18+
<option name="pomFileName" />
19+
<option name="profilesMap">
20+
<map />
21+
</option>
22+
<option name="projectsCmdOptionValues">
23+
<list />
24+
</option>
25+
<option name="resolveToWorkspace" value="false" />
26+
<option name="workingDirPath" value="$PROJECT_DIR$" />
27+
</MavenRunnerParameters>
28+
</option>
29+
</MavenSettings>
30+
<method v="2" />
31+
</configuration>
32+
</component>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Add the following dependency to your `pom.xml`:
7272
When running your application, ensure you include the module in your module path:
7373

7474
```bash
75-
java --module-path /path/to/jlmap-1.9.5.jar --add-modules io.github.makbn.jlmap your.main.Class
75+
mvn javafx:run
7676
```
7777

7878
## Quick Start

pom.xml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
<artifactId>javafx-maven-plugin</artifactId>
6565
<version>0.0.8</version>
6666
<configuration>
67-
<mainClass>io.github.makbn.jlmap.Leaflet</mainClass>
67+
<mainClass>io.github.makbn.jlmap.demo.LeafletTestJFX</mainClass>
6868
</configuration>
6969
</plugin>
7070
<plugin>
@@ -81,7 +81,7 @@
8181
<archive>
8282
<manifest>
8383
<addClasspath>true</addClasspath>
84-
<mainClass>io.github.makbn.jlmap.Leaflet</mainClass>
84+
<mainClass>io.github.makbn.jlmap.demo.LeafletTestJFX</mainClass>
8585
</manifest>
8686
</archive>
8787
<descriptorRefs>
@@ -97,7 +97,7 @@
9797
<archive>
9898
<manifest>
9999
<addClasspath>true</addClasspath>
100-
<mainClass>io.github.makbn.jlmap.Leaflet</mainClass>
100+
<mainClass>io.github.makbn.jlmap.demo.LeafletTestJFX</mainClass>
101101
</manifest>
102102
</archive>
103103
</configuration>
@@ -117,6 +117,21 @@
117117
</argLine>
118118
</configuration>
119119
</plugin>
120+
<plugin>
121+
<groupId>org.codehaus.mojo</groupId>
122+
<artifactId>exec-maven-plugin</artifactId>
123+
<version>3.1.0</version>
124+
<configuration>
125+
<mainClass>io.github.makbn.jlmap.demo.LeafletTestJFX</mainClass>
126+
<arguments>
127+
<argument>--module-path ${project.basedir}/../../sdk/javafx-sdk-17.0.16/lib</argument>
128+
<argument>--add-modules</argument>
129+
<argument>javafx.controls,javafx.base,javafx.swing,javafx.web,javafx.graphics,jdk.jsobject</argument>
130+
<argument>--add-opens</argument>
131+
<argument>javafx.web/com.sun.javafx.webkit=ALL-UNNAMED</argument>
132+
</arguments>
133+
</configuration>
134+
</plugin>
120135
</plugins>
121136
<sourceDirectory>src/main/java</sourceDirectory>
122137
<testSourceDirectory>src/test/java</testSourceDirectory>

src/test/java/io/github/makbn/jlmap/LeafletTestJFX.java renamed to src/main/java/io/github/makbn/jlmap/demo/LeafletTestJFX.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
package io.github.makbn.jlmap;
1+
package io.github.makbn.jlmap.demo;
22

3+
import io.github.makbn.jlmap.JLMapView;
4+
import io.github.makbn.jlmap.JLProperties;
35
import io.github.makbn.jlmap.geojson.JLGeoJsonObject;
46
import io.github.makbn.jlmap.listener.OnJLMapViewListener;
57
import io.github.makbn.jlmap.listener.OnJLObjectActionListener;

src/main/java/module-info.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,20 @@
2222

2323
// Exports for public API
2424
exports io.github.makbn.jlmap;
25+
exports io.github.makbn.jlmap.demo;
2526
exports io.github.makbn.jlmap.layer;
2627
exports io.github.makbn.jlmap.layer.leaflet;
2728
exports io.github.makbn.jlmap.listener;
2829
exports io.github.makbn.jlmap.model;
2930
exports io.github.makbn.jlmap.exception;
3031
exports io.github.makbn.jlmap.geojson;
32+
exports io.github.makbn.jlmap.engine;
3133

3234
// Opens for reflection (if needed by frameworks)
3335
opens io.github.makbn.jlmap to javafx.graphics;
3436
opens io.github.makbn.jlmap.layer to javafx.graphics;
3537
opens io.github.makbn.jlmap.model to javafx.graphics;
3638
opens io.github.makbn.jlmap.geojson to javafx.graphics;
39+
opens io.github.makbn.jlmap.engine to javafx.graphics;
40+
opens io.github.makbn.jlmap.demo to javafx.graphics;
3741
}

src/test/java/io/github/makbn/jlmap/ModuleSystemTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
/**
88
* Test to verify that the Java Platform Module System is working correctly.
99
*/
10-
public class ModuleSystemTest {
10+
class ModuleSystemTest {
1111

1212
@Test
13-
public void testModuleSystemWorking() {
13+
void testModuleSystemWorking() {
1414
// Test that we can create basic objects from the module
1515
JLLatLng latLng = JLLatLng.builder()
1616
.lat(51.044)
@@ -33,7 +33,7 @@ public void testModuleSystemWorking() {
3333
}
3434

3535
@Test
36-
public void testModuleInfoAccessible() {
36+
void testModuleInfoAccessible() {
3737
// Test that module-info.java is properly processed
3838
Module module = JLMapView.class.getModule();
3939
assertNotNull(module);

0 commit comments

Comments
 (0)