-
Notifications
You must be signed in to change notification settings - Fork 87
/
Copy pathpom.xml
211 lines (205 loc) · 9.32 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
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
<?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>com.pcdd</groupId>
<artifactId>so-novel</artifactId>
<version>1.7.5</version>
<packaging>jar</packaging>
<name>so-novel</name>
<url>https://github.com/freeok/so-novel</url>
<description>交互式网络小说下载器</description>
<inceptionYear>2021</inceptionYear>
<organization>
<name>freeok</name>
<url>https://github.com/freeok/</url>
</organization>
<properties>
<java.version>17</java.version>
<jline.version>3.27.1</jline.version>
<!-- 相当于 source + target,这种写法要求 Maven 3.6.0+、JDK 9+。https://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-release.html -->
<!-- <maven.compiler.release>${java.version}</maven.compiler.release> -->
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.18.1</version>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.8.33</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.34</version>
</dependency>
<dependency>
<groupId>io.documentnode</groupId>
<artifactId>epub4j-core</artifactId>
<version>4.2.1</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.11.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.32</version>
</dependency>
<dependency>
<groupId>org.fusesource.jansi</groupId>
<artifactId>jansi</artifactId>
<version>2.4.1</version>
</dependency>
<dependency>
<groupId>org.jline</groupId>
<artifactId>jline</artifactId>
<version>${jline.version}</version>
</dependency>
<!-- https://github.com/jline/jline3?tab=readme-ov-file#ffm-vs-jni-vs-jansi-vs-jna-vs-exec -->
<!-- 不加运行 exe 报错 -->
<dependency>
<groupId>org.jline</groupId>
<artifactId>jline-terminal-jni</artifactId>
<version>${jline.version}</version>
</dependency>
<dependency>
<groupId>me.tongfei</groupId>
<artifactId>progressbar</artifactId>
<version>0.10.1</version>
</dependency>
<dependency>
<groupId>com.hankcs</groupId>
<artifactId>hanlp</artifactId>
<version>portable-1.8.6</version>
</dependency>
<!-- JS 引擎 -->
<dependency>
<groupId>org.openjdk.nashorn</groupId>
<artifactId>nashorn-core</artifactId>
<version>15.6</version>
</dependency>
</dependencies>
<build>
<plugins>
<!-- IDEA 的终端无法开发 jline 程序,因此在 wt 中运行 -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<mainClass>com.pcdd.sonovel.Main</mainClass>
</configuration>
</plugin>
<!--
maven-jar-plugin 打包生成的 jar,只包含该工程下源码编译结果,不包含依赖内容
使用以下插件将所有外部库打包进 jar
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.7.1</version>
<configuration>
<archive>
<manifest>
<mainClass>com.pcdd.sonovel.Main</mainClass>
</manifest>
</archive>
<descriptorRefs>
<!-- 必须加,固定写法,表示将项目的编译结果和依赖库打包到一个 JAR 文件中 -->
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<finalName>app</finalName>
</configuration>
<executions>
<execution>
<id>make-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<configuration>
<propertiesEncoding>UTF-8</propertiesEncoding>
</configuration>
</plugin>
<plugin>
<!-- https://mvnrepository.com/artifact/com.akathist.maven.plugins.launch4j/launch4j-maven-plugin -->
<groupId>com.akathist.maven.plugins.launch4j</groupId>
<artifactId>launch4j-maven-plugin</artifactId>
<version>2.5.2</version>
<executions>
<execution>
<id>launch4j-exe</id>
<phase>package</phase>
<goals>
<goal>launch4j</goal>
</goals>
<!-- https://launch4j.sourceforge.net/docs.html#Configuration_file -->
<configuration>
<!-- 运行方式 gui|console|jniGui32|jniConsole32 -->
<headerType>console</headerType>
<outfile>target/SoNovel/SoNovel.exe</outfile>
<jar>${project.build.directory}/app-jar-with-dependencies.jar</jar>
<icon>assets/logo-1.ico</icon>
<errTitle>SoNovel</errTitle>
<!-- 崩溃时重新启动 -->
<restartOnCrash>true</restartOnCrash>
<classPath>
<mainClass>com.pcdd.sonovel.Main</mainClass>
<addDependencies>true</addDependencies>
<preCp>anything</preCp>
</classPath>
<jre>
<!-- jre 目录,动态配置:-DjrePath=runtime -->
<path>${jrePath}</path>
<minVersion>17</minVersion>
</jre>
<!-- Windows 资源管理器显示的可选版本信息 -->
<versionInfo>
<fileVersion>${project.version}.0</fileVersion>
<txtFileVersion>${project.version}.0</txtFileVersion>
<!-- 中文会乱码,待解决 -->
<fileDescription>Interactive online novel downloader</fileDescription>
<copyright>Copyright (C) 2021-2025 pcdd. All rights reserved.</copyright>
<productVersion>${project.version}.0</productVersion>
<txtProductVersion>${project.version}.0</txtProductVersion>
<!-- 中文会乱码,待解决 -->
<productName>So Novel</productName>
<companyName>github.com/freeok</companyName>
<internalName>SoNovel</internalName>
<originalFilename>SoNovel.exe</originalFilename>
<trademarks>pcdd</trademarks>
<language>SIMPLIFIED_CHINESE</language>
</versionInfo>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<!-- resources 的文件用 @..@ 获取 pom.xml 的 properties -->
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
</project>