fix: Make sure jar is always named GhydraMCP.jar
This commit is contained in:
parent
3a1772a3c9
commit
d4122402b4
20
pom.xml
20
pom.xml
@ -26,6 +26,7 @@
|
|||||||
<groupId>com.google.code.gson</groupId>
|
<groupId>com.google.code.gson</groupId>
|
||||||
<artifactId>gson</artifactId>
|
<artifactId>gson</artifactId>
|
||||||
<version>2.10.1</version>
|
<version>2.10.1</version>
|
||||||
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Ghidra JARs as system-scoped dependencies -->
|
<!-- Ghidra JARs as system-scoped dependencies -->
|
||||||
@ -196,16 +197,16 @@
|
|||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<!-- The Assembly Plugin for creating the Ghidra extension ZIP -->
|
<!-- The Assembly Plugin -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
<version>3.3.0</version>
|
<version>3.3.0</version>
|
||||||
<executions>
|
<executions>
|
||||||
<!-- Default execution for the plugin only -->
|
<!-- Execution for the Ghidra extension zip (runs first in package phase) -->
|
||||||
<execution>
|
<execution>
|
||||||
<id>plugin-assembly</id>
|
<id>plugin-assembly</id>
|
||||||
<phase>prepare-package</phase> <!-- Run earlier to ensure zip exists for copy -->
|
<phase>package</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>single</goal>
|
<goal>single</goal>
|
||||||
</goals>
|
</goals>
|
||||||
@ -215,16 +216,14 @@
|
|||||||
</descriptors>
|
</descriptors>
|
||||||
<finalName>GhydraMCP-${git.commit.id.abbrev}-${maven.build.timestamp}</finalName>
|
<finalName>GhydraMCP-${git.commit.id.abbrev}-${maven.build.timestamp}</finalName>
|
||||||
<appendAssemblyId>false</appendAssemblyId>
|
<appendAssemblyId>false</appendAssemblyId>
|
||||||
<!-- Don't attach artifact, we will copy it manually -->
|
<!-- Don't attach artifact -->
|
||||||
<!-- <attach>true</attach> -->
|
|
||||||
<!-- <classifier>ghidra-extension</classifier> -->
|
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
|
|
||||||
<!-- Execution for the complete package -->
|
<!-- Execution for the complete package (runs second in package phase) -->
|
||||||
<execution>
|
<execution>
|
||||||
<id>complete-package</id>
|
<id>complete-package</id>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>single</goal>
|
<goal>single</goal>
|
||||||
</goals>
|
</goals>
|
||||||
@ -239,7 +238,7 @@
|
|||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<!-- Copy the generated plugin zip to a staging area -->
|
<!-- Copy the generated plugin zip to a staging area in the verify phase -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-resources-plugin</artifactId>
|
<artifactId>maven-resources-plugin</artifactId>
|
||||||
@ -247,7 +246,7 @@
|
|||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>copy-plugin-zip</id>
|
<id>copy-plugin-zip</id>
|
||||||
<phase>package</phase> <!-- Run after plugin-assembly -->
|
<phase>verify</phase> <!-- Run after package phase -->
|
||||||
<goals>
|
<goals>
|
||||||
<goal>copy-resources</goal>
|
<goal>copy-resources</goal>
|
||||||
</goals>
|
</goals>
|
||||||
@ -257,6 +256,7 @@
|
|||||||
<resource>
|
<resource>
|
||||||
<directory>${project.build.directory}</directory>
|
<directory>${project.build.directory}</directory>
|
||||||
<includes>
|
<includes>
|
||||||
|
<!-- Use properties here as they should be resolved by verify phase -->
|
||||||
<include>GhydraMCP-${git.commit.id.abbrev}-${maven.build.timestamp}.zip</include>
|
<include>GhydraMCP-${git.commit.id.abbrev}-${maven.build.timestamp}.zip</include>
|
||||||
</includes>
|
</includes>
|
||||||
</resource>
|
</resource>
|
||||||
|
|||||||
@ -24,9 +24,10 @@
|
|||||||
|
|
||||||
<!-- Include the Ghidra plugin zip copied by maven-resources-plugin -->
|
<!-- Include the Ghidra plugin zip copied by maven-resources-plugin -->
|
||||||
<fileSet>
|
<fileSet>
|
||||||
<directory>${project.build.directory}/staging</directory>
|
<directory>${project.build.directory}/staging</directory> <!-- Point to staging directory -->
|
||||||
<includes>
|
<includes>
|
||||||
<include>GhydraMCP-*.zip</include>
|
<!-- Use exact pattern matching the staged file -->
|
||||||
|
<include>GhydraMCP-${git.commit.id.abbrev}-${maven.build.timestamp}.zip</include>
|
||||||
</includes>
|
</includes>
|
||||||
<outputDirectory></outputDirectory>
|
<outputDirectory></outputDirectory>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
|
|||||||
@ -4,20 +4,14 @@
|
|||||||
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3
|
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3
|
||||||
http://maven.apache.org/xsd/assembly-1.1.3.xsd">
|
http://maven.apache.org/xsd/assembly-1.1.3.xsd">
|
||||||
|
|
||||||
<!-- Just a name for reference -->
|
|
||||||
<id>ghidra-extension</id>
|
<id>ghidra-extension</id>
|
||||||
|
|
||||||
<!-- We want a .zip file -->
|
|
||||||
<formats>
|
<formats>
|
||||||
<format>zip</format>
|
<format>zip</format>
|
||||||
</formats>
|
</formats>
|
||||||
|
|
||||||
<!-- Don't put everything in an extra top-level directory named after the assembly ID -->
|
|
||||||
<includeBaseDirectory>false</includeBaseDirectory>
|
<includeBaseDirectory>false</includeBaseDirectory>
|
||||||
|
|
||||||
<fileSets>
|
<fileSets>
|
||||||
<!-- 1) Copy extension.properties and Module.manifest into the top level
|
<!-- Copy extension files to GhydraMCP/ directory -->
|
||||||
of a folder named GhydraMCP/ (the actual extension folder). -->
|
|
||||||
<fileSet>
|
<fileSet>
|
||||||
<directory>src/main/resources</directory>
|
<directory>src/main/resources</directory>
|
||||||
<includes>
|
<includes>
|
||||||
@ -26,15 +20,15 @@
|
|||||||
</includes>
|
</includes>
|
||||||
<outputDirectory>GhydraMCP</outputDirectory>
|
<outputDirectory>GhydraMCP</outputDirectory>
|
||||||
</fileSet>
|
</fileSet>
|
||||||
|
|
||||||
<!-- 2) Copy your built plugin JAR into GhydraMCP/lib -->
|
|
||||||
<fileSet>
|
|
||||||
<directory>${project.build.directory}</directory>
|
|
||||||
<includes>
|
|
||||||
<!-- Use the finalized JAR name from the maven-jar-plugin -->
|
|
||||||
<include>GhydraMCP.jar</include>
|
|
||||||
</includes>
|
|
||||||
<outputDirectory>GhydraMCP/lib</outputDirectory>
|
|
||||||
</fileSet>
|
|
||||||
</fileSets>
|
</fileSets>
|
||||||
|
|
||||||
|
<dependencySets>
|
||||||
|
<!-- Include the main project JAR as GhydraMCP.jar -->
|
||||||
|
<dependencySet>
|
||||||
|
<useProjectArtifact>true</useProjectArtifact>
|
||||||
|
<outputDirectory>GhydraMCP/lib</outputDirectory>
|
||||||
|
<outputFileNameMapping>GhydraMCP.jar</outputFileNameMapping>
|
||||||
|
<unpack>false</unpack>
|
||||||
|
</dependencySet>
|
||||||
|
</dependencySets>
|
||||||
</assembly>
|
</assembly>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user