code: protected void validate(final boolean isDomain) throws MojoDeploymentException {
          final boolean hasServerGroups = hasServerGroups();
          if (isDomain) {
              if (!hasServerGroups) {
                  throw new MojoDeploymentException(
                          "Server is running in domain mode, but no server groups have been defined.");
              }
          } else if (hasServerGroups) {
              throw new MojoDeploymentException("Server is running in standalone mode, but server groups have been defined.");
          }
      }
docs: Validates the deployment.
  
  @param isDomain {@code true} if this is a domain server, otherwise {@code false}
  
  @throws MojoDeploymentException if the deployment is invalid