Skip to content

Commit

Permalink
Merge pull request jbake-org#40 from jonbullock/change/support-2.7.0-…
Browse files Browse the repository at this point in the history
…rc.2

Updated jbake-core to 2.7.0-rc.2
  • Loading branch information
jonbullock authored May 24, 2021
2 parents 680351f + 4765ef0 commit 6846121
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 21 deletions.
13 changes: 2 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<groupId>org.jbake</groupId>
<artifactId>jbake-maven-plugin</artifactId>
<version>0.3.6-SNAPSHOT</version>
<version>0.3.6-rc.2</version>
<packaging>maven-plugin</packaging>

<prerequisites>
Expand Down Expand Up @@ -79,10 +79,6 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-settings</artifactId>
Expand Down Expand Up @@ -115,7 +111,7 @@
<dependency>
<groupId>org.jbake</groupId>
<artifactId>jbake-core</artifactId>
<version>2.6.7</version>
<version>2.7.0-rc.2</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
Expand All @@ -127,11 +123,6 @@
<artifactId>commons-lang3</artifactId>
<version>3.10</version>
</dependency>
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
<version>1.10</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
Expand Down
7 changes: 3 additions & 4 deletions src/main/java/org/jbake/maven/GenerateMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@
* limitations under the License.
*/

import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.configuration.MapConfiguration;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.plugins.annotations.ResolutionScope;
import org.apache.maven.project.MavenProject;
import org.jbake.app.JBakeException;
import org.jbake.app.Oven;
import org.jbake.app.configuration.DefaultJBakeConfiguration;
import org.jbake.app.configuration.JBakeConfiguration;
Expand Down Expand Up @@ -90,9 +89,9 @@ protected void reRender() throws MojoExecutionException {
}
}

protected JBakeConfiguration createConfiguration() throws ConfigurationException {
protected JBakeConfiguration createConfiguration() throws JBakeException {
DefaultJBakeConfiguration jBakeConfiguration = new JBakeConfigurationFactory().createDefaultJbakeConfiguration(inputDirectory, outputDirectory, isClearCache);
jBakeConfiguration.getCompositeConfiguration().addConfiguration(new MapConfiguration(this.project.getProperties()));
jBakeConfiguration.addConfiguration(this.project.getProperties());
return jBakeConfiguration;
}

Expand Down
5 changes: 2 additions & 3 deletions src/main/java/org/jbake/maven/InlineMojo.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.jbake.maven;

import org.apache.commons.configuration.ConfigurationException;

/*
* Copyright 2013 ingenieux Labs
*
Expand All @@ -21,6 +19,7 @@
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.jbake.app.JBakeException;

import static spark.Spark.awaitInitialization;
import static spark.Spark.externalStaticFileLocation;
Expand Down Expand Up @@ -57,7 +56,7 @@ private int getPort() {
if (this.port == null) {
try {
return createConfiguration().getServerPort();
} catch (ConfigurationException e) {
} catch (JBakeException e) {
// ignore since default will be returned
}
} else {
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/org/jbake/maven/SeedMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

import static java.lang.String.format;
import static java.util.Arrays.asList;
import static org.apache.commons.lang.StringUtils.join;
import static org.apache.commons.lang3.StringUtils.join;

/**
* Seeds a new JBake Template into the (non-existing) directory defined by outputDirectory
Expand Down Expand Up @@ -78,7 +78,6 @@ public void execute() throws MojoExecutionException {
unpackZip(tmpZipFile);
} catch (Exception e) {
getLog().info("Oops", e);

throw new MojoExecutionException("Failure when running: ", e);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/jbake/maven/WatchMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import java.io.InputStreamReader;
import java.util.concurrent.atomic.AtomicBoolean;

import static org.apache.commons.lang.StringUtils.isBlank;
import static org.apache.commons.lang3.StringUtils.isBlank;

/**
* Runs jbake on a folder while watching for changes
Expand Down

0 comments on commit 6846121

Please sign in to comment.