本文整理汇总了Java中org.jbake.app.Oven类的典型用法代码示例。如果您正苦于以下问题:Java Oven类的具体用法?Java Oven怎么用?Java Oven使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Oven类属于org.jbake.app包,在下文中一共展示了Oven类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: bake
import org.jbake.app.Oven; //导入依赖的package包/类
public void bake(final LaunchOptions options, final CompositeConfiguration config) {
final Oven oven = new Oven(options.getSource(), options.getDestination(), config, options.isClearCache());
oven.setupPaths();
oven.bake();
final List<Throwable> errors = oven.getErrors();
if (!errors.isEmpty()) {
final StringBuilder msg = new StringBuilder();
// TODO: decide, if we want the all errors here
msg.append( MessageFormat.format("JBake failed with {0} errors:\n", errors.size()));
int errNr = 1;
for (final Throwable error : errors) {
msg.append(MessageFormat.format("{0}. {1}\n", errNr, error.getMessage()));
++errNr;
}
throw new JBakeException(msg.toString(), errors.get(0));
}
}
示例2: setup
import org.jbake.app.Oven; //导入依赖的package包/类
protected void setup() throws MojoExecutionException {
if (oven != null) {
return;
}
try {
Orient.instance().startup();
this.oven = new Oven(inputDirectory, outputDirectory, createConfiguration(), clearCache);
oven.setupPaths();
} catch (Throwable ex) {
destroy();
throw new MojoExecutionException("Failure when running: ", ex);
}
}
示例3: exec
import org.jbake.app.Oven; //导入依赖的package包/类
private void exec() {
final Oven oven = new Oven(options.getSource(), options.getDestination(), config, options.isClearCache());
oven.setupPaths();
oven.bake();
}