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

add an execution to the Antora plugin that runs Antora with Collector enabled #11842

Open
wants to merge 1 commit into
base: jetty-10.0.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
22 changes: 20 additions & 2 deletions documentation/jetty/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,33 @@
This project is the root of the Jetty documentation.
The content files in this project get sourced by the Antora playbook in the playbook repository that builds the website.

In order to build the documentation locally, you first need to prepare a jetty-home directory by running the following command from the top-level folder of the Jetty project:
== Usage

You can choose to do a fast build or a build that includes processing of the jetty block.

=== Fast build

To build the documentation quickly without executing the jetty blocks, there are two steps required.
First, you first need to prepare a jetty-home directory by running the following command from the top-level folder of the Jetty project:

$ mvn install -Dcollector -Pfast -am -pl documentation/jetty

Then you can use the following command from this directory to prepare and run Antora using a preview profile:

$ mvn antora -N

If you don't run the first command, the Antora build will still succeed, but you will get warnings about missing includes for files taken from jetty-home.
If you don't run the first command, the Antora build will still succeed, but you'll get warnings about missing includes for files taken from jetty-home.

=== Build with jetty block

To build the documentation such that the jetty blocks are executed, you only need to run a single command:

$ mvn antora:antora@run-jetty -N

Using this task execution, you don't have to seed the output of collector since it will happen when Antora runs.
This task execution also fulfills the prerequisite for a fast build, so now you can run `mvn antora -N`.

== How it works

The `antora:antora` goal, which the `antora` lifecycle invokes, takes advantage of the playbook provider feature so the playbook for this branch can be centrally managed in the playbook repository.

Expand Down
11 changes: 11 additions & 0 deletions documentation/jetty/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@
<path>main:lib/playbook-templates/per-branch-antora-playbook.yml</path>
</playbookProvider>
</configuration>
<executions>
<execution>
<id>run-jetty</id>
<configuration>
<options>
<option>extension[] @antora/collector-extension</option>
<option>stacktrace</option>
</options>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expand Down
Loading