class BuildHelper {

    public BuildResult build(final Module module) {
        try {
            cache.invalidateCache(module);
            Builder builder = cache.assertBuilder(module);
            final BuildResults results = builder.build();

            BuildMessage infoMsg = new BuildMessage();

            infoMsg.setLevel(Level.INFO);
            infoMsg.setText(buildResultMessage(module, results).toString());

            results.addBuildMessage(0, infoMsg);

            return new BuildResult(builder, results);
        } catch (Exception e) {
            logger.error(e.getMessage(),
                         e);
            return new BuildResult(null, buildExceptionResults(e, module.getPom().getGav()));
        }
    }

    public  BuildHelper();
    @Inject public  BuildHelper(final POMService pomService,
                       final ExtendedM2RepoService m2RepoService,
                       final KieModuleService moduleService,
                       final DeploymentVerifier deploymentVerifier,
                       final LRUBuilderCache cache,
                       final Instance<PostBuildHandler> handlers,
                       final Instance<User> identity);

}