diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 28b04e7b..d899d129 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -10,16 +10,16 @@ jobs: - name: Check out repository uses: actions/checkout@v3 - - name: Set up JDK 7 - uses: actions/setup-java@v2 + - name: Set up JDK + uses: actions/setup-java@v3 with: - distribution: 'zulu' - java-version: 7 + distribution: 'temurin' + java-version: 8 - name: Set up Maven uses: stCarolas/setup-maven@v4.5 with: - maven-version: 3.8.4 + maven-version: 3.9.1 - name: Cache Maven packages uses: actions/cache@v3 @@ -34,5 +34,5 @@ jobs: - uses: actions/upload-artifact@v3 if: failure() with: - name: it-build-logs + name: ${{ runner.os }}-it-build-logs path: target/it/*/*.log diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index 8c79a83a..d8b2495a 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -5,14 +5,14 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.4/apache-maven-3.8.4-bin.zip -wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.1/apache-maven-3.9.1-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar diff --git a/pom.xml b/pom.xml index 2f272cf9..03f0a9f9 100644 --- a/pom.xml +++ b/pom.xml @@ -63,9 +63,9 @@ - 1.7 + 8 UTF-8 - 3.6.0 + 3.8.2 @@ -99,7 +99,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.8.1 + 3.11.0 ${java.version} ${java.version} @@ -109,7 +109,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.3.1 + 3.5.0 ${java.version} @@ -117,7 +117,7 @@ org.apache.maven.plugins maven-site-plugin - 3.7.1 + 3.12.1 org.apache.maven.plugins @@ -153,7 +153,7 @@ org.apache.maven.plugins maven-source-plugin - 3.1.0 + 3.2.1 attach-sources @@ -178,7 +178,7 @@ org.apache.maven.plugins maven-gpg-plugin - 1.6 + 3.0.1 sign-artifacts @@ -198,7 +198,7 @@ maven-invoker-plugin - 3.2.2 + 3.5.1 ${project.build.directory}/it ${project.build.directory}/local-repo @@ -224,41 +224,36 @@ org.apache.maven maven-core - 3.8.5 + 3.9.0 + provided org.codehaus.plexus plexus-utils - 1.5.15 + 3.5.1 org.apache.maven.plugin-tools maven-plugin-annotations - 3.6.4 + 3.8.2 provided - - org.codehaus.plexus - plexus-interactivity-api - 1.1 - compile - org.apache.maven.release maven-release-manager - 2.5.3 + 3.0.0 compile org.apache.maven.release maven-release-oddeven-policy - 2.5.3 + 3.0.0 test - junit - junit - 4.13.2 + org.junit.jupiter + junit-jupiter + 5.9.3 test diff --git a/src/main/java/com/amashchenko/maven/plugin/gitflow/AbstractGitFlowMojo.java b/src/main/java/com/amashchenko/maven/plugin/gitflow/AbstractGitFlowMojo.java index 7a4b4e20..8e10eb6c 100644 --- a/src/main/java/com/amashchenko/maven/plugin/gitflow/AbstractGitFlowMojo.java +++ b/src/main/java/com/amashchenko/maven/plugin/gitflow/AbstractGitFlowMojo.java @@ -18,6 +18,7 @@ import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collections; import java.util.Date; import java.util.HashSet; @@ -25,6 +26,7 @@ import java.util.Map; import java.util.Map.Entry; import java.util.NoSuchElementException; +import java.util.Objects; import java.util.Set; import java.util.TimeZone; import java.util.regex.Pattern; @@ -44,6 +46,7 @@ import org.apache.maven.shared.release.policy.version.VersionPolicy; import org.codehaus.plexus.components.interactivity.Prompter; import org.codehaus.plexus.util.FileUtils; +import org.codehaus.plexus.util.Os; import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.cli.CommandLineException; import org.codehaus.plexus.util.cli.CommandLineUtils; @@ -206,16 +209,16 @@ public abstract class AbstractGitFlowMojo extends AbstractMojo { * * @since 1.18.0 */ - @Parameter(property = "versionsMavenPluginVersion", defaultValue = "2.8.1") - private String versionsMavenPluginVersion = "2.8.1"; + @Parameter(property = "versionsMavenPluginVersion", defaultValue = "2.15.0") + private String versionsMavenPluginVersion = "2.25.0"; /** * Version of tycho-versions-plugin to use. * * @since 1.18.0 */ - @Parameter(property = "tychoVersionsPluginVersion", defaultValue = "0.24.0") - private String tychoVersionsPluginVersion = "0.24.0"; + @Parameter(property = "tychoVersionsPluginVersion", defaultValue = "1.7.0") + private String tychoVersionsPluginVersion = "1.7.0"; /** * Options to pass to Git push command using --push-option. @@ -546,7 +549,12 @@ protected void initGitFlowConfig() throws MojoFailureException, CommandLineExcep */ private void gitSetConfig(final String name, String value) throws MojoFailureException, CommandLineException { if (value == null || value.isEmpty()) { - value = "\"\""; + if (Os.isFamily(Os.FAMILY_WINDOWS)) { + value = "\"\""; + } + else { + value = ""; + } } // ignore error exit codes @@ -636,7 +644,7 @@ protected String gitFindTags() throws MojoFailureException, CommandLineException * If command line execution fails. */ protected String gitFindLastTag() throws MojoFailureException, CommandLineException { - String tag = executeGitCommandReturn("for-each-ref", "--sort=\"-version:refname\"", "--sort=-taggerdate", + String tag = executeGitCommandReturn("for-each-ref", "--sort=-version:refname", "--sort=-taggerdate", "--count=1", "--format=\"%(refname:short)\"", "refs/tags/"); // https://github.com/aleksandr-m/gitflow-maven-plugin/issues/3 tag = removeQuotes(tag); @@ -848,12 +856,12 @@ protected void gitCommit(String message, Map messageProperties) protected void gitMerge(final String branchName, boolean rebase, boolean noff, boolean ffonly, String message, Map messageProperties) throws MojoFailureException, CommandLineException { - String sign = ""; + String sign = null; if (gpgSignCommit) { sign = "-S"; } - String msgParam = ""; - String msg = ""; + String msgParam = null; + String msg = null; if (StringUtils.isNotBlank(message)) { if (StringUtils.isNotBlank(commitMessagePrefix)) { message = commitMessagePrefix + message; @@ -1123,15 +1131,9 @@ protected void mvnSetVersions(final String version) throws MojoFailureException, getLog().info("Updating version(s) to '" + version + "'."); String newVersion = "-DnewVersion=" + version; - String grp = ""; - String art = ""; - if (versionsForceUpdate) { - grp = "-DgroupId="; - art = "-DartifactId="; - } if (tychoBuild) { - String prop = ""; + String prop = null; if (StringUtils.isNotBlank(versionProperty)) { prop = "-Dproperties=" + versionProperty; getLog().info("Updating property '" + versionProperty + "' to '" + version + "'."); @@ -1147,8 +1149,10 @@ protected void mvnSetVersions(final String version) throws MojoFailureException, if (!skipUpdateVersion) { runCommand = true; args.add(VERSIONS_MAVEN_PLUGIN + ":" + versionsMavenPluginVersion + ":" + VERSIONS_MAVEN_PLUGIN_SET_GOAL); - args.add(grp); - args.add(art); + if (versionsForceUpdate) { + args.add("-DgroupId="); + args.add("-DartifactId="); + } } if (StringUtils.isNotBlank(versionProperty)) { @@ -1324,7 +1328,8 @@ private CommandResult executeCommand(final Commandline cmd, final boolean failOn } cmd.clearArgs(); - cmd.addArguments(args); + String[] nonNullArgs = Arrays.stream(args).filter(Objects::nonNull).toArray(String[]::new); + cmd.addArguments(nonNullArgs); if (StringUtils.isNotBlank(argStr)) { cmd.createArg().setLine(argStr); @@ -1344,7 +1349,7 @@ private CommandResult executeCommand(final Commandline cmd, final boolean failOn // not all commands print errors to error stream errorStr += LS + outStr; - throw new MojoFailureException(errorStr); + throw new MojoFailureException("Failed cmd ["+cmd.getExecutable()+"] with args [" + Arrays.toString(cmd.getArguments()) + "], bad exit code [" + exitCode +"]. Out: [" + errorStr+ "]"); } if (verbose && StringUtils.isNotBlank(errorStr)) { diff --git a/src/test/java/com/amashchenko/maven/plugin/gitflow/FeatureVersionTest.java b/src/test/java/com/amashchenko/maven/plugin/gitflow/FeatureVersionTest.java index bf7044db..30ef7de7 100644 --- a/src/test/java/com/amashchenko/maven/plugin/gitflow/FeatureVersionTest.java +++ b/src/test/java/com/amashchenko/maven/plugin/gitflow/FeatureVersionTest.java @@ -18,26 +18,13 @@ import java.util.Arrays; import java.util.Collection; -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; -import org.junit.runners.Parameterized.Parameters; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; -@RunWith(Parameterized.class) -public class FeatureVersionTest { - private final String version; - private final String featureName; - private final String expectedVersion; +import static org.junit.jupiter.api.Assertions.assertEquals; - public FeatureVersionTest(final String version, final String featureName, - final String expectedVersion) { - this.version = version; - this.featureName = featureName; - this.expectedVersion = expectedVersion; - } +public class FeatureVersionTest { - @Parameters public static Collection data() { return Arrays.asList(new Object[][] { { "0.9-SNAPSHOT", "feature", "0.9-feature-SNAPSHOT" }, @@ -48,9 +35,11 @@ public static Collection data() { { "0.9-RC3", null, "0.9-RC3" } }); } - @Test - public void testFeatureVersion() throws Exception { - Assert.assertEquals(expectedVersion, + @ParameterizedTest + @MethodSource("data") + public void testFeatureVersion(final String version, final String featureName, + final String expectedVersion) throws Exception { + assertEquals(expectedVersion, new GitFlowVersionInfo(version, null).featureVersion(featureName)); } } diff --git a/src/test/java/com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfoTest.java b/src/test/java/com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfoTest.java index 293d95f6..596489ec 100644 --- a/src/test/java/com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfoTest.java +++ b/src/test/java/com/amashchenko/maven/plugin/gitflow/GitFlowVersionInfoTest.java @@ -17,105 +17,107 @@ import org.apache.maven.shared.release.policy.oddeven.OddEvenVersionPolicy; import org.apache.maven.shared.release.versions.VersionParseException; -import org.junit.Assert; -import org.junit.Test; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertThrows; public class GitFlowVersionInfoTest { @Test public void testCreating() throws Exception { final String version = "0.9"; GitFlowVersionInfo info = new GitFlowVersionInfo(version, null); - Assert.assertNotNull(info); - Assert.assertEquals(version, info.toString()); + Assertions.assertNotNull(info); + Assertions.assertEquals(version, info.toString()); } - @Test(expected = VersionParseException.class) + @Test public void testVersionParseException() throws Exception { - new GitFlowVersionInfo("", null); + Assertions.assertThrows(VersionParseException.class, ()-> new GitFlowVersionInfo("", null)); } @Test public void testIsValidVersion() throws Exception { - Assert.assertTrue(GitFlowVersionInfo.isValidVersion("0.9")); - Assert.assertTrue(GitFlowVersionInfo.isValidVersion("some-SNAPSHOT")); - Assert.assertTrue(GitFlowVersionInfo + Assertions.assertTrue(GitFlowVersionInfo.isValidVersion("0.9")); + Assertions.assertTrue(GitFlowVersionInfo.isValidVersion("some-SNAPSHOT")); + Assertions.assertTrue(GitFlowVersionInfo .isValidVersion("0.9-RC3-feature-SNAPSHOT")); - Assert.assertFalse(GitFlowVersionInfo.isValidVersion("some.0.9")); - Assert.assertFalse(GitFlowVersionInfo.isValidVersion(null)); - Assert.assertFalse(GitFlowVersionInfo.isValidVersion("")); - Assert.assertFalse(GitFlowVersionInfo.isValidVersion(" ")); - Assert.assertFalse(GitFlowVersionInfo.isValidVersion("-1")); + Assertions.assertFalse(GitFlowVersionInfo.isValidVersion("some.0.9")); + Assertions.assertFalse(GitFlowVersionInfo.isValidVersion(null)); + Assertions.assertFalse(GitFlowVersionInfo.isValidVersion("")); + Assertions.assertFalse(GitFlowVersionInfo.isValidVersion(" ")); + Assertions.assertFalse(GitFlowVersionInfo.isValidVersion("-1")); } @Test public void testHotfixVersion() throws Exception { GitFlowVersionInfo info = new GitFlowVersionInfo("0.9", null); - Assert.assertNotNull(info); - Assert.assertEquals("0.10", info.hotfixVersion(false, null)); + Assertions.assertNotNull(info); + Assertions.assertEquals("0.10", info.hotfixVersion(false, null)); } @Test public void testHotfixVersion2() throws Exception { GitFlowVersionInfo info = new GitFlowVersionInfo("0.9-SNAPSHOT", null); - Assert.assertNotNull(info); - Assert.assertEquals("0.10", info.hotfixVersion(false, null)); + Assertions.assertNotNull(info); + Assertions.assertEquals("0.10", info.hotfixVersion(false, null)); } @Test public void testHotfixVersion3() throws Exception { GitFlowVersionInfo info = new GitFlowVersionInfo("0.9", null); - Assert.assertNotNull(info); - Assert.assertEquals("0.10", info.hotfixVersion(true, null)); + Assertions.assertNotNull(info); + Assertions.assertEquals("0.10", info.hotfixVersion(true, null)); } @Test public void testHotfixVersion4() throws Exception { GitFlowVersionInfo info = new GitFlowVersionInfo("0.9-SNAPSHOT", null); - Assert.assertNotNull(info); - Assert.assertEquals("0.10-SNAPSHOT", info.hotfixVersion(true, null)); + Assertions.assertNotNull(info); + Assertions.assertEquals("0.10-SNAPSHOT", info.hotfixVersion(true, null)); } @Test public void testDigitsVersionInfo() throws Exception { GitFlowVersionInfo info = new GitFlowVersionInfo("0.9", null); - Assert.assertNotNull(info); + Assertions.assertNotNull(info); info = info.digitsVersionInfo(); - Assert.assertNotNull(info); - Assert.assertEquals(new GitFlowVersionInfo("0.9", null), info); + Assertions.assertNotNull(info); + Assertions.assertEquals(new GitFlowVersionInfo("0.9", null), info); } @Test public void testDigitsVersionInfo2() throws Exception { GitFlowVersionInfo info = new GitFlowVersionInfo( "0.9-RC3-feature-SNAPSHOT", null); - Assert.assertNotNull(info); + Assertions.assertNotNull(info); info = info.digitsVersionInfo(); - Assert.assertNotNull(info); - Assert.assertEquals(new GitFlowVersionInfo("0.9", null), info); + Assertions.assertNotNull(info); + Assertions.assertEquals(new GitFlowVersionInfo("0.9", null), info); } @Test public void testWithoutVersionPolicy() throws Exception { GitFlowVersionInfo info1 = new GitFlowVersionInfo("1.0.0-SNAPSHOT", null); - Assert.assertEquals("1.0.0", info1.getReleaseVersionString()); - Assert.assertEquals("1.0.1-SNAPSHOT", info1.nextSnapshotVersion()); + Assertions.assertEquals("1.0.0", info1.getReleaseVersionString()); + Assertions.assertEquals("1.0.1-SNAPSHOT", info1.nextSnapshotVersion()); GitFlowVersionInfo info2 = new GitFlowVersionInfo("1.0.1-SNAPSHOT", null); - Assert.assertEquals("1.0.1", info2.getReleaseVersionString()); - Assert.assertEquals("1.0.2-SNAPSHOT", info2.nextSnapshotVersion()); + Assertions.assertEquals("1.0.1", info2.getReleaseVersionString()); + Assertions.assertEquals("1.0.2-SNAPSHOT", info2.nextSnapshotVersion()); } @Test public void testWithVersionPolicy() throws Exception { GitFlowVersionInfo info1 = new GitFlowVersionInfo("1.0.0-SNAPSHOT", new OddEvenVersionPolicy()); - Assert.assertEquals("1.0.0", info1.getReleaseVersionString()); - Assert.assertEquals("1.0.1-SNAPSHOT", info1.nextSnapshotVersion()); + Assertions.assertEquals("1.0.0", info1.getReleaseVersionString()); + Assertions.assertEquals("1.0.1-SNAPSHOT", info1.nextSnapshotVersion()); GitFlowVersionInfo info2 = new GitFlowVersionInfo("1.0.1-SNAPSHOT", new OddEvenVersionPolicy()); - Assert.assertEquals("1.0.2", info2.getReleaseVersionString()); - Assert.assertEquals("1.0.3-SNAPSHOT", info2.nextSnapshotVersion()); + Assertions.assertEquals("1.0.2", info2.getReleaseVersionString()); + Assertions.assertEquals("1.0.3-SNAPSHOT", info2.nextSnapshotVersion()); } } diff --git a/src/test/java/com/amashchenko/maven/plugin/gitflow/NextHotfixVersionTest.java b/src/test/java/com/amashchenko/maven/plugin/gitflow/NextHotfixVersionTest.java index 3d9e20ad..afb16d18 100644 --- a/src/test/java/com/amashchenko/maven/plugin/gitflow/NextHotfixVersionTest.java +++ b/src/test/java/com/amashchenko/maven/plugin/gitflow/NextHotfixVersionTest.java @@ -18,25 +18,14 @@ import java.util.Arrays; import java.util.Collection; -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; -import org.junit.runners.Parameterized.Parameters; -@RunWith(Parameterized.class) -public class NextHotfixVersionTest { - private final String version; - private final Integer index; - private final String expectedVersion; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; - public NextHotfixVersionTest(final String version, final Integer index, final String expectedVersion) { - this.version = version; - this.index = index; - this.expectedVersion = expectedVersion; - } - @Parameters(name = "{0}-({1})->{2}") +public class NextHotfixVersionTest { + public static Collection data() { return Arrays .asList(new Object[][] { @@ -61,8 +50,9 @@ public static Collection data() { { "2.3.4", 1, "2.4.0" } }); } - @Test - public void testNextSnapshotVersion() throws Exception { - Assert.assertEquals(expectedVersion, new GitFlowVersionInfo(version, null).hotfixVersion(false, index)); + @ParameterizedTest + @MethodSource("data") + public void testNextSnapshotVersion(final String version, final Integer index, final String expectedVersion) throws Exception { + Assertions.assertEquals(expectedVersion, new GitFlowVersionInfo(version, null).hotfixVersion(false, index)); } } diff --git a/src/test/java/com/amashchenko/maven/plugin/gitflow/NextSnapshotVersionTest.java b/src/test/java/com/amashchenko/maven/plugin/gitflow/NextSnapshotVersionTest.java index e783b20d..8b7aeb3b 100644 --- a/src/test/java/com/amashchenko/maven/plugin/gitflow/NextSnapshotVersionTest.java +++ b/src/test/java/com/amashchenko/maven/plugin/gitflow/NextSnapshotVersionTest.java @@ -15,29 +15,14 @@ */ package com.amashchenko.maven.plugin.gitflow; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + import java.util.Arrays; import java.util.Collection; -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; -import org.junit.runners.Parameterized.Parameters; - -@RunWith(Parameterized.class) public class NextSnapshotVersionTest { - private final String version; - private final Integer index; - private final String expectedVersion; - - public NextSnapshotVersionTest(final String version, final Integer index, - final String expectedVersion) { - this.version = version; - this.index = index; - this.expectedVersion = expectedVersion; - } - - @Parameters public static Collection data() { return Arrays .asList(new Object[][] { @@ -64,9 +49,11 @@ public static Collection data() { { "2.3.4", 1, "2.4.0-SNAPSHOT" } }); } - @Test - public void testNextSnapshotVersion() throws Exception { - Assert.assertEquals(expectedVersion, + @ParameterizedTest + @MethodSource("data") + public void testNextSnapshotVersion(final String version, final Integer index, + final String expectedVersion) throws Exception { + Assertions.assertEquals(expectedVersion, new GitFlowVersionInfo(version, null).nextSnapshotVersion(index)); } } diff --git a/src/test/java/com/amashchenko/maven/plugin/gitflow/ValidateConfigurationTest.java b/src/test/java/com/amashchenko/maven/plugin/gitflow/ValidateConfigurationTest.java index d60c4079..48922e03 100644 --- a/src/test/java/com/amashchenko/maven/plugin/gitflow/ValidateConfigurationTest.java +++ b/src/test/java/com/amashchenko/maven/plugin/gitflow/ValidateConfigurationTest.java @@ -15,27 +15,16 @@ */ package com.amashchenko.maven.plugin.gitflow; +import org.apache.maven.plugin.MojoFailureException; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; + import java.util.Arrays; import java.util.Collection; -import org.apache.maven.plugin.MojoFailureException; -import org.junit.Assert; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; -import org.junit.runners.Parameterized.Parameters; - -@RunWith(Parameterized.class) public class ValidateConfigurationTest { - private final String argLine; - private final boolean expected; - - public ValidateConfigurationTest(String argLine, boolean expected) { - this.argLine = argLine; - this.expected = expected; - } - @Parameters(name = "{0}->{1}") public static Collection data() { return Arrays.asList(new Object[][] { { "-X -e", true }, { "-DsomeArg1=true", true }, { null, true }, @@ -46,8 +35,9 @@ public static Collection data() { { "-DsomeArg ; clean", false } }); } - @Test - public void testValidateConfiguration() throws Exception { + @ParameterizedTest + @MethodSource("data") + public void testValidateConfiguration(String argLine, boolean expected) throws Exception { GitFlowReleaseStartMojo mojo = new GitFlowReleaseStartMojo(); mojo.setArgLine(argLine); @@ -55,7 +45,7 @@ public void testValidateConfiguration() throws Exception { mojo.validateConfiguration(); } catch (MojoFailureException e) { if (expected) { - Assert.fail(); + Assertions.fail(); } } }