Introduction

The JBake Project NetBeans plugin supports the JBake WebSite builder.

It provides basic Netbeans Project support for a site being built by JBake. This includes:

  • Identification of JBake projects - by the presence of a jbake.properties file at the root level of the project.

  • Capability to run the JBake executable from within NetBeans. This is provided as a project node action.

  • Additional executables or scripts may be added as project node actions, allowing commands to be defined at the project level (using the __projectactions.properties file to define these).

No features of JBake are thought to be masked by this plug-in.

Caution
The predefined project node actions are limited to Unix family systems (i.e. Linix and MacOS). No Windows implementation have yet been completed. This does not stop a user attempting to use the additional CLI actions capability to execute the JBake -b command, but the built-in Bake action may not work with Windows.

JBake NB-Plugin by Example

The basic project structure

The basic project structure that is recognised by this plug-in is that generated by jbake -i.

basic project structure

The basic project nodeactions

The project includes an action to use jbake -b command to build the site. This appears in the project node’s popup actions as "Bake".

basic project actions

The output and error streams of the command is routed to the NetBeans Output Window, while the generated website is created in the output folder.

basic project structure

The projectactions.properties file

The projectactions.properties file is used to add further CLI commands to the project actions.

project structure with projectactions

The projectactions file structue is defined in the ActionsSupport documentation, but a basic example is show here. The file defines an additional action to be added which starts jwebserver (to enable viewing of the generated website).

1.label = Start project test webserver
1.command = jwebserver
1.commandargs = -d ${NODEPATH}/output/
1.tabname = Test Webserver for TRP-website
1.killcommand = q
1.cleartab = every execution
COMMANDCOUNT = 1

The resulting project actions is added to the project node’s popup actions as "Test Webserver for TRP-website".

project actions with projectactions

Using the JBake NBM

Adding the NBM to NetBeans

To be able to use the Plugin it must be downloaded and then installed in Netbeans.

Releases of this product are stored in a Maven repository on GitHub. It is possible to download an NBM from Packages.

Once you have a downloaded copy on your machine, you follow the standard NetBeans process to install the downloaded file (Tools>Plugins)

The ActionsSupport NBM must also be installed with or prior to installing this NBM.

  • Releases are stored in a Packages Maven repository on GitHub

  • Source Code is stored in a Git repository on GitHub as part of a monorepro containing NBMs.

  • Documentation can be found on the TRP website.

  • Documentation source is stored in a Git repository on GitHub as part of a monorepro containing documentation.

  • Development Process Guide for The-Retired-Programmer products can be found on the TRP website.