/** * Creates a {@link DefaultJBakeConfiguration} with value site.host replaced * by http://localhost:[server.port]. * The server.port is read from the project properties file. * * @param sourceFolder The source folder of the project * @param destinationFolder The destination folder to render and copy files to * @param isClearCache Whether to clear database cache or not * @return A configuration by given parameters * @throws ConfigurationException if loading the configuration fails */ public DefaultJBakeConfiguration createJettyJbakeConfiguration(File sourceFolder, File destinationFolder, boolean isClearCache) throws ConfigurationException { DefaultJBakeConfiguration configuration = (DefaultJBakeConfiguration) getConfigUtil().loadConfig(sourceFolder); configuration.setDestinationFolder(destinationFolder); configuration.setClearCache(isClearCache); configuration.setSiteHost("http://localhost:"+configuration.getServerPort()); return configuration; }
/** * Creates a {@link DefaultJBakeConfiguration} with value site.host replaced * by http://localhost:[server.port]. * The server.port is read from the project properties file. * * @param sourceFolder The source folder of the project * @param destinationFolder The destination folder to render and copy files to * @param isClearCache Whether to clear database cache or not * @return A configuration by given parameters * @throws ConfigurationException if loading the configuration fails */ public DefaultJBakeConfiguration createJettyJbakeConfiguration(File sourceFolder, File destinationFolder, boolean isClearCache) throws ConfigurationException { DefaultJBakeConfiguration configuration = (DefaultJBakeConfiguration) getConfigUtil().loadConfig(sourceFolder); configuration.setDestinationFolder(destinationFolder); configuration.setClearCache(isClearCache); configuration.setSiteHost("http://localhost:"+configuration.getServerPort()); return configuration; }