From bc330e24dc56dbe1d648a880c215d6b45f50c78d Mon Sep 17 00:00:00 2001 From: Frank Vennemeyer Date: Sat, 4 May 2019 15:01:53 +0200 Subject: [PATCH 1/4] Assure "old" Maven version is used for build and testing. --- .../diffplug/spotless/maven/MavenIntegrationHarness.java | 4 ++-- .../test/resources/.mvn/wrapper/maven-wrapper.properties | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/plugin-maven/src/test/java/com/diffplug/spotless/maven/MavenIntegrationHarness.java b/plugin-maven/src/test/java/com/diffplug/spotless/maven/MavenIntegrationHarness.java index e1c6027eee..9a043c594b 100644 --- a/plugin-maven/src/test/java/com/diffplug/spotless/maven/MavenIntegrationHarness.java +++ b/plugin-maven/src/test/java/com/diffplug/spotless/maven/MavenIntegrationHarness.java @@ -96,7 +96,7 @@ private File copy(String path) throws IOException { } protected void writePomWithFormatSteps(String... steps) throws IOException { - writePom(formats(groupWithSteps("format", including("src/**/java/**/*.java"), steps))); + writePom(formats(groupWithSteps("format", including("src/**/java/**/*.java"), steps))); } protected void writePomWithAntlr4Steps(String... steps) throws IOException { @@ -241,7 +241,7 @@ private static String[] groupWithSteps(String group, String... steps) { } private static String[] including(String... includes) { - return groupWithSteps("includes", includes); + return groupWithSteps("includes", groupWithSteps("include", includes)); } private static String[] formats(String... formats) { diff --git a/plugin-maven/src/test/resources/.mvn/wrapper/maven-wrapper.properties b/plugin-maven/src/test/resources/.mvn/wrapper/maven-wrapper.properties index a447c9fa81..c0b0297b0d 100755 --- a/plugin-maven/src/test/resources/.mvn/wrapper/maven-wrapper.properties +++ b/plugin-maven/src/test/resources/.mvn/wrapper/maven-wrapper.properties @@ -1 +1,5 @@ -distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.2/apache-maven-3.5.2-bin.zip \ No newline at end of file +# Maven version 3.2.5 is the earliest version which can cope with the +# maven-plugin-plugin 3.5 (see pom-build.xml.mustache). +# The Maven version used for build and test is not relevant for compatibility. +# Instead the versions of the provided dependencies (see pom-build.xml.mustache) must match. +distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.2.5/apache-maven-3.2.5-bin.zip \ No newline at end of file From f56ccf582de1ea8aad8495e77551a4a9fb4eca1c Mon Sep 17 00:00:00 2001 From: Frank Vennemeyer Date: Sat, 4 May 2019 15:02:55 +0200 Subject: [PATCH 2/4] Assure latest (default) Eclipse-JDT version is used for testing. --- .../com/diffplug/spotless/maven/java/EclipseFormatStepTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/plugin-maven/src/test/java/com/diffplug/spotless/maven/java/EclipseFormatStepTest.java b/plugin-maven/src/test/java/com/diffplug/spotless/maven/java/EclipseFormatStepTest.java index 67c2b00590..792a2a1382 100644 --- a/plugin-maven/src/test/java/com/diffplug/spotless/maven/java/EclipseFormatStepTest.java +++ b/plugin-maven/src/test/java/com/diffplug/spotless/maven/java/EclipseFormatStepTest.java @@ -26,7 +26,6 @@ void testEclipse() throws Exception { writePomWithJavaSteps( "", " ${basedir}/formatter.xml", - " 4.7.1", ""); setFile("formatter.xml").toResource("java/eclipse/formatter.xml"); From 7ae77fb53b3b54c7f2feada697e7a38b102a807e Mon Sep 17 00:00:00 2001 From: Frank Vennemeyer Date: Sat, 4 May 2019 15:05:21 +0200 Subject: [PATCH 3/4] Align provided spotless-maven-plugin dependencies with apache-maven-3.1.0. --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index c50c63f277..c42b9526c4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -30,6 +30,6 @@ VER_MOCKITO=3.3.3 # Used for Maven Plugin VER_MAVEN_API=3.0 -VER_ECLIPSE_AETHER=1.1.0 +VER_ECLIPSE_AETHER=0.9.0.M2 VER_MUSTACHE=0.9.6 VER_PLEXUS_RESOURCES=1.0.1 From b2b956b2e9582604066781e82055257d1158454e Mon Sep 17 00:00:00 2001 From: Frank Vennemeyer Date: Tue, 2 Nov 2021 20:47:24 +0100 Subject: [PATCH 4/4] Bump org.codehaus.plexus:plexus-resources from 1.0.1 to 1.2.0 --- gradle.properties | 2 +- plugin-maven/build.gradle | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/gradle.properties b/gradle.properties index c42b9526c4..2f4f7952a4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -32,4 +32,4 @@ VER_MOCKITO=3.3.3 VER_MAVEN_API=3.0 VER_ECLIPSE_AETHER=0.9.0.M2 VER_MUSTACHE=0.9.6 -VER_PLEXUS_RESOURCES=1.0.1 +VER_PLEXUS_RESOURCES=1.2.0 diff --git a/plugin-maven/build.gradle b/plugin-maven/build.gradle index ac062dd497..0905f58c24 100644 --- a/plugin-maven/build.gradle +++ b/plugin-maven/build.gradle @@ -69,22 +69,14 @@ dependencies { implementation "com.diffplug.spotless:spotless-lib-extra:${libVersion}" } - implementation "org.codehaus.plexus:plexus-resources:${VER_PLEXUS_RESOURCES}" - constraints { - implementation("org.codehaus.plexus:plexus-utils:3.4.1") { - because("version pulled by plexus-resources has a functional-bug affecting " + - "directory scanning times") - } - } - compileOnly "org.apache.maven:maven-plugin-api:${VER_MAVEN_API}" compileOnly "org.apache.maven.plugin-tools:maven-plugin-annotations:${VER_MAVEN_API}" compileOnly "org.apache.maven:maven-core:${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}" + implementation("org.codehaus.plexus:plexus-resources:${VER_PLEXUS_RESOURCES}") implementation "org.eclipse.jgit:org.eclipse.jgit:${VER_JGIT}" testImplementation project(":testlib")