This is an automated email from the ASF dual-hosted git repository.

snazy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris-tools.git


The following commit(s) were added to refs/heads/main by this push:
     new 57a29a1  Apprunner: migrate to a better maintained maven-plugin-plugin 
(#64)
57a29a1 is described below

commit 57a29a108b7c7cf0dff807d2a6a4d2909fdec848
Author: Robert Stupp <[email protected]>
AuthorDate: Fri Nov 21 11:09:22 2025 +0100

    Apprunner: migrate to a better maintained maven-plugin-plugin (#64)
    
    It simplifies the build script and is also a pre-requisite for publishing 
the artifacts.
---
 .../kotlin/publishing/PublishingHelperPlugin.kt    |  2 +-
 apprunner/gradle/libs.versions.toml                |  2 +-
 apprunner/maven-plugin/build.gradle.kts            | 23 ++++++++++------------
 3 files changed, 12 insertions(+), 15 deletions(-)

diff --git 
a/apprunner/apprunner-build-logic/src/main/kotlin/publishing/PublishingHelperPlugin.kt
 
b/apprunner/apprunner-build-logic/src/main/kotlin/publishing/PublishingHelperPlugin.kt
index 31f9112..e6e7b21 100644
--- 
a/apprunner/apprunner-build-logic/src/main/kotlin/publishing/PublishingHelperPlugin.kt
+++ 
b/apprunner/apprunner-build-logic/src/main/kotlin/publishing/PublishingHelperPlugin.kt
@@ -96,7 +96,6 @@ constructor(private val softwareComponentFactory: 
SoftwareComponentFactory) : Pl
       }
 
       apply(plugin = "maven-publish")
-      apply(plugin = "signing")
 
       // Generate a source tarball for a release to be uploaded to
       // 
https://dist.apache.org/repos/dist/dev/<name>/apache-<name>-<version-with-rc>/
@@ -105,6 +104,7 @@ constructor(private val softwareComponentFactory: 
SoftwareComponentFactory) : Pl
       }
 
       if (isSigningEnabled()) {
+        apply(plugin = "signing")
         plugins.withType<SigningPlugin>().configureEach {
           configure<SigningExtension> {
             val signingKey: String? by project
diff --git a/apprunner/gradle/libs.versions.toml 
b/apprunner/gradle/libs.versions.toml
index fc0fe7d..ac34694 100644
--- a/apprunner/gradle/libs.versions.toml
+++ b/apprunner/gradle/libs.versions.toml
@@ -32,5 +32,5 @@ soebes-itf-assertj = { module = 
"com.soebes.itf.jupiter.extension:itf-assertj",
 soebes-itf-jupiter-extension = { module = 
"com.soebes.itf.jupiter.extension:itf-jupiter-extension", version.ref = 
"soebes-itf" }
 
 [plugins]
-maven-plugin = { id = "org.gradlex.maven-plugin-development", version = 
"1.0.3" }
+maven-plugin = { id = "io.freefair.maven-plugin", version = "9.1.0" }
 rat = { id = "org.nosphere.apache.rat", version = "0.8.1" }
diff --git a/apprunner/maven-plugin/build.gradle.kts 
b/apprunner/maven-plugin/build.gradle.kts
index 4763984..6bbb7e4 100644
--- a/apprunner/maven-plugin/build.gradle.kts
+++ b/apprunner/maven-plugin/build.gradle.kts
@@ -20,22 +20,26 @@
 import org.apache.tools.ant.filters.ReplaceTokens
 
 plugins {
+  // Order of maven-plugin + polaris-apprunner-java matters!
+  id("io.freefair.maven-plugin") version "9.1.0"
   id("polaris-apprunner-java")
-  alias(libs.plugins.maven.plugin)
 }
 
-val deps by configurations.creating
 val maven by configurations.creating
 
-configurations.implementation.get().extendsFrom(deps)
-
 dependencies {
-  deps(project(":polaris-apprunner-common"))
-  implementation(libs.maven.core)
+  implementation(project(":polaris-apprunner-common"))
+
+  compileOnly(libs.maven.core)
   compileOnly(libs.maven.plugin.annotations)
   compileOnly(libs.jakarta.annotation.api)
+
+  testImplementation(libs.maven.core)
   testImplementation(libs.soebes.itf.jupiter.extension)
   testImplementation(libs.soebes.itf.assertj)
+  testCompileOnly(libs.maven.plugin.annotations)
+
+  // Maven distribution for integration tests.
   maven(
     mapOf(
       "group" to "org.apache.maven",
@@ -47,13 +51,6 @@ dependencies {
   )
 }
 
-mavenPlugin {
-  helpMojoPackage.set("org.apache.polaris.apprunner.maven")
-  artifactId = project.name
-  groupId = project.group.toString()
-  dependencies = deps
-}
-
 // The following stuff is needed by the Maven integration tests.
 //
 // The Maven plugin integration tests use `com.soebes.itf.jupiter.extension`, 
which is admittedly a

Reply via email to