private ApplicationBuilder<?, ?> createBuilder() throws MojoExecutionException {
        final ApplicationBuilder<?, ?> result;

        // Create the ClassLoader
        final ClassLoader classLoader;
        try {
            classLoader = getClassLoader();
        } catch (final DependencyResolutionRequiredException ex)  {
            throw new MojoExecutionException(ex.toString(), ex);
        }

        // Configure config file location
        if (hasConfigFile()) {
            result = ApplicationBuilders.standard(classLoader)
                .withParam(METADATA_LOCATION, configLocation().toAbsolutePath().toString());
        } else if (hasConfigFile(DEFAULT_CONFIG)) {
            result = ApplicationBuilders.standard(classLoader)
                .withParam(METADATA_LOCATION, DEFAULT_CONFIG_LOCATION);
        } else {
            result = ApplicationBuilders.empty(classLoader);
        }

        //
        result.withSkipCheckDatabaseConnectivity();

        // Configure manual database settings
        if (StringUtils.isNotBlank(dbmsHost())) {
            result.withIpAddress(dbmsHost());
            getLog().info("Custom database host '" + dbmsHost() + "'.");
        }

        if (dbmsPort() != 0) {
            result.withPort(dbmsPort());
            getLog().info("Custom database port '" + dbmsPort() + "'.");
        }

        if (StringUtils.isNotBlank(dbmsUsername())) {
            result.withUsername(dbmsUsername());
            getLog().info("Custom database username '" + dbmsUsername() + "'.");
        }

        if (StringUtils.isNotBlank(dbmsPassword())) {
            result.withPassword(dbmsPassword());
            getLog().info("Custom database password '********'.");
        }

        if (StringUtils.isNotBlank(dbmsConnectionUrl())) {
            result.withConnectionUrl(dbmsConnectionUrl());
            getLog().info("Custom connection URL '" + dbmsConnectionUrl() + "'.");
        }

        // Add mandatory components that are not included in 'runtime'
        result
            .withBundle(GeneratorBundle.class)
            .withComponent(CodeGenerationComponentImpl.class)
            .withComponent(MavenPathComponent.class);

        // Add optional components that are no longer included in 'runtime' but
        // are nice to have available without explicit installation
        result
            .withBundle(MySqlBundle.class)
            .withBundle(MariaDbBundle.class)
            .withBundle(PostgresBundle.class)
            .withBundle(SqliteBundle.class);

        configureBuilder(result); // Add MOJO specific components (if any)

        // Add any extra type mappers requested by the user
        result.withComponent(TypeMapperInstaller.class, () -> new TypeMapperInstaller(typeMappers()));

        // Add extra components requested by the user
        final String[] components = components();
        if (components != null) {
            for (final String component : components) {
                tryAddExtraComponent(result, classLoader, component);
            }
        }

        // Set parameters configured in the pom.xml
        final ConfigParam[] parameters = parameters();
        if (parameters != null) {
            for (final ConfigParam param : parameters()) {
                result.withParam(param.getName(), param.getValue());
            }
        }

        // Return the resulting builder.
        return result;
    }
Returns if the specified file is non-null, exists and is readable. If,
not, {@code false} is returned and an appropriate message is shown in the
console.

@param file the config file to check
@return {@code true} if available, else {@code false}
build-parent/maven-plugin/src/main/java/com/speedment/maven/abstractmojo/AbstractSpeedmentMojo.java