Added a script to generate docs
This commit is contained in:
46
docs/pom.xml
46
docs/pom.xml
@@ -15,6 +15,7 @@
|
||||
<properties>
|
||||
<docs.main>spring-cloud-contract</docs.main>
|
||||
<main.basedir>${basedir}/..</main.basedir>
|
||||
<maven.plugin.plugin.version>3.4</maven.plugin.plugin.version>
|
||||
</properties>
|
||||
<build>
|
||||
<plugins>
|
||||
@@ -46,51 +47,6 @@
|
||||
<artifactId>build-helper-maven-plugin</artifactId>
|
||||
<inherited>false</inherited>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-site-plugin</artifactId>
|
||||
<configuration>
|
||||
<siteDirectory>${main.basedir}/spring-cloud-contract-verifier-maven-plugin/src/site/</siteDirectory>
|
||||
<outputDirectory>${build.directory}/generated-docs/spring-cloud-contract-verifier-maven-plugin</outputDirectory>>
|
||||
<stagingDirectory>${build.directory}/staging/fake/directory</stagingDirectory>
|
||||
<skipDeploy>true</skipDeploy><!-- don't deploy site with maven-site-plugin -->
|
||||
<!-- disable generateReports if you don't want to include the built-in reports -->
|
||||
<generateReports>true</generateReports>
|
||||
<generateSitemap>true</generateSitemap>
|
||||
<relativizeDecorationLinks>false</relativizeDecorationLinks>
|
||||
<locales>en</locales>
|
||||
<inputEncoding>UTF-8</inputEncoding>
|
||||
<outputEncoding>UTF-8</outputEncoding>
|
||||
<asciidoc>
|
||||
<!-- optional site-wide AsciiDoc attributes -->
|
||||
<attributes>
|
||||
<icons>font</icons>
|
||||
<source-highlighter>coderay</source-highlighter>
|
||||
<coderay-css>style</coderay-css>
|
||||
<toclevels>2</toclevels>
|
||||
<docinfo>true</docinfo>
|
||||
<allow-uri-read>true</allow-uri-read>
|
||||
</attributes>
|
||||
</asciidoc>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generate-site</id>
|
||||
<phase>process-resources</phase>
|
||||
<goals>
|
||||
<goal>site</goal>
|
||||
<goal>stage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.asciidoctor</groupId>
|
||||
<artifactId>asciidoctor-maven-plugin</artifactId>
|
||||
<version>1.5.3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
20
scripts/generateDocs.sh
Executable file
20
scripts/generateDocs.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -o errexit
|
||||
|
||||
ROOT_FOLDER=`pwd`
|
||||
echo "Current folder is $ROOT_FOLDER"
|
||||
|
||||
if [[ ! -e "${ROOT_FOLDER}/.git" ]]; then
|
||||
cd ..
|
||||
ROOT_FOLDER=`pwd`
|
||||
fi
|
||||
|
||||
echo "Building main docs"
|
||||
./mvnw clean install -P docs -DskipTests=true --pl docs
|
||||
|
||||
echo "Building maven plugin docs"
|
||||
./mvnw site site:stage -DskipTests=true --pl spring-cloud-contract-verifier-maven-plugin
|
||||
|
||||
echo "Copying generated maven plugin docs to main docs"
|
||||
cp -r spring-cloud-contract-verifier-maven-plugin/target/site docs/target/generated-docs/spring-cloud-contract-verifier-maven-plugin
|
||||
@@ -178,6 +178,7 @@
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-site-plugin</artifactId>
|
||||
<version>3.4</version>
|
||||
<configuration>
|
||||
<skipDeploy>true</skipDeploy><!-- don't deploy site with maven-site-plugin -->
|
||||
<!-- disable generateReports if you don't want to include the built-in reports -->
|
||||
@@ -221,9 +222,39 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-plugin-plugin</artifactId>
|
||||
<version>${maven.plugin.plugin.version}</version><!--$NO-MVN-MAN-VER$-->
|
||||
<configuration>
|
||||
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generated-helpmojo</id>
|
||||
<goals>
|
||||
<goal>helpmojo</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
<execution>
|
||||
<id>generate-descriptor</id>
|
||||
<goals>
|
||||
<goal>descriptor</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<reporting>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-plugin-plugin</artifactId>
|
||||
<version>${maven.plugin.plugin.version}</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</reporting>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud.contract</groupId>
|
||||
|
||||
Reference in New Issue
Block a user