Skip to content

Commit

Permalink
jbake-maven-plugin: mention that all optional dependencies are now in…
Browse files Browse the repository at this point in the history
…cluded out of the box
  • Loading branch information
ge0ffrey committed Dec 30, 2021
1 parent 52b7ef4 commit 8ba2515
Showing 1 changed file with 10 additions and 84 deletions.
94 changes: 10 additions & 84 deletions jbake-maven-plugin/README.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@ To use JBake Maven Plugin in your build add the plugin into your pom.xml as show
<plugin>
<groupId>org.jbake</groupId>
<artifactId>jbake-maven-plugin</artifactId>
<version>...</version>
<version>...</version><!-- Same version as JBake -->
<configuration>
<!--
<inputDirectory>${project.basedir}/src/main/resources</inputDirectory>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
-->
<!--<inputDirectory>${project.basedir}/src/main/resources</inputDirectory>-->
<!--<outputDirectory>${project.build.directory}/classes</outputDirectory>-->
</configuration>
<executions>
<execution>
Expand All @@ -46,9 +44,6 @@ To use JBake Maven Plugin in your build add the plugin into your pom.xml as show
</goals>
</execution>
</executions>
<dependencies>
<!-- include required dependencies here, see below -->
</dependencies>
</plugin>
...
</plugins>
Expand All @@ -58,83 +53,14 @@ To use JBake Maven Plugin in your build add the plugin into your pom.xml as show

=== Dependencies

The plugin itself includes all required dependencies such as jbake-core, however you will need to explicitly declare dependencies for
the content formats and template engines used in your project. As these dependencies are marked as optional to reduce bloat.
The plugin automatically includes all optional dependencies of `jbake-core`,
including freemarker, thymeleaf, asciidoctor, flexmark (markdown), etc.
This makes it easy to get started with the plugin.
It also reduces maintenance when upgrading to a new JBake version,
because you don't need to align the versions of freemarker, thymeleaf, asciidoctor, flexmark, etc.

If you have AsciiDoc content you'll need this dependency:

----
<dependency>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctorj</artifactId>
<version>2.4.3</version>
</dependency>
----

If you have Markdown content you'll need these dependencies:

----
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark</artifactId>
<version>0.62.2</version>
</dependency>
<dependency>
<groupId>com.vladsch.flexmark</groupId>
<artifactId>flexmark-profile-pegdown</artifactId>
<version>0.62.2</version>
</dependency>
----

If you have Freemarker templates then you'll need this dependency:

----
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.31</version>
</dependency>
----

If you have Groovy templates then you'll need these dependencies:

----
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
<version>3.0.7</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-templates</artifactId>
<version>3.0.7</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-dateutil</artifactId>
<version>3.0.7</version>
</dependency>
----

If you have Thymeleaf templates then you'll need this dependency:

----
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf</artifactId>
<version>3.0.12.RELEASE</version>
</dependency>
----

If you have Jade4J templates then you'll need this dependency:

----
<dependency>
<groupId>de.neuland-bfi</groupId>
<artifactId>jade4j</artifactId>
<version>1.3.2</version>
</dependency>
----
However, if you want your build to only download the bare minimum it needs,
you can use `<exclusions>` to exclude the dependencies you don't need.

An example of the plugin being used can be found in this project: https://github.com/jonbullock/maven-jbake-site[https://github.com/jonbullock/maven-jbake-site]

Expand Down

0 comments on commit 8ba2515

Please sign in to comment.