Compare commits

...

2 Commits

Author SHA1 Message Date
0594a64812 Remove unused portions of pom.xml
They were different attempts to get it working, so might be useful to
reference in the future.
2025-03-09 15:18:14 -07:00
48790790b4 Add pom.xml and set up jar packaging
FXML loading needed to change when resources were packaged in jar.
2025-03-09 15:18:14 -07:00
4 changed files with 126 additions and 5 deletions

121
pom.xml Normal file
View File

@ -0,0 +1,121 @@
<?xml version="1.0" encoding="utf-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>name.nathanmcrae</groupId>
<artifactId>numbersstation</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<maven.compiler.source>23</maven.compiler.source>
<maven.compiler.target>23</maven.compiler.target>
<javafx.version>23.0.2</javafx.version>
</properties>
<repositories>
<repository>
<id>my-local-repo</id>
<url>file://${project.basedir}/mvn-repo</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.fasterxml.woodstox</groupId>
<artifactId>woodstox-core</artifactId>
<version>7.1.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.18.2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.18.2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
<version>2.18.2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>2.18.2</version>
</dependency>
<dependency>
<groupId>com.github.mwiede</groupId>
<artifactId>jsch</artifactId>
<version>0.2.23</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>${javafx.version}</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-fxml</artifactId>
<version>${javafx.version}</version>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.9.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
</dependency>
<dependency>
<groupId>wordpress</groupId>
<artifactId>xmlrpc-client</artifactId>
<version>3.1.3</version>
</dependency>
<dependency>
<groupId>com.tearsofaunicorn.wordpress</groupId>
<artifactId>wordpress-xmlrpc-client</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.apache.xmlrpc</groupId>
<artifactId>xmlrpc-common</artifactId>
<version>3.1.3</version>
</dependency>
<dependency>
<groupId>com.leakyabstractions</groupId>
<artifactId>result</artifactId>
<version>1.0.0.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>name.nathanmcrae.numbersstation.MainRun</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -62,7 +62,7 @@ public class Main extends Application {
try {
if (startParams.notification().isPresent()){
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("NotificationView.fxml"));
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/NotificationView.fxml"));
Parent root = fxmlLoader.load();
NotificationController controller = fxmlLoader.getController();
@ -72,7 +72,7 @@ public class Main extends Application {
primaryStage.setScene(new Scene(root));
primaryStage.show();
} else {
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("MainView.fxml"));
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/MainView.fxml"));
Parent root = fxmlLoader.load();
MainController controller = fxmlLoader.getController();

View File

@ -66,7 +66,7 @@ public class MainController implements Initializable {
private void handleStationSettingsButtonPress() {
if (settingsStage == null || !settingsStage.isShowing()) {
try {
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("StationSettingsView.fxml"));
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/StationSettingsView.fxml"));
Parent root = fxmlLoader.load();
StationSettingsController controller = fxmlLoader.getController();
@ -101,7 +101,7 @@ public class MainController implements Initializable {
private void handleSelectStationButtonPress() throws Exception {
if (selectStationStage == null || !selectStationStage.isShowing()) {
try {
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("StationSelectionView.fxml"));
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/StationSelectionView.fxml"));
Parent root = fxmlLoader.load();
StationSelectionController controller = fxmlLoader.getController();

View File

@ -357,7 +357,7 @@ public class StationSettingsController {
@FXML
private void handleAddPrefixButtonPress() {
try {
FXMLLoader loader = new FXMLLoader(getClass().getResource("AddPrefixView.fxml"));
FXMLLoader loader = new FXMLLoader(getClass().getResource("/AddPrefixView.fxml"));
Parent root = loader.load();
AddPrefixController controller = loader.getController();