Some checks failed
Build Ghidra Plugin / build (push) Has been cancelled
Moved plugin assembly execution to prepare-package phase to ensure the extension zip artifact is created before the package phase. Added maven-resources-plugin execution (copy-plugin-zip) to the package phase to copy the generated extension zip into a reliable 'target/staging' directory. Updated complete-package.xml assembly descriptor to use a fileSet referencing 'target/staging' instead of relying on dependencySets or potentially unstable property expansion for artifact inclusion. This resolves the issue where the complete package artifact was missing the Ghidra extension zip.
359 lines
13 KiB
XML
359 lines
13 KiB
XML
<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>eu.starsong.ghidra</groupId>
|
|
<artifactId>GhydraMCP</artifactId>
|
|
<packaging>jar</packaging>
|
|
<version>${revision}</version>
|
|
<name>GhydraMCP</name>
|
|
<url>https://github.com/teal-bauer/GhydraMCP</url>
|
|
|
|
<properties>
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
|
<ghidra.jar.location>${project.basedir}/lib</ghidra.jar.location>
|
|
<maven.deploy.skip>true</maven.deploy.skip>
|
|
<maven.install.skip>true</maven.install.skip>
|
|
<maven.build.timestamp.format>yyyyMMdd-HHmmss</maven.build.timestamp.format>
|
|
<revision>dev-SNAPSHOT</revision>
|
|
</properties>
|
|
|
|
<dependencies>
|
|
<!-- JSON handling -->
|
|
<dependency>
|
|
<groupId>com.google.code.gson</groupId>
|
|
<artifactId>gson</artifactId>
|
|
<version>2.10.1</version>
|
|
</dependency>
|
|
|
|
<!-- Ghidra JARs as system-scoped dependencies -->
|
|
<dependency>
|
|
<groupId>ghidra</groupId>
|
|
<artifactId>Generic</artifactId>
|
|
<version>11.3.1</version>
|
|
<scope>system</scope>
|
|
<systemPath>${ghidra.jar.location}/Generic.jar</systemPath>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>ghidra</groupId>
|
|
<artifactId>SoftwareModeling</artifactId>
|
|
<version>11.3.1</version>
|
|
<scope>system</scope>
|
|
<systemPath>${ghidra.jar.location}/SoftwareModeling.jar</systemPath>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>ghidra</groupId>
|
|
<artifactId>Project</artifactId>
|
|
<version>11.3.1</version>
|
|
<scope>system</scope>
|
|
<systemPath>${ghidra.jar.location}/Project.jar</systemPath>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>ghidra</groupId>
|
|
<artifactId>Docking</artifactId>
|
|
<version>11.3.1</version>
|
|
<scope>system</scope>
|
|
<systemPath>${ghidra.jar.location}/Docking.jar</systemPath>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>ghidra</groupId>
|
|
<artifactId>Decompiler</artifactId>
|
|
<version>11.3.1</version>
|
|
<scope>system</scope>
|
|
<systemPath>${ghidra.jar.location}/Decompiler.jar</systemPath>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>ghidra</groupId>
|
|
<artifactId>Utility</artifactId>
|
|
<version>11.3.1</version>
|
|
<scope>system</scope>
|
|
<systemPath>${ghidra.jar.location}/Utility.jar</systemPath>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>ghidra</groupId>
|
|
<artifactId>Base</artifactId>
|
|
<version>11.3.1</version>
|
|
<scope>system</scope>
|
|
<systemPath>${ghidra.jar.location}/Base.jar</systemPath>
|
|
</dependency>
|
|
|
|
<!-- Test dependencies -->
|
|
<dependency>
|
|
<groupId>junit</groupId>
|
|
<artifactId>junit</artifactId>
|
|
<version>4.13.2</version>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<resources>
|
|
<resource>
|
|
<directory>src/main/resources</directory>
|
|
<filtering>true</filtering>
|
|
</resource>
|
|
</resources>
|
|
<plugins>
|
|
<!-- Set Java version -->
|
|
<!-- Resources plugin to handle filtering -->
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-resources-plugin</artifactId>
|
|
<version>3.3.1</version>
|
|
<configuration>
|
|
<encoding>UTF-8</encoding>
|
|
</configuration>
|
|
</plugin>
|
|
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<version>3.8.1</version>
|
|
<configuration>
|
|
<source>21</source>
|
|
<target>21</target>
|
|
<!-- Ignore warning about system paths -->
|
|
<compilerArgument>-Xlint:-path</compilerArgument>
|
|
</configuration>
|
|
</plugin>
|
|
|
|
<!-- Git Commit ID plugin to generate version from git -->
|
|
<plugin>
|
|
<groupId>io.github.git-commit-id</groupId>
|
|
<artifactId>git-commit-id-maven-plugin</artifactId>
|
|
<version>5.0.0</version>
|
|
<executions>
|
|
<execution>
|
|
<id>get-git-info</id>
|
|
<phase>initialize</phase>
|
|
<goals>
|
|
<goal>revision</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
<configuration>
|
|
<generateGitPropertiesFile>true</generateGitPropertiesFile>
|
|
<generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>
|
|
<includeOnlyProperties>
|
|
<includeOnlyProperty>git.commit.id.abbrev</includeOnlyProperty>
|
|
<includeOnlyProperty>git.commit.time</includeOnlyProperty>
|
|
<includeOnlyProperty>git.closest.tag.name</includeOnlyProperty>
|
|
<includeOnlyProperty>git.build.version</includeOnlyProperty>
|
|
</includeOnlyProperties>
|
|
<commitIdGenerationMode>full</commitIdGenerationMode>
|
|
</configuration>
|
|
</plugin>
|
|
|
|
<!-- Set revision property from git info -->
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>build-helper-maven-plugin</artifactId>
|
|
<version>3.4.0</version>
|
|
<executions>
|
|
<execution>
|
|
<id>set-revision-from-git</id>
|
|
<phase>initialize</phase>
|
|
<goals>
|
|
<goal>regex-property</goal>
|
|
</goals>
|
|
<configuration>
|
|
<name>revision</name>
|
|
<value>${git.commit.id.abbrev}-${maven.build.timestamp}</value>
|
|
<regex>.*</regex>
|
|
<replacement>$0</replacement>
|
|
<failIfNoMatch>false</failIfNoMatch>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<!-- Use custom MANIFEST.MF -->
|
|
<plugin>
|
|
<artifactId>maven-jar-plugin</artifactId>
|
|
<version>3.2.2</version>
|
|
<configuration>
|
|
<archive>
|
|
<manifest>
|
|
<addDefaultImplementationEntries>false</addDefaultImplementationEntries>
|
|
</manifest>
|
|
<manifestEntries>
|
|
<Implementation-Title>GhydraMCP</Implementation-Title>
|
|
<Implementation-Version>${git.commit.id.abbrev}-${maven.build.timestamp}</Implementation-Version>
|
|
<Plugin-Class>eu.starsong.ghidra.GhydraMCP</Plugin-Class>
|
|
<Plugin-Name>GhydraMCP</Plugin-Name>
|
|
<Plugin-Version>${git.commit.id.abbrev}-${maven.build.timestamp}</Plugin-Version>
|
|
<Plugin-Author>LaurieWired, Teal Bauer</Plugin-Author>
|
|
<Plugin-Description>Expose multiple Ghidra tools to MCP servers with variable management</Plugin-Description>
|
|
</manifestEntries>
|
|
</archive>
|
|
<finalName>GhydraMCP</finalName>
|
|
<excludes>
|
|
<exclude>**/App.class</exclude>
|
|
</excludes>
|
|
<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.3.0</version>
|
|
<executions>
|
|
<!-- Default execution for the plugin only -->
|
|
<execution>
|
|
<id>plugin-assembly</id>
|
|
<phase>prepare-package</phase> <!-- Run earlier to ensure zip exists for copy -->
|
|
<goals>
|
|
<goal>single</goal>
|
|
</goals>
|
|
<configuration>
|
|
<descriptors>
|
|
<descriptor>src/assembly/ghidra-extension.xml</descriptor>
|
|
</descriptors>
|
|
<finalName>GhydraMCP-${git.commit.id.abbrev}-${maven.build.timestamp}</finalName>
|
|
<appendAssemblyId>false</appendAssemblyId>
|
|
<!-- Don't attach artifact, we will copy it manually -->
|
|
<!-- <attach>true</attach> -->
|
|
<!-- <classifier>ghidra-extension</classifier> -->
|
|
</configuration>
|
|
</execution>
|
|
|
|
<!-- Execution for the complete package -->
|
|
<execution>
|
|
<id>complete-package</id>
|
|
<phase>package</phase>
|
|
<goals>
|
|
<goal>single</goal>
|
|
</goals>
|
|
<configuration>
|
|
<descriptors>
|
|
<descriptor>src/assembly/complete-package.xml</descriptor>
|
|
</descriptors>
|
|
<finalName>GhydraMCP-Complete-${git.commit.id.abbrev}-${maven.build.timestamp}</finalName>
|
|
<appendAssemblyId>false</appendAssemblyId>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<!-- Copy the generated plugin zip to a staging area -->
|
|
<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>package</phase> <!-- Run after plugin-assembly -->
|
|
<goals>
|
|
<goal>copy-resources</goal>
|
|
</goals>
|
|
<configuration>
|
|
<outputDirectory>${project.build.directory}/staging</outputDirectory>
|
|
<resources>
|
|
<resource>
|
|
<directory>${project.build.directory}</directory>
|
|
<includes>
|
|
<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>
|
|
<artifactId>maven-dependency-plugin</artifactId>
|
|
<version>3.6.1</version>
|
|
<executions>
|
|
<!-- Copy dependencies to target/lib for the assembly -->
|
|
<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>
|
|
|
|
<!-- Validate system dependency paths -->
|
|
<execution>
|
|
<id>validate-system-dependencies</id>
|
|
<phase>validate</phase>
|
|
<goals>
|
|
<goal>analyze-only</goal>
|
|
</goals>
|
|
<configuration>
|
|
<failOnWarning>false</failOnWarning>
|
|
<ignoredUnusedDeclaredDependencies>
|
|
<ignoredUnusedDeclaredDependency>ghidra:Generic</ignoredUnusedDeclaredDependency>
|
|
<ignoredUnusedDeclaredDependency>ghidra:SoftwareModeling</ignoredUnusedDeclaredDependency>
|
|
<ignoredUnusedDeclaredDependency>ghidra:Project</ignoredUnusedDeclaredDependency>
|
|
<ignoredUnusedDeclaredDependency>ghidra:Docking</ignoredUnusedDeclaredDependency>
|
|
<ignoredUnusedDeclaredDependency>ghidra:Decompiler</ignoredUnusedDeclaredDependency>
|
|
<ignoredUnusedDeclaredDependency>ghidra:Utility</ignoredUnusedDeclaredDependency>
|
|
<ignoredUnusedDeclaredDependency>ghidra:Base</ignoredUnusedDeclaredDependency>
|
|
<ignoredUnusedDeclaredDependency>junit:junit</ignoredUnusedDeclaredDependency>
|
|
</ignoredUnusedDeclaredDependencies>
|
|
<ignoredSystemDependencies>
|
|
<ignoredSystemDependency>ghidra:*</ignoredSystemDependency>
|
|
</ignoredSystemDependencies>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
|
|
<profiles>
|
|
<!-- Profile for building just the Ghidra plugin -->
|
|
<profile>
|
|
<id>plugin-only</id>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-assembly-plugin</artifactId>
|
|
<version>3.3.0</version>
|
|
<executions>
|
|
<execution>
|
|
<id>complete-package</id>
|
|
<phase>none</phase>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
|
|
<!-- Profile for building just the complete package -->
|
|
<profile>
|
|
<id>complete-only</id>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-assembly-plugin</artifactId>
|
|
<version>3.3.0</version>
|
|
<executions>
|
|
<execution>
|
|
<id>plugin-assembly</id>
|
|
<phase>none</phase>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
</profiles>
|
|
</project>
|