private void validate() throws MojoFailureException {
  if (port <= 0) {
    throw new MojoFailureException("'port' configuration must be set.");
  }
  if (scriptFile.exists() == false) {
    throw new MojoFailureException("'scriptFile' not exists");
  }
  for (  AddUser addUser : addUsers) {
    if (addUser.getScriptText() == null && addUser.getScriptFile() == null) {
      throw new MojoFailureException("AddUser must contain the text of the script or a scriptFile");
    }
    if (addUser.getPort() <= 0) {
      throw new MojoFailureException("'port' attribute must be set on AddUser to the port against which the script should run.");
    }
    if (addUser.getHost() == null) {
      throw new MojoFailureException("'host' attribute must be set on AddUser to the host against which the script should run.");
    }
  }
}

private void validate ( ) throws MojoFailureException { if ( port <= 0 ) { throw new MojoFailureException ( "'port' configuration must be set." ) ; } if ( scriptFile . exists ( ) == false ) { throw new MojoFailureException ( "'scriptFile' not exists" ) ; } for ( AddUser addUser : addUsers ) { if ( addUser . getScriptText ( ) == null && addUser . getScriptFile ( ) == null ) { throw new MojoFailureException ( "AddUser must contain the text of the script or a scriptFile" ) ; } if ( addUser . getPort ( ) <= 0 ) { throw new MojoFailureException ( "'port' attribute must be set on AddUser to the port against which the script should run." ) ; } if ( addUser . getHost ( ) == null ) { throw new MojoFailureException ( "'host' attribute must be set on AddUser to the host against which the script should run." ) ; } } }
validate if the configured parameters are valid
