Skip to content

Commit

Permalink
Feat: Updated pom and Launch config
Browse files Browse the repository at this point in the history
Added maven shade to export with javafx. Also fixed main class structure to allow .jar to work.
  • Loading branch information
tommyah committed May 14, 2026
1 parent ca6c893 commit b1dde28
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
22 changes: 21 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>edu.ntnu.idi.idatt2003.g40.mappe</groupId>
<artifactId>mappe</artifactId>
<version>1.1-SNAPSHOT</version>
<version>1.0.0</version>

<properties>
<maven.compiler.source>25</maven.compiler.source>
Expand Down Expand Up @@ -39,6 +39,26 @@

<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>edu.ntnu.idi.idatt2003.g40.mappe.Launcher</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/Launcher.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package edu.ntnu.idi.idatt2003.g40.mappe;

public class Launcher {
static void main(String[] args) {
Main.main(args);
}
}
4 changes: 4 additions & 0 deletions src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
* */
public class Main extends Application {

static void main(String[] args) {
launch(args);
}

/**
* {@inheritDoc}
* */
Expand Down

0 comments on commit b1dde28

Please sign in to comment.