To create a new Apache Training project, you’ll need to generate the directory tree of template files. If you’ve built the tools, as described in the getting started doc, you should already have all of the prerequisites to make this work. (So start there.)

Move to the directory where you wish to create your new presentation, and run the following command:

mvn archetype:generate -DarchetypeGroupId=org.apache.training -DarchetypeArtifactId=content-archetype -DarchetypeVersion=1.3.0

For Windows, you need to wrap every argument in double-quotes:

mvn archetype:generate "-DarchetypeGroupId=org.apache.training" "-DarchetypeArtifactId=content-archetype" "-DarchetypeVersion=1.3.0"

This command displays an interactive tool that asks you to provide some basic information about your new presentation

In particular, you’ll need to provide a groupID (to which you should answer org.apache.training if you intend the presentation to eventually be part of the Training.apache.org project, but otherwise this can be whatever you like) and the artifactID, which will be the name of the subdirectory that is created, where your presentation will live.

You can accept the default answers to the remaining questions, by pressing enter at each prompt.

You’ll then be asked to confirm your information, to which you will need to respond Y for yes.

image::mvn-training-create.png

This will create a new directory tree containing your new presentation, along with some sample content to get you started.

The directory tree will look like the following diagram:

asciidoctor diagram process

Editing your new presentation

Most of the content you’ll need to edit when you’re creating your presentation is in src/main/asciidoc and src/main/resources.

By default, index.adoc will contain many examples of what is possible in asciidoctor, and you should spend some time reading through that. You can also consult the asciidoctor presentation documentation for a more comprehensive understanding of the available syntax.

Images should go into src/main/resources/images. And the CSS that will be used is in src/main/theme/apache.css.

Some of the default example files can be removed, and you should remove them if you’re planning to contribute your presentation to the Training project. These include:

  • mermaid-flowchart-test.mmd

  • _b.adoc

  • _a.acoc

  • toddy.jpg ` Those files are provided purely as examples of what is possible.

Building your new presentation

Change into the directory you have created, and run the following command to build the template presentation:

mvn install

If this completes with no errors, there will a new directory target/generated-slides which contains the generated HTML content of your presentation. Open the index.html in that directory in your browser to start the presentation.

Reflow Maven skin by devacfr.