diff --git a/gradle.properties b/gradle.properties index c50c63f277..2f4f7952a4 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 +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") 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/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"); 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