fop: add patch to "fix" maven versions

Without this patch, the fop build will fail whenever we update the
`maven` Nixpkgs package (and require an updated `mvnHash` setting.

This patch explicitly specifies the versions of all Maven plugins,
so they can be captured in a fixed-output-derivation.
This commit is contained in:
Sean Gilligan
2026-05-21 21:59:53 -07:00
parent 3b516440c5
commit d26b184247
2 changed files with 74 additions and 0 deletions
@@ -0,0 +1,72 @@
diff --git a/pom.xml b/pom.xml
index 8f135d34c..f4e972e2d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -92,6 +92,41 @@
<artifactId>maven-jar-plugin</artifactId>
<version>${jar.plugin.version}</version>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>3.20.0</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-clean-plugin</artifactId>
+ <version>3.2.0</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>3.1.3</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <version>3.1.2</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>3.3.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>3.7.0</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>3.7.1</version>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
@@ -107,6 +142,25 @@
<artifactId>spotbugs-maven-plugin</artifactId>
<version>${findbugs.plugin.version}</version>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <version>3.5.0</version>
+ <configuration>
+ <rules>
+ <requirePluginVersions />
+ </rules>
+ </configuration>
+ <executions>
+ <execution>
+ <id>require-all-plugin-versions-to-be-set</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</pluginManagement>
</build>
+2
View File
@@ -16,6 +16,8 @@ maven.buildMavenPackage rec {
hash = "sha256-uY6cUjmyuenfK3jAWvugsYa5qg8rbnvRZZ6qA/g2fZM=";
};
patches = [ ./fix-maven-plugin-versions.patch ];
mvnHash = "sha256-EaOIAy0+YPrF+yGsFKKqcA4bt90bq1Z86V57P9rMatE=";
buildOffline = true;