@Test public void executeDoNotVerify() throws MojoFailureException, MojoExecutionException, IOException, ValidationException { mojoMock.skipValidation = true; doCallRealMethod().when(mojoMock).execute(); mojoMock.execute(); verify(mojoMock, times(0)).validateMavenEnvironment(); }
protected void validateMavenEnvironment() throws ValidationException { getLog().debug("Validating Maven environment..."); String mavenVersion = (String) session.getRequest().getSystemProperties().get("maven.version"); if (!VersionUtils.isVersionGreaterOrEquals(mavenVersion, MIN_MAVEN_VERSION)) { throw new ValidationException("Your Maven installation version is: " + mavenVersion + " We require at least:" + MIN_MAVEN_VERSION); } }
ValidateMojo extends AbstractMuleMojo { protected void validateMavenEnvironment() throws ValidationException { getLog().debug("Validating Maven environment..."); String mavenVersion = (String) session.getRequest().getSystemProperties().get("maven.version"); if (!VersionUtils.isVersionGreaterOrEquals(mavenVersion, MIN_MAVEN_VERSION)) { throw new ValidationException("Your Maven installation version is: " + mavenVersion + " We require at least:" + MIN_MAVEN_VERSION); } } }
ValidateMojo extends AbstractMuleMojo { protected void validateMavenEnvironment() throws ValidationException { getLog().debug("Validating Maven environment..."); String mavenVersion = (String) session.getRequest().getSystemProperties().get("maven.version"); if (!VersionUtils.isVersionGreaterOrEquals(mavenVersion, MIN_MAVEN_VERSION)) { throw new ValidationException("Your Maven installation version is: " + mavenVersion + " We require at least:" + MIN_MAVEN_VERSION); } }  }
ValidateMojo extends AbstractMuleMojo { protected void validateMavenEnvironment() throws ValidationException { getLog().debug("Validating Maven environment..."); String mavenVersion = (String) session.getRequest().getSystemProperties().get("maven.version"); if (!VersionUtils.isVersionGreaterOrEquals(mavenVersion, MIN_MAVEN_VERSION)) { throw new ValidationException("Your Maven installation version is: " + mavenVersion + " We require at least:" + MIN_MAVEN_VERSION); } }  @Override void doExecute(); @Override String getPreviousRunPlaceholder(); }
ValidateMojo extends AbstractMuleMojo { protected void validateMavenEnvironment() throws ValidationException { getLog().debug("Validating Maven environment..."); String mavenVersion = (String) session.getRequest().getSystemProperties().get("maven.version"); if (!VersionUtils.isVersionGreaterOrEquals(mavenVersion, MIN_MAVEN_VERSION)) { throw new ValidationException("Your Maven installation version is: " + mavenVersion + " We require at least:" + MIN_MAVEN_VERSION); } }  @Override void doExecute(); @Override String getPreviousRunPlaceholder();  }