Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jbake-maven-plugin is now part of the jbake release lifecycle #150

Merged
merged 2 commits into from
Jan 2, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 63 additions & 1 deletion content/docs/latest/build-tool-integration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,74 @@ The plugin is available from the Maven Central repository using the following co
<dependency>
<groupId>org.jbake</groupId>
<artifactId>jbake-maven-plugin</artifactId>
<version>0.3.2</version>
<version>${jbakeVersion}</version>
</dependency>
----

The plugin was originally created by https://github.com/aldrinleal[Aldrin Leal].

=== Usage (maven plugin)

To use JBake Maven Plugin, add the plugin in your `pom.xml`:

----
<build>
<plugins>
<plugin>
<groupId>org.jbake</groupId>
<artifactId>jbake-maven-plugin</artifactId>
<version>${jbakeVersion}</version>
<configuration>
<inputDirectory>${project.basedir}</inputDirectory>
<outputDirectory>${project.build.directory}/website</outputDirectory>
</configuration>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
----

This configuration expects this directory structure:

----
my-project/
assets/
my-logo.png
...
content/
my-page.adoc
...
templates/
my-template.ftl
...
jbake.properties
pom.xml
----

Run `mvn generate-resources` and open `my-project/target/website/index.html` in a browser to see the result.

=== Goals (maven plugin)

There are 4 goals provided by the maven plugin:

* `jbake:seed` - seeds your project/site with example content and templates
* `jbake:generate` - bakes your project/site
* `jbake:watch` - watches to changes and bakes your site whenever a change is detected
* `jbake:inline` - bakes, watches and serves out content on http://localhost:8820[http://localhost:8820]

Get more details on each goal by running the help goal:

----
$ mvn jbake:help -Ddetail # -DgoalName=[seed|generate|watch|inline]
----

== Gradle Plugin

There is a http://gradle.org/[Gradle] plugin that allows you to run JBake from your Gradle build.
Expand Down
2 changes: 1 addition & 1 deletion content/download.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ JBake artifacts are available from the Maven central repository:
<dependency>
<groupId>org.jbake</groupId>
<artifactId>jbake-core</artifactId>
<version>2.6.7</version>
<version>${jbakeVersion}</version>
</dependency>
----

Expand Down
48 changes: 47 additions & 1 deletion content/news/jbake-v2.7.0-release-candidate.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,53 @@ Jonathan Bullock

We're getting close to the release of JBake v2.7.0, and given the scale of code changes that have been made recently we thought it was prudent to make a release candidate available.

So JBake v2.7.0-rc.2 is now available from https://github.com/jbake-org/jbake/releases[GitHub Releases]
So JBake v2.7.0-rc.5 is now available from https://github.com/jbake-org/jbake/releases[GitHub Releases]

We'd be really grateful if you could try this release candidate out against any JBake sites/projects you have. If you encounter any issues please https://github.com/jbake-org/jbake/issues[let us know] so we can address them prior to the final release of v2.7.0

=== Important changes

==== JBake Maven Plugin (v2.7.0-rc.6 or higher)

The JBake Maven plugin version is now aligns to the JBake version
and includes all optional JBake core dependencies.
Every JBake release now also includes a jbake-maven-plugin release.

This makes it easier to upgrade JBake: no need to align the dependencies any more.
It is now also easy to see which JBake version you're actually using.

Before in `pom.xml`:

----
<plugin>
<groupId>org.jbake</groupId>
<artifactId>jbake-maven-plugin</artifactId>
<version>0.3.5</version><!-- 0.3.5 uses JBake 2.6.7 -->
...
<dependencies>
<dependency>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctorj</artifactId>
<version>2.4.3</version><!-- Adjust when upgrading JBake -->
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.31</version><!-- Adjust when upgrading JBake -->
</dependency>
...
</dependencies>
</plugin>
----

After in `pom.xml`:

----
<plugin>
<groupId>org.jbake</groupId>
<artifactId>jbake-maven-plugin</artifactId>
<version>2.7.0</version><!-- Same as JBake version -->
...
<!-- No need to maintain transitive dependencies -->
</plugin>
----
4 changes: 3 additions & 1 deletion jbake.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
jbakeVersion=2.6.7

template.folder=templates
content.folder=content
asset.folder=assets
Expand All @@ -11,4 +13,4 @@ render.tags=false
tag.path=tags
site.host=http://jbake.org
template.news.file=news.ftl
#db.store=local
#db.store=local