From acf7a64b089c0ba67f92251145da6beb11564883 Mon Sep 17 00:00:00 2001 From: Frank Vennemeyer Date: Tue, 2 Nov 2021 20:47:24 +0100 Subject: [PATCH] Fix maven-plugin dependencies. --- plugin-maven/CHANGES.md | 1 + plugin-maven/build.gradle | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/plugin-maven/CHANGES.md b/plugin-maven/CHANGES.md index 73d2a340c2..63f8b0aed1 100644 --- a/plugin-maven/CHANGES.md +++ b/plugin-maven/CHANGES.md @@ -6,6 +6,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format ( ### Changed * Added support and bump Eclipse formatter default versions to `4.21` for `eclipse-groovy`. Change is only applied for JVM 11+. ### Fixed + * Fix plugin dependencies. Transitive Plexus Classworlds include can lead to exceptions when resolving dependencies of Spotless plugins ([#397] https://github.com/diffplug/spotless/issues/397). * Revert change from 2.17.2 regarding [skip bug](https://github.com/diffplug/spotless/pull/969) because fixing the skip bug caused inconsistent behavior between `check.skip` and `apply.skip`. * [skip bug](https://github.com/diffplug/spotless/issues/968) if ratchetFrom is specified, the build will still fail in if no Git repository is found, even if `skip` is true (new fix). diff --git a/plugin-maven/build.gradle b/plugin-maven/build.gradle index f5257e065c..bb3da6271d 100644 --- a/plugin-maven/build.gradle +++ b/plugin-maven/build.gradle @@ -69,7 +69,9 @@ dependencies { implementation "com.diffplug.spotless:spotless-lib-extra:${libVersion}" } - implementation "org.codehaus.plexus:plexus-resources:${VER_PLEXUS_RESOURCES}" + implementation("org.codehaus.plexus:plexus-resources:${VER_PLEXUS_RESOURCES}") { + exclude group: 'classworld', module: 'classworld' + } constraints { implementation("org.codehaus.plexus:plexus-utils:3.4.1") { because("version pulled by plexus-resources has a functional-bug affecting " + @@ -80,7 +82,6 @@ dependencies { compileOnly "org.apache.maven:maven-plugin-api:${VER_MAVEN_API}" compileOnly "org.apache.maven.plugin-tools:maven-plugin-annotations:${VER_MAVEN_API}" compileOnly "org.eclipse.aether:aether-api:${VER_ECLIPSE_AETHER}" - compileOnly "org.eclipse.aether:aether-util:${VER_ECLIPSE_AETHER}" implementation "com.diffplug.durian:durian-core:${VER_DURIAN}" implementation "com.diffplug.durian:durian-collect:${VER_DURIAN}"