Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add easy build and execution instructions for developers #525

Open
wants to merge 2 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ We welcome any type of contribution, not only code. You can help with

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).

## Getting started with the code

To start development of a new feature or fix, check out the repository with Git and start editing the code in your favorite IDE.

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`

## Submitting code

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.
Expand Down
192 changes: 107 additions & 85 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<asciidocfx.mainClass>com.kodedu.boot.AppStarter</asciidocfx.mainClass>
<java.version>16</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
Expand All @@ -23,6 +24,96 @@
<jaxb.version>2.3.2</jaxb.version>
<jacoco.version>0.8.7</jacoco.version>
<logunit.version>1.1.0</logunit.version>
<javafx.scope>provided</javafx.scope>
<javafx.jvmArgs.modules>
--module-path jmods
--add-modules=ALL-MODULE-PATH
--add-modules=javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web
</javafx.jvmArgs.modules>
<javafx.jvmArgs.exports>
--add-exports
javafx.graphics/com.sun.javafx.scene.layout=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.javafx.util=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.javafx.application=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.javafx.sg.prism=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.javafx.scene=ALL-UNNAMED
--add-exports
javafx.base/com.sun.javafx.logging=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.prism=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.glass.ui=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.javafx.geom.transform=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.javafx.tk=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.glass.utils=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.javafx.font=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.javafx.scene.input=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.javafx.scene.text=ALL-UNNAMED
--add-exports
javafx.base/com.sun.javafx.event=ALL-UNNAMED
--add-exports
javafx.base/com.sun.javafx.reflect=ALL-UNNAMED
--add-exports
javafx.base/com.sun.javafx.beans=ALL-UNNAMED
--add-exports
javafx.base/com.sun.javafx.collections=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.javafx.scene.traversal=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.javafx.stage=ALL-UNNAMED
--add-exports
javafx.base/com.sun.javafx.binding=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.javafx.geom=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.javafx.iio=ALL-UNNAMED
--add-exports
javafx.base/com.sun.javafx=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.prism.paint=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.scenario.effect=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.javafx.text=ALL-UNNAMED
--add-opens
javafx.base/com.sun.javafx.collections=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.scenario.effect.impl.prism=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.javafx.css=ALL-UNNAMED
--add-opens
javafx.base/com.sun.javafx.collections=javafx.web
--add-opens
javafx.controls/javafx.scene.control=ALL-UNNAMED
--add-exports
javafx.base/com.sun.javafx.property=ALL-UNNAMED
--add-exports
javafx.controls/com.sun.javafx.scene.control=ALL-UNNAMED
</javafx.jvmArgs.exports>
<project.jvmArgs.base>
-Duser.language=en
-Duser.country=US
-Dfile.encoding=UTF-8
-Xms128M
-Xmx756M
-Djava.awt.headless=false
--illegal-access=permit
</project.jvmArgs.base>
<project.jvmArgs>
${project.jvmArgs.base}
${javafx.jvmArgs.exports}
${javafx.jvmArgs.modules}
</project.jvmArgs>
</properties>

<organization>
Expand Down Expand Up @@ -224,25 +315,25 @@
<groupId>org.openjfx</groupId>
<artifactId>javafx-swing</artifactId>
<version>${openjfx.version}</version>
<scope>provided</scope>
<scope>${javafx.scope}</scope>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>${openjfx.version}</version>
<scope>provided</scope>
<scope>${javafx.scope}</scope>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-web</artifactId>
<version>${openjfx.version}</version>
<scope>provided</scope>
<scope>${javafx.scope}</scope>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>${openjfx.version}</version>
<scope>provided</scope>
<scope>${javafx.scope}</scope>
</dependency>
<!-- Add test dependencies -->
<dependency>
Expand Down Expand Up @@ -326,90 +417,11 @@
<configuration>
<programs>
<program>
<mainClass>com.kodedu.boot.AppStarter</mainClass>
<mainClass>${asciidocfx.mainClass}</mainClass>
<id>asciidocfx</id>
</program>
</programs>
<extraJvmArguments>
-Duser.language=en
-Duser.country=US
-Dfile.encoding=UTF-8
-Xms128M
-Xmx756M
-Djava.awt.headless=false
--illegal-access=permit
--add-exports
javafx.graphics/com.sun.javafx.scene.layout=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.javafx.util=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.javafx.application=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.javafx.sg.prism=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.javafx.scene=ALL-UNNAMED
--add-exports
javafx.base/com.sun.javafx.logging=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.prism=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.glass.ui=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.javafx.geom.transform=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.javafx.tk=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.glass.utils=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.javafx.font=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.javafx.scene.input=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.javafx.scene.text=ALL-UNNAMED
--add-exports
javafx.base/com.sun.javafx.event=ALL-UNNAMED
--add-exports
javafx.base/com.sun.javafx.reflect=ALL-UNNAMED
--add-exports
javafx.base/com.sun.javafx.beans=ALL-UNNAMED
--add-exports
javafx.base/com.sun.javafx.collections=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.javafx.scene.traversal=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.javafx.stage=ALL-UNNAMED
--add-exports
javafx.base/com.sun.javafx.binding=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.javafx.geom=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.javafx.iio=ALL-UNNAMED
--add-exports
javafx.base/com.sun.javafx=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.prism.paint=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.scenario.effect=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.javafx.text=ALL-UNNAMED
--add-opens
javafx.base/com.sun.javafx.collections=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.scenario.effect.impl.prism=ALL-UNNAMED
--add-exports
javafx.graphics/com.sun.javafx.css=ALL-UNNAMED
--add-opens
javafx.base/com.sun.javafx.collections=javafx.web
--add-opens
javafx.controls/javafx.scene.control=ALL-UNNAMED
--add-exports
javafx.base/com.sun.javafx.property=ALL-UNNAMED
--add-exports
javafx.controls/com.sun.javafx.scene.control=ALL-UNNAMED
--module-path jmods
--add-modules=ALL-MODULE-PATH
--add-modules=javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web
</extraJvmArguments>
<extraJvmArguments>${project.jvmArgs}</extraJvmArguments>
<!--&#45;&#45;add-opens javafx.base/com.sun.javafx.collections=javafx.web-->
<!--&#45;&#45;add-exports javafx.controls/com.sun.javafx.scene.control=ALL-UNNAMED-->
<repositoryLayout>flat</repositoryLayout>
Expand Down Expand Up @@ -492,6 +504,16 @@
</execution>
</executions>
</plugin>
<!-- Easy launch in development -->
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.6</version>
<configuration>
<mainClass>${asciidocfx.mainClass}</mainClass>
<options>${project.jvmArgs.base} ${javafx.jvmArgs.exports}</options>
</configuration>
</plugin>
</plugins>
</build>

Expand Down