Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(#2395): adopt maven plugin development from gradle x #2423

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions gradle/java-publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -107,17 +107,22 @@ model {
artifactId project.ext.artifactId
version project.version

def projectExtArtifactId = project.ext.artifactId
def projectDescription = project.description
def projectOrg = project.org
def rootProjectName = rootProject.name

pom.withXml {
// add MavenCentral requirements to the POM
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
name project.ext.artifactId
description project.description
url "https://github.com/${project.org}/${rootProject.name}"
name projectExtArtifactId
description projectDescription
url "https://github.com/${projectOrg}/${rootProjectName}"
scm {
url "https://github.com/${project.org}/${rootProject.name}"
connection "scm:git:https://github.com/${project.org}/${rootProject.name}.git"
developerConnection "scm:git:ssh:git@github.com/${project.org}/${rootProject.name}.git"
url "https://github.com/${projectOrg}/${rootProjectName}"
connection "scm:git:https://github.com/${projectOrg}/${rootProjectName}.git"
developerConnection "scm:git:ssh:git@github.com/${projectOrg}/${rootProjectName}.git"
}
licenses {
if (isExt) {
Expand Down
1 change: 1 addition & 0 deletions plugin-maven/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (

## [Unreleased]
* Support for `clang-format` ([#2406](https://github.com/diffplug/spotless/pull/2406))
* Adopt new version of `maven-plugin-development` from GradleX ([#2395](https://github.com/diffplug/spotless/pull/2395))

## [2.44.2] - 2025-01-14
* Eclipse-based tasks can now handle parallel configuration ([#2389](https://github.com/diffplug/spotless/issues/2389))
Expand Down
15 changes: 4 additions & 11 deletions plugin-maven/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import de.benediktritter.maven.plugin.development.task.GenerateHelpMojoSourcesTask
import de.benediktritter.maven.plugin.development.task.GenerateMavenPluginDescriptorTask
import org.gradlex.maven.plugin.development.task.GenerateHelpMojoSourcesTask
import org.gradlex.maven.plugin.development.task.GenerateMavenPluginDescriptorTask

plugins {
// https://www.benediktritter.de/maven-plugin-development/#release-history
id 'de.benediktritter.maven-plugin-development' version '0.4.3'
// https://github.com/gradlex-org/maven-plugin-development
id 'org.gradlex.maven-plugin-development' version '1.0.3'
}

apply from: rootProject.file('gradle/changelog.gradle')
Expand All @@ -19,13 +19,6 @@ mavenPlugin {
description = project.description
}

tasks.withType(GenerateMavenPluginDescriptorTask).configureEach {
notCompatibleWithConfigurationCache('https://github.com/britter/maven-plugin-development/issues/8')
}
tasks.withType(GenerateHelpMojoSourcesTask).configureEach {
notCompatibleWithConfigurationCache('https://github.com/britter/maven-plugin-development/issues/8')
}

String VER_MAVEN_API = '3.0'
String VER_ECLIPSE_AETHER = '1.1.0'
String VER_PLEXUS_RESOURCES = '1.3.0'
Expand Down
Loading