wro4j-maven-plugin/src/main/java/ro/isdc/wro/maven/plugin/AbstractWro4jMojo.java
protected final WroManagerFactory getManagerFactory() {
    if (managerFactory == null) {
      try {
        managerFactory = wroManagerFactory != null ? createCustomManagerFactory() : newWroManagerFactory();
        onAfterCreate(managerFactory);
      } catch (final MojoExecutionException e) {
        throw WroRuntimeException.wrap(e);
      }
    }
    return managerFactory;
  }
protected final WroManagerFactory getManagerFactory() {
    if (managerFactory == null) {
      try {
        managerFactory = wroManagerFactory != null ? createCustomManagerFactory() : newWroManagerFactory();
        onAfterCreate(managerFactory);
      } catch (final MojoExecutionException e) {
        throw WroRuntimeException.wrap(e);
      }
    }
    return managerFactory;
  }
This method will ensure that you have a right and initialized instance of {@link StandaloneContextAware}.

@return {@link WroManagerFactory} implementation.