-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathpom.xml
More file actions
215 lines (204 loc) · 10 KB
/
Copy pathpom.xml
File metadata and controls
215 lines (204 loc) · 10 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
<?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>
<parent>
<groupId>org.ps5jb</groupId>
<artifactId>parent</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>org.ps5jb</groupId>
<artifactId>xploit</artifactId>
<packaging>pom</packaging>
<description>
Parent module for all exploit JARs. Includes the infrastructure required to build them.
</description>
<properties>
<bdjstack.dir>${project.basedir}/../lib</bdjstack.dir>
<!-- Class name of the payload that will be executed when JAR is loaded. -->
<xploit.payload></xploit.payload>
<!-- If specified, the payload will run in the background thread with the given name -->
<xploit.background.thread.name></xploit.background.thread.name>
<!-- Override the default Xlet remote logger configuration. Applies for the duration of JAR execution. -->
<xploit.logger.host></xploit.logger.host>
<xploit.logger.port>18194</xploit.logger.port>
</properties>
<modules>
<module>jar</module>
<module>samples</module>
<module>ftpserver</module>
<module>umtx</module>
<module>byepervisor</module>
<module>kerneldump</module>
<module>klogserver</module>
<module>jailbreak</module>
<module>debugsettings</module>
</modules>
<dependencies>
<dependency>
<groupId>org.ps5jb</groupId>
<artifactId>bdj-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.ps5jb</groupId>
<artifactId>javatv-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.ps5jb</groupId>
<artifactId>gem-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.ps5jb</groupId>
<artifactId>xlet</artifactId>
<version>${xlet.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.ps5jb</groupId>
<artifactId>stubs</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.ps5jb</groupId>
<artifactId>sdk</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<!-- When compiling, make sure to patch base JDK modules with BD-J classes in order to not use newer API, not available on PS5 runtime. -->
<!-- The code also does Unsafe and Classloader manipulation so it's necessary to declare access to them. -->
<!-- Finally, Maven compile plugin has a bug where it prints a warning about the patched JARs not being found. These can be ignored. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgs>
<arg>--patch-module</arg>
<arg>java.base=${bdjstack.dir}/pbp-base.jar</arg>
<arg>--patch-module</arg>
<arg>java.desktop=${bdjstack.dir}/pbp-desktop.jar</arg>
<arg>--patch-module</arg>
<arg>java.rmi=${bdjstack.dir}/pbp-rmi.jar</arg>
<arg>--limit-modules</arg>
<arg>java.base,java.desktop,java.rmi</arg>
<arg>--add-exports</arg>
<arg>java.base/jdk.internal.loader=ALL-UNNAMED</arg>
</compilerArgs>
</configuration>
</plugin>
<!-- Generate the JAR with the main class in the manifest. Main class is needed by the JAR loader -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<id>default-jar</id>
<configuration>
<archive>
<manifest>
<mainClass>org.ps5jb.client.JarMain</mainClass>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
<manifestEntries>
<Class-Path>stubs-${project.version}.jar xlet-${xlet.version}.jar gem-api-${project.version}.jar javatv-api-${project.version}.jar bdj-api-${project.version}.jar</Class-Path>
<PS5JB-Client-Payload>${xploit.payload}</PS5JB-Client-Payload>
<PS5JB-Client-Logger-Host>${xploit.logger.host}</PS5JB-Client-Logger-Host>
<PS5JB-Client-Logger-Port>${xploit.logger.port}</PS5JB-Client-Logger-Port>
<PS5JB-Client-Background-Thread-Name>${xploit.background.thread.name}</PS5JB-Client-Background-Thread-Name>
</manifestEntries>
</archive>
</configuration>
</execution>
</executions>
</plugin>
<!-- Copy dependent JARs so that it's possible to execute it on a local development machine -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
<includeScope>compile</includeScope>
<excludeArtifactIds>sdk</excludeArtifactIds>
<excludeTypes>pom</excludeTypes>
</configuration>
</execution>
</executions>
</plugin>
<!-- Embed all the dependent classes directly inside the final JAR -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<id>default-shade</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<filters>
<filter>
<artifact>org.ps5jb:sdk</artifact>
<excludes>
<exclude>META-INF/MANIFEST.MF</exclude>
</excludes>
</filter>
<filter>
<artifact>org.ps5jb.xploit:jar</artifact>
<excludes>
<exclude>META-INF/MANIFEST.MF</exclude>
</excludes>
</filter>
<filter>
<artifact>org.ps5jb.xploit.umtx:common</artifact>
<excludes>
<exclude>META-INF/MANIFEST.MF</exclude>
</excludes>
</filter>
</filters>
<outputFile>${project.build.directory}/${project.build.finalName}.jar</outputFile>
</configuration>
</plugin>
<!-- Generate Javadoc for this project -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>default-javadoc</id>
<phase>verify</phase>
<goals>
<goal>javadoc-no-fork</goal>
</goals>
<configuration>
<additionalJOptions>
<additionalJOption>--add-exports</additionalJOption>
<additionalJOption>java.base/jdk.internal.loader=ALL-UNNAMED</additionalJOption>
</additionalJOptions>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>