Building WildFly Documentation
Overview
The docs module is not in the module listing of the parent POM by default. Therefore to build you must either activate
the docs profile or be in the docs directory to build the documentation. This documentation assumes you’re in the
docs directory.
You can activate the docs profile from the root directory with either -Pdocs or -Ddocs=true.
Configuring the POM
In the POM there are currently 4 main properties:
-
appservername -
javaee_version -
oracle-javadoc -
wildflyversion
Currently the only property that may need to be changed is the wildflyversion property. This defaults to the property
product.docs.server.version which can be found in the parent POM. It already should be set to the current major
version, but should likely be checked.
Building the documentation
Building the documentation can be done with the following command:
mvn clean packagemvn clean package -Pcopy-siteThe asciidoctor-maven-plugin will execute and generate html5 files. The files are generated in the
target/generated-docs directory. You can optionally activate the copy-site profile to copy the generated site. See
copy site option 2 for more details
Adding the documentation to docs.wildfly.org
Clone wildfly.github.io Repository
The first thing required here is a clone of the https://github.com/wildfly/wildfly.github.io repository. Once cloned it’s likely best to checkout a new branch for to update the documentation.
Copy Site
Copying the site can be done one of two ways:
-
You can manually copy the
target/generated-sitefrom thedocsdirectory of WildFly over to thewildfly.github.iorepository. This should be copied into a version directory. For example16for WildFly 16. -
You can run the build with
mvn clean package -Pcopy-sitewhich by default attempts to copy the site to../../wildfly.github.io/${product.docs.server.version}. This can be overridden with thewildfly.github.io.dirproperty.
Add Copied Content
Once copied you’ll need to add the directory to the git repository; git add ./16 for example.
Edit and Build Index
Next in the wildfly.github.io repository you’ll need to edit the index.adoc and add the newly created directory. We
try to keep the listings in release order with the new release on top.
Once you edit the index.adoc you’ll need to regenerate the index.html file. This can be done with the asciidoctor
command.
asciidoctor index.adocAfter all that is complete you can commit your changes and submit a PR.