-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpom.xml
More file actions
222 lines (208 loc) · 10.1 KB
/
pom.xml
File metadata and controls
222 lines (208 loc) · 10.1 KB
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<?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>cc.eguid.tools.simplePortScanningTool</groupId>
<artifactId>simplePortScanningTool</artifactId>
<version>1.1.0</version>
<packaging>jar</packaging>
<description>Simple fast port scanning tool</description>
<developers>
<developer>
<id>1</id>
<name>eguid</name>
<email>eguid@qq.com</email>
</developer>
</developers>
<organization>
<name>eguid</name>
<url>https://blog.eguid.cc</url>
</organization>
<properties>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.formdev</groupId>
<artifactId>flatlaf</artifactId>
<version>3.4.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<!-- 复制依赖到lib目录 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.2</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
<!-- 创建包含所有依赖的fat jar -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<archive>
<manifest>
<mainClass>cc.eguid.tools.simplePortScanningTool.App</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<appendAssemblyId>false</appendAssemblyId>
<finalName>${project.build.finalName}-fat</finalName>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- 不需要每次都生成,需要的时候再用,用于执行jlink命令生成裁剪的JRE -->
<!-- <plugin>-->
<!-- <groupId>org.apache.maven.plugins</groupId>-->
<!-- <artifactId>maven-antrun-plugin</artifactId>-->
<!-- <version>3.1.0</version>-->
<!-- <executions>-->
<!-- <execution>-->
<!-- <id>create-custom-jre</id>-->
<!-- <phase>prepare-package</phase> <!– 在打包阶段之前执行 –>-->
<!-- <goals>-->
<!-- <goal>run</goal>-->
<!-- </goals>-->
<!-- <configuration>-->
<!-- <target>-->
<!-- <echo>使用 jlink 创建裁剪后的 JRE...</echo>-->
<!-- <exec executable="${java.home}/bin/jlink" failonerror="true">-->
<!-- <arg value="--module-path" />-->
<!-- <arg value="${java.home}/jmods" />-->
<!-- <arg value="--add-modules" />-->
<!-- <!– 【核心】根据你的应用调整模块列表 –>-->
<!-- <arg value="java.base,java.desktop,java.logging" />-->
<!-- <arg value="--output" />-->
<!-- <arg value="${project.build.directory}/jre" />-->
<!-- <arg value="--strip-debug" />-->
<!-- <arg value="--no-header-files" />-->
<!-- <arg value="--no-man-pages" />-->
<!-- <arg value="--compress=2" />-->
<!-- </exec>-->
<!-- <echo>裁剪后的 JRE 已生成到:${project.build.directory}/jre</echo>-->
<!-- </target>-->
<!-- </configuration>-->
<!-- </execution>-->
<!-- </executions>-->
<!-- </plugin>-->
<!-- 创建包含所有依赖的fat jar -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<archive>
<manifest>
<mainClass>cc.eguid.tools.simplePortScanningTool.App</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<appendAssemblyId>false</appendAssemblyId>
<finalName>${project.build.finalName}-fat</finalName>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.akathist.maven.plugins.launch4j</groupId>
<artifactId>launch4j-maven-plugin</artifactId>
<version>2.5.3</version>
<executions>
<execution>
<id>l4j-clui</id>
<phase>package</phase>
<goals>
<goal>launch4j</goal>
</goals>
<configuration>
<headerType>gui</headerType>
<jar>target/${project.build.finalName}-fat.jar</jar>
<outfile>target/${project.build.finalName}.exe</outfile>
<errTitle>${project.name}</errTitle>
<classPath>
<mainClass>cc.eguid.tools.simplePortScanningTool.App</mainClass>
</classPath>
<icon>src/main/resources/logo.ico</icon>
<jre>
<minVersion>21</minVersion>
<initialHeapSize>128</initialHeapSize>
<path>./jre;%JAVA_HOME%;%PATH%</path>
<maxHeapSize>1024</maxHeapSize>
</jre>
<versionInfo>
<fileVersion>1.2.0.0</fileVersion>
<txtFileVersion>${project.version}</txtFileVersion>
<fileDescription>${project.description}</fileDescription>
<copyright>${project.organization.name}</copyright>
<productVersion>1.2.0.0</productVersion>
<txtProductVersion>${project.version}</txtProductVersion>
<productName>${project.name}</productName>
<companyName>${project.organization.name}</companyName>
<internalName>${project.name}</internalName>
<originalFilename>${project.name}.exe</originalFilename>
</versionInfo>
<messages>
<startupErr>running error: Not found Java Runtime Environment.</startupErr>
<bundledJreErr>JRE error: This application requires a Java Runtime Environment.</bundledJreErr>
<jreVersionErr>Java version error: Need Java 1.8 or later.</jreVersionErr>
<launcherErr>launcher Error!</launcherErr>
</messages>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.zip</include>
<include>**/*.ico</include>
<include>**/*.bmp</include>
<include>**/*.png</include>
<include>**/*.jpg</include>
<include>**/*.properties</include>
</includes>
</resource>
</resources>
</build>
</project>