Skip to content

Commit

Permalink
Merge pull request #4182 from jamezp/update-documentation
Browse files Browse the repository at this point in the history
[RESTEASY-3066] Migrate documentation from docbook to asciidoc.
  • Loading branch information
jamezp committed May 17, 2024
2 parents 54ca960 + 858ebb4 commit 7712b17
Show file tree
Hide file tree
Showing 128 changed files with 14,305 additions and 18,143 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/distribution-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# This workflow will build a Java project with Maven
# For more information see: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions

name: Build Documentation and Distribution

on:
push:
branches:
- 'main'
pull_request:
branches:
- '**'
paths:
- '.github/workflows/distribution-build.yml'
- 'docbook/**'
- 'distribution/**'

# Only run the latest job
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:

build-doc-dist:
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'
- name: Build Documentation and Distribution
run: |
mvn -B -ntp clean install site -DskipTests -Prelease -Pjboss-release
2 changes: 2 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on:
- '.github/workflows/maven.yml'
- '**/pom.xml'
- 'providers/**'
- '!docbook/pom.xml'
- '!distribution/pom.xml'
- 'resteasy-cdi/**'
- 'resteasy-client/**'
- 'resteasy-client-api/**'
Expand Down
2 changes: 1 addition & 1 deletion distribution/assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<outputDirectory>docs/javadocs</outputDirectory>
</fileSet>
<fileSet>
<directory>../docbook/target/docbook/publish/en-US</directory>
<directory>../docbook/target/generated-docs/</directory>
<outputDirectory>docs/userguide</outputDirectory>
</fileSet>
</fileSets>
Expand Down
1 change: 1 addition & 0 deletions distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs-all</artifactId>
<version>7.0.0.Alpha2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>resteasy-dist</artifactId>
Expand Down
156 changes: 53 additions & 103 deletions docbook/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,53 +4,17 @@

<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>dev.resteasy.tools</groupId>
<artifactId>resteasy-parent</artifactId>
<version>2.0.4.Final</version>
<relativePath/>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs-all</artifactId>
<version>7.0.0.Alpha2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-reference-guide</artifactId>
<version>7.0.0.Alpha2-SNAPSHOT</version>
<packaging>jdocbook</packaging>
<packaging>pom</packaging>
<name>RESTEasy Reference Guide</name>
<description/>

<url>https://resteasy.dev</url>

<licenses>
<license>
<name>Apache License 2.0</name>
<url>https://repository.jboss.org/licenses/apache-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>

<scm>
<connection>scm:git:git://github.com/resteasy/resteasy.git</connection>
<developerConnection>scm:git:git@github.com:resteasy/resteasy.git</developerConnection>
<url>https://github.com/resteasy/resteasy/tree/main/</url>
</scm>

<issueManagement>
<system>JIRA</system>
<url>https://issues.redhat.com/browse/RESTEASY</url>
</issueManagement>

<repositories>
<repository>
<id>jboss</id>
<url>https://repository.jboss.org/nexus/content/groups/public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>jboss</id>
<url>https://repository.jboss.org/nexus/content/groups/public/</url>
</pluginRepository>
</pluginRepositories>

<build>
<plugins>
<plugin>
Expand All @@ -66,74 +30,60 @@
</configuration>
</plugin>
<plugin>
<groupId>org.jboss.maven.plugins</groupId>
<artifactId>maven-jdocbook-plugin</artifactId>
<version>2.3.9</version>
<extensions>true</extensions>

<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId>
<version>3.0.0</version>
<dependencies>
<dependency>
<groupId>org.jboss.pressgang</groupId>
<artifactId>pressgang-xslt-ns</artifactId>
<version>3.1.4</version>
</dependency>
<dependency>
<groupId>org.jboss.pressgang</groupId>
<artifactId>pressgang-jdocbook-style</artifactId>
<type>jdocbook-style</type>
<version>3.1.4</version>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoctorj-pdf</artifactId>
<version>2.3.15</version>
</dependency>
</dependencies>

<configuration>
<sourceDocumentName>master.xml</sourceDocumentName>
<masterTranslation>en-US</masterTranslation>
<sourceDirectory>${project.basedir}/reference/en</sourceDirectory>
<imageResource>
<directory>${project.basedir}/reference/en</directory>
<includes>
<include>images/*</include>
</includes>
</imageResource>
<formats>
<format>
<formatName>html_single</formatName>
<stylesheetResource>classpath:/xslt/org/jboss/pressgang/xhtml-single.xsl</stylesheetResource>
<finalName>index.html</finalName>
<!-- <profilingTypeName>two_pass</profilingTypeName> -->
</format>
<format>
<formatName>html</formatName>
<stylesheetResource>classpath:/xslt/org/jboss/pressgang/xhtml.xsl</stylesheetResource>
<finalName>index.html</finalName>
<!-- <profilingTypeName>two_pass</profilingTypeName> -->
</format>
<format>
<formatName>pdf</formatName>
<stylesheetResource>classpath:/xslt/org/jboss/pressgang/pdf.xsl</stylesheetResource>
<finalName>${project.artifactId}.pdf</finalName>
</format>
<!--<format>-->
<!--<formatName>eclipse</formatName>-->
<!--<stylesheetResource>classpath:/xslt/org/jboss/eclipse.xsl</stylesheetResource>-->
<!--<finalName>${project.artifactId}.html</finalName>-->
<!--</format>-->
</formats>
<injections>
<injection>
<name>project.version</name>
<value>${project.version}</value>
</injection>
</injections>
<options>
<xmlTransformerType>saxon</xmlTransformerType>
<xincludeSupported>true</xincludeSupported>
<useRelativeImageUris>true</useRelativeImageUris>
<!-- TODO Probably obsolete after the upgrade to maven-jdocbook-plugin 2.3.0 -->
<docbookVersion>1.72.0</docbookVersion>
<!-- <localeSeparator>-</localeSeparator> -->
</options>
<attributes>
<!-- Attributes to use in the asciidoc source files. Please leave in alphabetical order -->
<channel-stream-version>${channel.stream.version}</channel-stream-version>
<resteasy-version>${project.version}</resteasy-version>

<linkcss>false</linkcss>
</attributes>
<!-- We only want to process the index as it includes the other documents -->
<sourceDocumentName>index.adoc</sourceDocumentName>
<resources>
<resource>
<directory>${project.basedir}/src/main/asciidoc/images</directory>
<targetPath>images</targetPath>
</resource>
</resources>
</configuration>
<executions>
<execution>
<id>output-html</id>
<phase>package</phase>
<goals>
<goal>process-asciidoc</goal>
</goals>
<configuration>
<backend>html5</backend>
</configuration>
</execution>
<execution>
<id>output-pdf</id>
<phase>package</phase>
<goals>
<goal>process-asciidoc</goal>
</goals>
<configuration>
<attributes>
<title>RESTEasy</title>
</attributes>
<backend>pdf</backend>
<!-- Rename the PDF -->
<outputFile>resteasy-reference-guide.pdf</outputFile>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expand Down

0 comments on commit 7712b17

Please sign in to comment.