-
Notifications
You must be signed in to change notification settings - Fork 2
/
pom.xml
82 lines (79 loc) · 5.41 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
<?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.doidea</groupId>
<artifactId>doidea-asm</artifactId>
<version>2.0.0</version>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<skipTests>true</skipTests><!-- 打包跳过测试 -->
</properties>
<build>
<finalName>${project.artifactId}-${project.version}</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
<excludes>
<exclude>images/*.*</exclude><!-- 打包排除 images -->
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<!--<compilerArgument>-XDignore.symbol.file</compilerArgument>-->
<compilerArgs>
<!-- 解决 Maven package 打包,程序包 jdk.internal.org.objectweb.asm 不可见 -->
<arg>--add-exports=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED</arg>
<arg>--add-exports=java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED</arg>
</compilerArgs>
<compilerArguments>
<!--<verbose/>-->
<!-- 将jdk的依赖jar打入项目中,这样项目中使用的jdk的依赖就可以正常使用,试了没效果 -->
<!--<bootclasspath>${java.home}/lib/rt.jar;${java.home}/lib/jce.jar;${java.home}/lib/jsse.jar</bootclasspath>-->
</compilerArguments>
</configuration>
</plugin>
<plugin>
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-jar-plugin -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.4.1</version>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
<!-- 自动添加和配置 META-INF/MANIFEST.MF -->
<manifest>
<!-- 指定入口函数 -->
<mainClass>com.doidea.core.Launcher</mainClass>
<!-- 是否添加依赖的jar路径配置 -->
<!-- maven-assembly-plugin 不需要设置lib -->
<!--<addClasspath>false</addClasspath>-->
<!-- 依赖jar包位置前缀 -->
<!--<classpathPrefix>lib/</classpathPrefix>-->
</manifest>
<!-- MANIFEST.MF 补充参数 -->
<manifestEntries>
<!--https://docs.oracle.com/en/java/javase/17/docs/api/java.instrument/java/lang/instrument/package-summary.html-->
<Premain-Class>com.doidea.core.Launcher</Premain-Class><!--包含 premain 方法的类(类的全路径名)-->
<Agent-Class>com.doidea.core.Launcher</Agent-Class><!--包含 agentmain 方法的类(类的全路径名)-->
<!--<Launcher-Agent-Class>com.doidea.core.Launcher</Launcher-Agent-Class>--><!--指定在调用应用程序主方法之前启动的代理的类名-->
<!--<Boot-Class-Path>E:/DevRes/doidea/doidea-asm-2.0.0.jar</Boot-Class-Path>--><!--将自定义类加入BootstrapClassLoader。设置引导类加载器搜索的路径列表。查找类的特定于平台的机制失败后,引导类加载器会搜索这些路径。按列出的顺序搜索路径。列表中的路径由一个或多个空格分开。路径使用分层 URI 的路径组件语法。如果该路径以斜杠字符(“/”)开头,则为绝对路径,否则为相对路径。相对路径根据代理 JAR 文件的绝对路径解析。忽略格式不正确的路径和不存在的路径。如果代理是在 VM 启动之后某一时刻启动的,则忽略不表示 JAR 文件的路径。(可选)-->
<Can-Redefine-Classes>true</Can-Redefine-Classes><!--true表示能重定义此代理所需的类,默认值为 false(可选)-->
<Can-Retransform-Classes>true</Can-Retransform-Classes><!--true 表示能重转换此代理所需的类,默认值为 false (可选)-->
<Can-Set-Native-Method-Prefix>true</Can-Set-Native-Method-Prefix><!--true表示能设置此代理所需的本机方法前缀,默认值为 false(可选)-->
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>
</project>