-
-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy pathpom.xml
More file actions
357 lines (355 loc) · 15.1 KB
/
Copy pathpom.xml
File metadata and controls
357 lines (355 loc) · 15.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
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
<?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.xebyte</groupId>
<artifactId>GhidraMCP</artifactId>
<packaging>jar</packaging>
<version>5.15.0</version>
<name>Ghidra MCP Server</name>
<description>Production-ready Model Context Protocol server for Ghidra reverse engineering platform. Provides MCP-based tooling and automation for reverse engineering workflows: convention-enforcing rename/type/comment endpoints, batch operations, P-code emulation, live debugger integration, headless server, and Ghidra Server multi-version support.</description>
<url>https://github.com/bethington/ghidra-mcp</url>
<properties>
<maven.compiler.release>21</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<ghidra.version>12.1.2</ghidra.version>
<!-- Build timestamp generated at compile time (format: yyyyMMdd-HHmmss) -->
<build.timestamp>${maven.build.timestamp}</build.timestamp>
<maven.build.timestamp.format>yyyyMMdd-HHmmss</maven.build.timestamp.format>
<!-- Build number - use current time as unique identifier -->
<build.number>${maven.build.timestamp}</build.number>
<!-- Default empty so surefire's @{argLine} resolves even when the
JaCoCo agent is skipped (jacoco.skip=true); prepare-agent
overwrites this property at runtime. -->
<argLine></argLine>
</properties>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<id>bethington</id>
<name>Project Maintainer</name>
<url>https://github.com/bethington</url>
</developer>
</developers>
<scm>
<connection>scm:git:git://github.com/bethington/ghidra-mcp.git</connection>
<developerConnection>scm:git:ssh://github.com:bethington/ghidra-mcp.git</developerConnection>
<url>http://github.com/bethington/ghidra-mcp/tree/main</url>
</scm>
<dependencies>
<!-- Ghidra dependencies (installed locally via mvn install:install-file) -->
<dependency>
<groupId>ghidra</groupId>
<artifactId>Generic</artifactId>
<version>${ghidra.version}</version>
</dependency>
<dependency>
<groupId>ghidra</groupId>
<artifactId>SoftwareModeling</artifactId>
<version>${ghidra.version}</version>
</dependency>
<dependency>
<groupId>ghidra</groupId>
<artifactId>Project</artifactId>
<version>${ghidra.version}</version>
</dependency>
<dependency>
<groupId>ghidra</groupId>
<artifactId>Docking</artifactId>
<version>${ghidra.version}</version>
</dependency>
<dependency>
<groupId>ghidra</groupId>
<artifactId>Decompiler</artifactId>
<version>${ghidra.version}</version>
</dependency>
<dependency>
<groupId>ghidra</groupId>
<artifactId>Utility</artifactId>
<version>${ghidra.version}</version>
</dependency>
<dependency>
<groupId>ghidra</groupId>
<artifactId>Base</artifactId>
<version>${ghidra.version}</version>
</dependency>
<dependency>
<groupId>ghidra</groupId>
<artifactId>Gui</artifactId>
<version>${ghidra.version}</version>
</dependency>
<dependency>
<groupId>ghidra</groupId>
<artifactId>FileSystem</artifactId>
<version>${ghidra.version}</version>
</dependency>
<dependency>
<groupId>ghidra</groupId>
<artifactId>Help</artifactId>
<version>${ghidra.version}</version>
</dependency>
<!-- Ghidra Emulation (for EmulationService P-code emulator) -->
<dependency>
<groupId>ghidra</groupId>
<artifactId>Emulation</artifactId>
<version>${ghidra.version}</version>
</dependency>
<!-- Ghidra Debug module dependencies (for DebuggerService) -->
<dependency>
<groupId>ghidra</groupId>
<artifactId>Debugger-api</artifactId>
<version>${ghidra.version}</version>
</dependency>
<dependency>
<groupId>ghidra</groupId>
<artifactId>Framework-TraceModeling</artifactId>
<version>${ghidra.version}</version>
</dependency>
<dependency>
<groupId>ghidra</groupId>
<artifactId>Debugger-rmi-trace</artifactId>
<version>${ghidra.version}</version>
</dependency>
<!-- Gson (provided — bundled with Ghidra in Framework/Generic/lib/) -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.14.0</version>
<scope>provided</scope>
</dependency>
<!-- JUnit (test only) -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
<!-- Mockito (test only) -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.23.0</version>
<scope>test</scope>
</dependency>
<!-- Ghidra DB (test only) — needed so Mockito can instrument Program's type hierarchy -->
<dependency>
<groupId>ghidra</groupId>
<artifactId>DB</artifactId>
<version>${ghidra.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}-${project.version}</finalName>
<!-- Enable resource filtering for version substitution -->
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>com/xebyte/version.properties</include>
<include>extension.properties</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>false</filtering>
<excludes>
<exclude>com/xebyte/version.properties</exclude>
<exclude>extension.properties</exclude>
</excludes>
</resource>
</resources>
<plugins>
<!-- Maven Surefire Plugin — enable Byte Buddy experimental mode for Java 25.
@{argLine} late-binds the JaCoCo agent injected by prepare-agent. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.6</version>
<configuration>
<argLine>@{argLine} -Dnet.bytebuddy.experimental=true</argLine>
</configuration>
</plugin>
<!-- JaCoCo — line coverage for the offline test tier. Report lands in
target/site/jacoco/ on every `mvn test`. Baseline-only for now
(no coverage gate); disable with -Djacoco.skip=true. -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.13</version>
<executions>
<execution>
<id>jacoco-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>jacoco-report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Maven Compiler Plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.15.0</version>
<configuration>
<release>${maven.compiler.release}</release>
<encoding>UTF-8</encoding>
<showWarnings>false</showWarnings>
</configuration>
</plugin>
<!-- Ensure deterministic resource/properties encoding -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
<propertiesEncoding>${project.build.sourceEncoding}</propertiesEncoding>
</configuration>
</plugin>
<!-- Use custom MANIFEST.MF -->
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<archive>
<manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
</archive>
<!-- Exclude the App class -->
<excludes>
<exclude>**/App.class</exclude>
</excludes>
<!-- Make sure output directory is target for consistency -->
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</plugin>
<!-- The Assembly Plugin for creating the Ghidra extension ZIP -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<!-- Using the custom assembly descriptor -->
<descriptors>
<descriptor>src/assembly/ghidra-extension.xml</descriptor>
</descriptors>
<!-- Don't append the assembly ID -->
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</plugin>
<!-- Copy dependencies to target/lib for the assembly -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.11.0</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
<includeScope>runtime</includeScope>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<!-- Build Profiles -->
<profiles>
<!-- Headless Server Profile -->
<profile>
<id>headless</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<archive>
<manifest>
<mainClass>com.xebyte.headless.GhidraMCPHeadlessServer</mainClass>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
</manifest>
</archive>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<descriptors>
<descriptor>src/assembly/headless-jar.xml</descriptor>
</descriptors>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
<executions>
<execution>
<id>make-headless-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- Docker Build Profile -->
<profile>
<id>docker</id>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.48.1</version>
<configuration>
<images>
<image>
<name>ghidra-mcp-headless:${project.version}</name>
<build>
<contextDir>${project.basedir}</contextDir>
<dockerFile>docker/Dockerfile</dockerFile>
</build>
</image>
</images>
</configuration>
<executions>
<execution>
<id>build-docker</id>
<phase>package</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>