fix: Force inner ZIP to be included

This commit is contained in:
Teal Bauer 2025-04-08 10:34:06 +02:00
parent 8f3fa16ad8
commit c530976a6a
2 changed files with 15 additions and 43 deletions

36
pom.xml
View File

@ -18,6 +18,7 @@
<maven.install.skip>true</maven.install.skip>
<maven.build.timestamp.format>yyyyMMdd-HHmmss</maven.build.timestamp.format>
<revision>dev</revision>
<inner.zip.filename>GhydraMCP-${git.commit.id.describe}-${maven.build.timestamp}.zip</inner.zip.filename>
</properties>
<dependencies>
@ -177,7 +178,7 @@
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<executions>
<!-- Execution for the Ghidra extension zip (runs first in package phase) -->
<!-- Execution for the Ghidra extension zip -->
<execution>
<id>plugin-assembly</id>
<phase>package</phase>
@ -190,14 +191,13 @@
</descriptors>
<finalName>GhydraMCP-${git.commit.id.describe}-${maven.build.timestamp}</finalName>
<appendAssemblyId>false</appendAssemblyId>
<!-- Don't attach artifact -->
</configuration>
</execution>
<!-- Execution for the complete package (runs second in package phase) -->
<!-- Execution for the complete package -->
<execution>
<id>complete-package</id>
<phase>package</phase>
<phase>verify</phase>
<goals>
<goal>single</goal>
</goals>
@ -212,34 +212,6 @@
</executions>
</plugin>
<!-- Copy the generated plugin zip to a staging area in the verify phase -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>copy-plugin-zip</id>
<phase>verify</phase> <!-- Run after package phase -->
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/staging</outputDirectory>
<resources>
<resource>
<directory>${project.build.directory}</directory>
<includes>
<!-- Use properties here as they should be resolved by verify phase -->
<include>GhydraMCP-${git.commit.id.abbrev}-${maven.build.timestamp}.zip</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<!-- Copy dependencies and validate system paths -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>

View File

@ -19,17 +19,17 @@
<include>README.md</include>
<include>LICENSE</include>
</includes>
<outputDirectory></outputDirectory>
</fileSet>
<!-- Include the Ghidra plugin zip copied by maven-resources-plugin -->
<fileSet>
<directory>${project.build.directory}/staging</directory> <!-- Point to staging directory -->
<includes>
<!-- Use exact pattern matching the staged file -->
<include>GhydraMCP-${git.commit.id.abbrev}-${maven.build.timestamp}.zip</include>
</includes>
<outputDirectory></outputDirectory>
<outputDirectory>/</outputDirectory>
</fileSet>
</fileSets>
<files>
<!-- Include the inner ZIP directly from target -->
<file>
<source>${project.build.directory}/${inner.zip.filename}</source>
<outputDirectory>/</outputDirectory>
<fileMode>0644</fileMode>
<destName>GhydraMCP-plugin.zip</destName>
</file>
</files>
</assembly>