-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpom.xml
More file actions
739 lines (674 loc) · 37.1 KB
/
Copy pathpom.xml
File metadata and controls
739 lines (674 loc) · 37.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
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
<?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
https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.tabforgeai</groupId>
<artifactId>legacy-sql-architect-mcp</artifactId>
<version>1.1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Legacy SQL Architect MCP</name>
<description>AI MCP server that enables LLM agents to understand, analyze and document legacy databases.</description>
<url>https://github.com/tabforgeai/legacy-sql-architect-mcp</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<name>Svetozar Radojcin</name>
<email>svetozar.radojcin@outlook.com</email>
<url>https://github.com/tabforgeai</url>
</developer>
</developers>
<scm>
<connection>scm:git:https://github.com/tabforgeai/legacy-sql-architect-mcp.git</connection>
<developerConnection>scm:git:https://github.com/tabforgeai/legacy-sql-architect-mcp.git</developerConnection>
<url>https://github.com/tabforgeai/legacy-sql-architect-mcp</url>
<tag>HEAD</tag>
</scm>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>21</maven.compiler.release>
<main.class>io.github.tabforgeai.legacysqlarchitect.server.MCPServer</main.class>
<!--
Installer version — single source of truth for every native installer filename
(Windows .exe, Linux .deb/.rpm, macOS .dmg). jpackage names its output
<name>-<app.version>.<ext>, so bumping this one line renames all installers.
Must be a plain numeric version (no "-SNAPSHOT"): jpackage rejects qualifiers.
Keep it in step with the Maven <version> above (minus any -SNAPSHOT suffix).
-->
<app.version>1.1.0</app.version>
</properties>
<dependencyManagement>
<dependencies>
<!--
BOM that pins the version for all embedded-postgres-binaries-* artifacts.
Changing the version here updates all platform binaries in one place.
-->
<dependency>
<groupId>io.zonky.test.postgres</groupId>
<artifactId>embedded-postgres-binaries-bom</artifactId>
<version>16.3.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- MCP Java SDK -->
<dependency>
<groupId>io.modelcontextprotocol.sdk</groupId>
<artifactId>mcp</artifactId>
<version>1.0.0</version>
</dependency>
<!-- Jackson 2 - JSON za nas kod (konzistentno sa mcp-core) -->
<!--
jackson-databind 2.20 is required because tools.jackson.core:jackson-databind:3.0.3
(used by the MCP SDK) was compiled against jackson-annotations 2.20, which added
JsonProperty.isRequired() (OptBoolean) and JsonFormat.Shape.POJO enum constant.
Version 2.19.0 lacks JsonFormat.Shape.POJO; 2.19.2 adds it.
-->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.19.2</version>
</dependency>
<!-- JDBC Drajveri -->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.7.5</version>
</dependency>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>12.8.1.jre11</version>
</dependency>
<!-- Oracle JDBC driver - published to Maven Central since 2019 -->
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc11</artifactId>
<version>23.6.0.24.10</version>
</dependency>
<!-- Markdown generacija -->
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark</artifactId>
<version>0.64.8</version>
</dependency>
<!-- Logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.16</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.5.15</version>
</dependency>
<!-- Test -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.11.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.27.3</version>
<scope>test</scope>
</dependency>
<!--
Embedded PostgreSQL for integration tests.
Starts a real PostgreSQL process in-memory — no Docker, no external
installation required. Any developer who runs "mvn test" gets a fully
working PostgreSQL 16 instance bundled as Maven test dependencies.
Version 2.0.7 uses PostgreSQL 16 binaries compiled with MSVC 2019+,
which resolves the initdb.exe failure seen with older 1.x binaries
(PostgreSQL 12/13, MSVC 2015) on Windows 10/11.
The platform-binary artifacts are declared explicitly below so the
build works on Windows (amd64), Linux (amd64), and macOS (both Intel
and Apple Silicon) without any developer configuration.
Versions are managed by the embedded-postgres-binaries-bom imported
in the <dependencyManagement> section.
-->
<dependency>
<groupId>io.zonky.test</groupId>
<artifactId>embedded-postgres</artifactId>
<version>2.0.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.zonky.test.postgres</groupId>
<artifactId>embedded-postgres-binaries-windows-amd64</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.zonky.test.postgres</groupId>
<artifactId>embedded-postgres-binaries-linux-amd64</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.zonky.test.postgres</groupId>
<artifactId>embedded-postgres-binaries-darwin-amd64</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<!--
finalName without version suffix keeps the JAR name stable across
version bumps, which simplifies the installer profiles below
(each profile references the JAR by name, not by version).
-->
<finalName>legacy-sql-architect-mcp</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<compilerArgs>
<arg>-parameters</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.2</version>
</plugin>
<!-- Fat JAR - sve zavisnosti u jednom izvrsnom JAR-u -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>${main.class}</mainClass>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
<!-- Maven Central - sources -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Maven Central - javadoc -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.11.2</version>
<configuration>
<encoding>UTF-8</encoding>
<charset>UTF-8</charset>
<docencoding>UTF-8</docencoding>
<additionalOptions>-Xdoclint:none</additionalOptions>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.7</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!--
══════════════════════════════════════════════════════════════════
NATIVE INSTALLER PROFILES
══════════════════════════════════════════════════════════════════
Each profile produces a self-contained native installer that
bundles a stripped-down JRE (via jlink inside jpackage).
Users do NOT need Java installed on their system.
BUILD COMMANDS:
Windows EXE (run on Windows):
JAVA_HOME="c:/Java_21" D:\Maven\bin\mvn clean package -P windows-exe -DskipTests
Linux DEB (run on Ubuntu/Debian):
mvn clean package -P linux-deb
Linux RPM (run on RHEL/Rocky/Fedora — requires rpmbuild):
mvn clean package -P linux-rpm
macOS DMG (run on macOS):
mvn clean package -P macos-dmg
OUTPUT: target/jpackage/
AFTER INSTALLATION — users must edit config.json:
Windows: C:\Program Files\LegacySQLArchitectMCP\app\config.json
Linux: /opt/legacy-sql-architect-mcp/lib/app/config.json
macOS: /Applications/LegacySQLArchitectMCP.app/Contents/app/config.json
Claude Desktop / Cursor MCP config example (Windows):
{
"mcpServers": {
"legacy-sql-architect": {
"command": "C:\\Program Files\\LegacySQLArchitectMCP\\LegacySQLArchitectMCP.exe"
}
}
}
HOW IT WORKS:
1. maven-antrun-plugin (package phase, runs after maven-shade-plugin):
Creates target/installer-input/ with:
- legacy-sql-architect-mcp.jar (fat JAR, all dependencies bundled)
- config.json (template — edit with DB credentials)
2. jpackage-maven-plugin (package phase, runs after antrun):
Uses target/installer-input/ to build the platform installer.
jpackage internally calls jlink to produce a minimal JRE containing
only the modules used by the application.
NOTE ON winConsole:
winConsole=true is REQUIRED for MCP servers on Windows.
Without it, Windows creates a GUI-subsystem executable that does not
properly initialize STDIN/STDOUT, which breaks the stdio MCP protocol
that Claude Desktop uses to communicate with this server.
-->
<!-- ══════════════════════════════════════════════════════════════
Windows EXE installer (run this build on Windows)
════════════════════════════════════════════════════════════ -->
<profile>
<id>windows-exe</id>
<build>
<plugins>
<!-- Step 1: Prepare installer-input directory with JAR + config template -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>prepare-installer-input-windows</id>
<phase>package</phase>
<goals><goal>run</goal></goals>
<configuration>
<target>
<mkdir dir="${project.build.directory}/installer-input"/>
<copy file="${project.build.directory}/${project.build.finalName}.jar"
todir="${project.build.directory}/installer-input"
overwrite="true"/>
<copy file="${project.basedir}/src/main/resources/config.json"
todir="${project.build.directory}/installer-input"
overwrite="true"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
<!-- Step 2: Build Windows EXE installer with bundled JRE -->
<plugin>
<groupId>org.panteleyev</groupId>
<artifactId>jpackage-maven-plugin</artifactId>
<version>1.7.2</version>
<executions>
<execution>
<id>package-windows-exe</id>
<phase>package</phase>
<goals><goal>jpackage</goal></goals>
<configuration>
<name>LegacySQLArchitectMCP</name>
<vendor>TabForge AI</vendor>
<appVersion>${app.version}</appVersion>
<description>MCP server for AI-assisted legacy database analysis</description>
<input>${project.build.directory}/installer-input</input>
<mainJar>${project.build.finalName}.jar</mainJar>
<mainClass>${main.class}</mainClass>
<destination>${project.build.directory}/jpackage</destination>
<type>EXE</type>
<!--
winConsole=true: REQUIRED for stdio MCP protocol.
Creates a console-subsystem executable so that
STDIN/STDOUT are properly initialized on Windows.
-->
<winConsole>true</winConsole>
<!--
No shortcut / menu entry: this is a background service
launched by Claude Desktop, not a user-facing desktop app.
-->
<winShortcut>false</winShortcut>
<winMenu>false</winMenu>
<!--
Per-machine install (Program Files) so the exe path
is stable and predictable in Claude Desktop's config.
-->
<winPerUserInstall>false</winPerUserInstall>
<winDirChooser>true</winDirChooser>
<!--
Unique upgrade UUID — identifies this product to Windows
Installer so upgrades replace the existing installation
rather than installing a second copy.
-->
<winUpgradeUuid>a1f3c27e-84b0-4d5e-9c1a-2e7f6b3d8a90</winUpgradeUuid>
<!-- JVM tuning: lightweight MCP server, no large heap needed -->
<javaOptions>
<option>-Xms32m</option>
<option>-Xmx256m</option>
<option>-Dfile.encoding=UTF-8</option>
<option>-Djava.net.preferIPv4Stack=true</option>
</javaOptions>
<verbose>true</verbose>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- ══════════════════════════════════════════════════════════════
Linux DEB installer — Ubuntu / Debian
(run this build on Ubuntu with dpkg-deb available)
════════════════════════════════════════════════════════════ -->
<profile>
<id>linux-deb</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>prepare-installer-input-linux-deb</id>
<phase>package</phase>
<goals><goal>run</goal></goals>
<configuration>
<target>
<mkdir dir="${project.build.directory}/installer-input"/>
<copy file="${project.build.directory}/${project.build.finalName}.jar"
todir="${project.build.directory}/installer-input"
overwrite="true"/>
<copy file="${project.basedir}/src/main/resources/config.json"
todir="${project.build.directory}/installer-input"
overwrite="true"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.panteleyev</groupId>
<artifactId>jpackage-maven-plugin</artifactId>
<version>1.7.2</version>
<executions>
<execution>
<id>package-linux-deb</id>
<phase>package</phase>
<goals><goal>jpackage</goal></goals>
<configuration>
<name>legacy-sql-architect-mcp</name>
<vendor>TabForge AI</vendor>
<appVersion>${app.version}</appVersion>
<description>MCP server for AI-assisted legacy database analysis</description>
<input>${project.build.directory}/installer-input</input>
<mainJar>${project.build.finalName}.jar</mainJar>
<mainClass>${main.class}</mainClass>
<destination>${project.build.directory}/jpackage</destination>
<type>DEB</type>
<linuxPackageName>legacy-sql-architect-mcp</linuxPackageName>
<linuxAppCategory>misc</linuxAppCategory>
<!--
Explicitly list only the Java modules this server app needs.
This prevents jpackage from including java.desktop (AWT/Swing),
which would otherwise pull in X11, ALSA, and other GUI libraries
as RPM/DEB dependencies — completely unnecessary for a stdio server.
Modules included:
java.base – always required
java.sql – JDBC API
java.naming – JNDI (required by JDBC drivers)
java.logging – java.util.logging (SLF4J bridge)
java.xml – XML parsing (logback, Jackson)
java.management – JMX (used by some JDBC drivers)
java.security.jgss – Kerberos auth (Oracle JDBC)
java.security.sasl – SASL auth (SQL Server JDBC)
jdk.crypto.ec – TLS elliptic curve (SSL DB connections)
jdk.crypto.cryptoki – PKCS11 provider
jdk.unsupported – sun.misc.Unsafe (Reactor/Netty internals)
-->
<addModules>
<addModule>java.base</addModule>
<addModule>java.sql</addModule>
<addModule>java.naming</addModule>
<addModule>java.logging</addModule>
<addModule>java.xml</addModule>
<addModule>java.management</addModule>
<addModule>java.security.jgss</addModule>
<addModule>java.security.sasl</addModule>
<addModule>jdk.crypto.ec</addModule>
<addModule>jdk.crypto.cryptoki</addModule>
<addModule>jdk.unsupported</addModule>
</addModules>
<!-- jlink: strip-debug, no-header-files, no-man-pages, compress=2 reduce bundled JRE size -->
<jlinkOptions>
<jlinkOption>--strip-debug</jlinkOption>
<jlinkOption>--no-header-files</jlinkOption>
<jlinkOption>--no-man-pages</jlinkOption>
<jlinkOption>--compress=2</jlinkOption>
</jlinkOptions>
<javaOptions>
<option>-Xms32m</option>
<option>-Xmx256m</option>
<option>-Dfile.encoding=UTF-8</option>
<option>-Djava.net.preferIPv4Stack=true</option>
</javaOptions>
<verbose>true</verbose>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- ══════════════════════════════════════════════════════════════
Linux RPM installer — RHEL / Rocky Linux / Fedora
(run this build on a RHEL-family system with rpmbuild available:
sudo dnf install rpm-build)
════════════════════════════════════════════════════════════ -->
<profile>
<id>linux-rpm</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>prepare-installer-input-linux-rpm</id>
<phase>package</phase>
<goals><goal>run</goal></goals>
<configuration>
<target>
<mkdir dir="${project.build.directory}/installer-input"/>
<copy file="${project.build.directory}/${project.build.finalName}.jar"
todir="${project.build.directory}/installer-input"
overwrite="true"/>
<copy file="${project.basedir}/src/main/resources/config.json"
todir="${project.build.directory}/installer-input"
overwrite="true"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.panteleyev</groupId>
<artifactId>jpackage-maven-plugin</artifactId>
<version>1.7.2</version>
<executions>
<execution>
<id>package-linux-rpm</id>
<phase>package</phase>
<goals><goal>jpackage</goal></goals>
<configuration>
<name>legacy-sql-architect-mcp</name>
<vendor>TabForge AI</vendor>
<appVersion>${app.version}</appVersion>
<description>MCP server for AI-assisted legacy database analysis</description>
<input>${project.build.directory}/installer-input</input>
<mainJar>${project.build.finalName}.jar</mainJar>
<mainClass>${main.class}</mainClass>
<destination>${project.build.directory}/jpackage</destination>
<type>RPM</type>
<linuxPackageName>legacy-sql-architect-mcp</linuxPackageName>
<linuxAppCategory>misc</linuxAppCategory>
<!-- Same module restriction as linux-deb — excludes java.desktop and X11/ALSA deps -->
<addModules>
<addModule>java.base</addModule>
<addModule>java.sql</addModule>
<addModule>java.naming</addModule>
<addModule>java.logging</addModule>
<addModule>java.xml</addModule>
<addModule>java.management</addModule>
<addModule>java.security.jgss</addModule>
<addModule>java.security.sasl</addModule>
<addModule>jdk.crypto.ec</addModule>
<addModule>jdk.crypto.cryptoki</addModule>
<addModule>jdk.unsupported</addModule>
</addModules>
<jlinkOptions>
<jlinkOption>--strip-debug</jlinkOption>
<jlinkOption>--no-header-files</jlinkOption>
<jlinkOption>--no-man-pages</jlinkOption>
<jlinkOption>--compress=2</jlinkOption>
</jlinkOptions>
<javaOptions>
<option>-Xms32m</option>
<option>-Xmx256m</option>
<option>-Dfile.encoding=UTF-8</option>
<option>-Djava.net.preferIPv4Stack=true</option>
</javaOptions>
<verbose>true</verbose>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- ══════════════════════════════════════════════════════════════
macOS DMG installer
(run this build on macOS — jpackage requires the macOS SDK)
════════════════════════════════════════════════════════════ -->
<profile>
<id>macos-dmg</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>prepare-installer-input-macos</id>
<phase>package</phase>
<goals><goal>run</goal></goals>
<configuration>
<target>
<mkdir dir="${project.build.directory}/installer-input"/>
<copy file="${project.build.directory}/${project.build.finalName}.jar"
todir="${project.build.directory}/installer-input"
overwrite="true"/>
<copy file="${project.basedir}/src/main/resources/config.json"
todir="${project.build.directory}/installer-input"
overwrite="true"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.panteleyev</groupId>
<artifactId>jpackage-maven-plugin</artifactId>
<version>1.7.2</version>
<executions>
<execution>
<id>package-macos-dmg</id>
<phase>package</phase>
<goals><goal>jpackage</goal></goals>
<configuration>
<name>LegacySQLArchitectMCP</name>
<vendor>TabForge AI</vendor>
<appVersion>${app.version}</appVersion>
<description>MCP server for AI-assisted legacy database analysis</description>
<input>${project.build.directory}/installer-input</input>
<mainJar>${project.build.finalName}.jar</mainJar>
<mainClass>${main.class}</mainClass>
<destination>${project.build.directory}/jpackage</destination>
<type>DMG</type>
<jlinkOptions>
<jlinkOption>--strip-debug</jlinkOption>
<jlinkOption>--no-header-files</jlinkOption>
<jlinkOption>--no-man-pages</jlinkOption>
<jlinkOption>--compress=2</jlinkOption>
</jlinkOptions>
<javaOptions>
<option>-Xms32m</option>
<option>-Xmx256m</option>
<option>-Dfile.encoding=UTF-8</option>
<option>-Djava.net.preferIPv4Stack=true</option>
</javaOptions>
<verbose>true</verbose>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>