-
Notifications
You must be signed in to change notification settings - Fork 0
/
pom.xml
167 lines (161 loc) · 7.83 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>no.ntnu</groupId>
<artifactId>WarGames</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<!-- Java version and encoding -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<!-- Maven plugin versions -->
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
<maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>
<maven-shade-plugin.version>3.2.4</maven-shade-plugin.version>
<maven-javadoc-plugin.version>3.3.1</maven-javadoc-plugin.version>
<javafx-maven-plugin.version>0.0.8</javafx-maven-plugin.version>
<jpackage-maven-plugin.version>1.4.0</jpackage-maven-plugin.version>
<!-- Dependencies -->
<junit-jupiter.version>5.8.2</junit-jupiter.version>
<javafx.version>17.0.2</javafx.version>
</properties>
<dependencies>
<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>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit-jupiter.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>${javafx-maven-plugin.version}</version>
<configuration>
<mainClass>no.ntnu.wargames/no.ntnu.wargames.AppMain</mainClass>
<!--
Tillegg for JLink
-->
<jlinkImageName>WarGames</jlinkImageName>
<launcher>WarGames</launcher>
</configuration>
</plugin>
<!--
Surefire is the test-plugin for Maven. Surefire will use whatever
test engine (JUnit4, JUnit5, TestNG etc) added as dependency
to the project.
The default version of surefire that comes bundled with maven is 2.12.4.
This version only supports up to JUnit4.
Hence to be able to run JUnit 5 tests, we need to add a newer version of
the Surefire plugin, like 3.0.0-M5
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
</plugin>
<!--
This plugin creates what is called an "Uber-jar", which is a single JAR-file that incorporates
all the JAR-files that this project depends on. This way, you can distribute this single
JAR-file to the "customer", and it should be possible for the customer to just double-click the
JAR-file to run the application-
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>${maven-shade-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<transformers>
<transformer implementation=
"org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>no.ntnu.wargames/no.ntnu.wargames.JarMain</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<!--
The jpackage plugin creates an installer (.dmg on mac, .exe on windows, .deb on ubutnu).
NB! Remember to run the javafx:jlink plugin prior to running this plugin.
I have not tested this fully, so it might not work....
-->
<groupId>org.panteleyev</groupId>
<artifactId>jpackage-maven-plugin</artifactId>
<version>${jpackage-maven-plugin.version}</version>
<configuration>
<name>WarGames</name>
<appVersion>1.0.0</appVersion>
<vendor>no.ntnu</vendor>
<destination>target/dist</destination>
<module>no.ntnu.wargames.JarMain</module>
<runtimeImage>target</runtimeImage>
<linuxShortcut>true</linuxShortcut>
<linuxPackageName>treefx</linuxPackageName>
<linuxAppCategory>Utilities</linuxAppCategory>
<linuxMenuGroup>Utilities</linuxMenuGroup>
<icon>src/main/resources/no/ntnu/wargames/icon/logoIcon.PNG</icon>
<javaOptions>
<option>-Dfile.encoding=UTF-8</option>
</javaOptions>
</configuration>
</plugin>
<plugin>
<!-- As averything else in Maven, a Plugin is also uniquely identified by its coordinates -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<!-- configure how to execute this plugin -->
<executions>
<execution>
<!--
connect the execution of the plugin to the Maven lifecycle phase "package"
so that JavaDoc is generated every time you run "mvn package"
-->
<phase>package</phase>
<id>attach-javadocs</id>
<!--
set which of the goals in the plugin to execute. The JavaDoc plugin
has a total of 16 goals to choose from. See: https://maven.apache.org/plugins/maven-javadoc-plugin/
The most common once beeing either "javadoc" or "jar"
-->
<goals>
<goal>javadoc</goal>
</goals>
</execution>
</executions>
<configuration>
<!-- generate javadoc only for public classes and members -->
<show>public</show>
<!-- Omits the HELP link in the navigation bars at the top and bottom of each page of output. -->
<nohelp>true</nohelp>
</configuration>
</plugin>
</plugins>
</build>
</project>