Skip to content

Commit 91697f5

Browse files
committed
Add easy build and execution instructions for developers
1 parent 92e8cab commit 91697f5

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

CONTRIBUTING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ We welcome any type of contribution, not only code. You can help with
1515

1616
Working on your first Pull Request? You can learn how from this *free* series, [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github).
1717

18+
## Getting started with the code
19+
20+
To start development of a new feature or fix, check out the repository with Git and start editing the code in your favorite IDE.
21+
22+
Once you're done editing, you will need a Java 16 JDK as well as Maven to build and run the code. Ensure that the `JAVA_HOME` environment variable is set to your Java 16 JDK path and run the following command to build and execute Asciidocfx: `mvn clean javafx:run -Djavafx.scope=compile`
23+
1824
## Submitting code
1925

2026
Any code change should be submitted as a pull request. The description should explain what the code does and give steps to execute it. The pull request should also contain tests.

pom.xml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
<properties>
1414
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
15+
<asciidocfx.mainClass>com.kodedu.boot.AppStarter</asciidocfx.mainClass>
1516
<java.version>16</java.version>
1617
<maven.compiler.source>${java.version}</maven.compiler.source>
1718
<maven.compiler.target>${java.version}</maven.compiler.target>
@@ -23,6 +24,7 @@
2324
<jaxb.version>2.3.2</jaxb.version>
2425
<jacoco.version>0.8.7</jacoco.version>
2526
<logunit.version>1.1.0</logunit.version>
27+
<javafx.scope>provided</javafx.scope>
2628
</properties>
2729

2830
<organization>
@@ -224,25 +226,25 @@
224226
<groupId>org.openjfx</groupId>
225227
<artifactId>javafx-swing</artifactId>
226228
<version>${openjfx.version}</version>
227-
<scope>provided</scope>
229+
<scope>${javafx.scope}</scope>
228230
</dependency>
229231
<dependency>
230232
<groupId>org.openjfx</groupId>
231233
<artifactId>javafx-controls</artifactId>
232234
<version>${openjfx.version}</version>
233-
<scope>provided</scope>
235+
<scope>${javafx.scope}</scope>
234236
</dependency>
235237
<dependency>
236238
<groupId>org.openjfx</groupId>
237239
<artifactId>javafx-web</artifactId>
238240
<version>${openjfx.version}</version>
239-
<scope>provided</scope>
241+
<scope>${javafx.scope}</scope>
240242
</dependency>
241243
<dependency>
242244
<groupId>org.openjfx</groupId>
243245
<artifactId>javafx-fxml</artifactId>
244246
<version>${openjfx.version}</version>
245-
<scope>provided</scope>
247+
<scope>${javafx.scope}</scope>
246248
</dependency>
247249
<!-- Add test dependencies -->
248250
<dependency>
@@ -326,7 +328,7 @@
326328
<configuration>
327329
<programs>
328330
<program>
329-
<mainClass>com.kodedu.boot.AppStarter</mainClass>
331+
<mainClass>${asciidocfx.mainClass}</mainClass>
330332
<id>asciidocfx</id>
331333
</program>
332334
</programs>
@@ -492,6 +494,15 @@
492494
</execution>
493495
</executions>
494496
</plugin>
497+
<!-- Easy launch in development -->
498+
<plugin>
499+
<groupId>org.openjfx</groupId>
500+
<artifactId>javafx-maven-plugin</artifactId>
501+
<version>0.0.6</version>
502+
<configuration>
503+
<mainClass>${asciidocfx.mainClass}</mainClass>
504+
</configuration>
505+
</plugin>
495506
</plugins>
496507
</build>
497508

0 commit comments

Comments
 (0)