Welcome Gunnar,
Glad to hear another project is considering Asciidoctor :)
Now, about your issue, here's a simple approach that does the work:
1· Copy the extension ruby file to yout project. For instance, into `src/gems`
2· Add the ruby extension as a required gem using the `<requires>` block. The paths can be tricky here, the dot at teh beginning is important.
3· Add the attribute `google-analytics-account` required by the extension in the `<attributes>` section.
4· run `mvn generate-resoures` and enjoy.
Here it is a full example:
jruby-comple and asciidoctorj dependencies are optional
<plugin>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<version>${asciidoctor.maven.plugin.version}</version>
<dependencies>
<dependency>
<groupId>org.jruby</groupId>
<artifactId>jruby-complete</artifactId>
<version>${jruby.version}</version>
</dependency>
<dependency>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctorj</artifactId>
<version>${asciidoctorj.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>asciidoc-to-html</id>
<phase>generate-resources</phase>
<goals>
<goal>process-asciidoc</goal>
</goals>
<configuration>
<backend>html5</backend>
<sourceDirectory>src/docs/asciidoc</sourceDirectory>
<requires>
<require>./src/gems/google-analytics-postprocessor.rb</require>
</requires>
<attributes>
<google-analytics-account>MY_GOOGLE_ID</google-analytics-account>
</attributes>
</configuration>
</execution>
</executions>
</plugin>