Update database-api to follow OpenStack conventions

Update pom.xml for building the database-api document to follow the
conventions used by the OpenStack documentation team:
* Remove "review" from published guide
* Disable Disqus
* Use latest clouddocs-maven-plugin (2.0.2)
* Fix canonicalURL so that it points to the current location
* Fix formatting and whitespace of file

Remove hardcoded publication date from cdb-devguide, this gets
generated at build time.

Update doc-test.conf for pom.xml change.

Change-Id: I90eb16917edbb99d99147c4a8116f5bcf28e6975
This commit is contained in:
Andreas Jaeger 2014-05-22 21:24:17 +02:00
parent 4916c2ce76
commit 023c4b8448
3 changed files with 135 additions and 135 deletions

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.rackspace.cloud.dbaas</groupId>
@ -22,148 +23,147 @@
<build>
<plugins>
<plugin>
<groupId>com.rackspace.cloud.api</groupId>
<artifactId>clouddocs-maven-plugin</artifactId>
<!-- this <version> relates only to the *plugin* used for document formatting -->
<!-- the version of the *API* that is the subject of the document is indicated within each document -->
<version>1.15.0</version>
<executions>
<execution>
<id>cdb-devguide</id>
<goals>
<goal>generate-webhelp</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<security>reviewer</security>
<sourceDirectory>src</sourceDirectory>
<highlightSource>false</highlightSource>
<trimWadlUriCount>2</trimWadlUriCount>
<!-- this is the public-facing client developer guide formerly known as PublicAPISpec.xml -->
<!-- this document that will be published as cdb-devguide-latest.pdf at http://docs.rackspacecloud.com/api/ -->
<enableDisqus>1</enableDisqus>
<googleAnalyticsId>UA-23102455-4</googleAnalyticsId>
<includes>cdb-devguide.xml</includes>
<canonicalUrlBase>http://docs.rackspace.com/cdb/api/v1.0/cdb-devguide/content</canonicalUrlBase>
<feedbackEmail>mike.asthalter@rackspace.com</feedbackEmail>
</configuration>
</execution>
</executions>
<configuration>
<socialIcons>1</socialIcons>
<feedbackEmail>mike.asthalter@rackspace.com</feedbackEmail>
<branding>openstack</branding>
<!-- <failOnValidationError>false</failOnValidationError> -->
</configuration>
<groupId>com.rackspace.cloud.api</groupId>
<artifactId>clouddocs-maven-plugin</artifactId>
<!-- This <version> relates only to the *plugin* used for
document formatting. -->
<!-- The version of the *API* that is the subject of the
document is indicated within each document. -->
<version>2.0.2</version>
<executions>
<execution>
<id>cdb-devguide</id>
<goals>
<goal>generate-webhelp</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<sourceDirectory>src</sourceDirectory>
<highlightSource>false</highlightSource>
<trimWadlUriCount>2</trimWadlUriCount>
<!-- this is the public-facing client developer guide formerly known as PublicAPISpec.xml -->
<!-- this document that will be published as cdb-devguide-latest.pdf at http://docs.rackspacecloud.com/api/ -->
<enableDisqus>0</enableDisqus>
<googleAnalyticsId>UA-23102455-4</googleAnalyticsId>
<includes>cdb-devguide.xml</includes>
<canonicalUrlBase>http://docs.openstack.org/api/openstack-database/content</canonicalUrlBase>
<feedbackEmail>mike.asthalter@rackspace.com</feedbackEmail>
</configuration>
</execution>
</executions>
<configuration>
<socialIcons>1</socialIcons>
<feedbackEmail>mike.asthalter@rackspace.com</feedbackEmail>
<branding>openstack</branding>
<!-- <failOnValidationError>false</failOnValidationError> -->
</configuration>
</plugin>
<!-- Unpack the wadl normalization xslts -->
<!-- Unpack the wadl normalization xslts -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-shared-resources</id>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<outputDirectory>${project.build.directory}/generated-resources</outputDirectory>
<includeGroupIds>com.rackspace.cloud.api</includeGroupIds>
<includeArtifactIds>wadl-tools</includeArtifactIds>
<excludeTransitive>true</excludeTransitive>
<includes>**/xsl/*.xsl</includes>
</configuration>
</execution>
<execution>
<id>unpack-shared-resources</id>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<outputDirectory>${project.build.directory}/generated-resources</outputDirectory>
<includeGroupIds>com.rackspace.cloud.api</includeGroupIds>
<includeArtifactIds>wadl-tools</includeArtifactIds>
<excludeTransitive>true</excludeTransitive>
<includes>**/xsl/*.xsl</includes>
</configuration>
</execution>
</executions>
</plugin>
</plugin>
<!-- Normalize the dbaas wadl -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>ant</id>
<phase>generate-sources</phase>
<configuration>
<target>
<copy todir="${project.build.directory}/generated-resources/normalized/api/v1.0">
<fileset dir="src">
<include name="xslts/**"/>
</fileset>
<fileset dir="src">
<include name="samples/**"/>
</fileset>
</copy>
<copy file="src/xsd/dbaas.xsd" tofile="${project.build.directory}/generated-resources/normalized/api/v1.0/xsd/cdb.xsd"/>
<copy file="src/xsd/dbaas.xsd" tofile="${project.build.directory}/generated-resources/normalized/api/v1.0/cdb.xsd"/>
<java
jar="${net.sourceforge.saxon:saxon:jar}"
fork="true">
<arg value="-u"/>
<arg value="-s:src/xsd/dbaas.wadl"/>
<arg value="-xsl:${project.build.directory}/generated-resources/xsl/normalizeWadl.xsl"/>
<arg value="-o:${project.build.directory}/generated-resources/normalized/api/v1.0/cdb.wadl"/>
<arg value="flattenXsds=false"/>
</java>
<replaceregexp file="${project.build.directory}/generated-resources/normalized/api/v1.0/cdb.wadl"
match="file:/.*/src/xsd/dbaas.xsd"
replace="xsd/cdb.xsd"/>
<war destfile="${project.build.directory}/docbkx/webhelp/cdb-wadls.war" needxmlfile="false">
<fileset dir="${project.build.directory}/generated-resources/normalized"/>
</war>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>ant</id>
<phase>generate-sources</phase>
<configuration>
<target>
<copy todir="${project.build.directory}/generated-resources/normalized/api/v1.0">
<fileset dir="src">
<include name="xslts/**"/>
</fileset>
<fileset dir="src">
<include name="samples/**"/>
</fileset>
</copy>
<copy file="src/xsd/dbaas.xsd" tofile="${project.build.directory}/generated-resources/normalized/api/v1.0/xsd/cdb.xsd"/>
<copy file="src/xsd/dbaas.xsd" tofile="${project.build.directory}/generated-resources/normalized/api/v1.0/cdb.xsd"/>
<java
jar="${net.sourceforge.saxon:saxon:jar}"
fork="true">
<arg value="-u"/>
<arg value="-s:src/xsd/dbaas.wadl"/>
<arg value="-xsl:${project.build.directory}/generated-resources/xsl/normalizeWadl.xsl"/>
<arg value="-o:${project.build.directory}/generated-resources/normalized/api/v1.0/cdb.wadl"/>
<arg value="flattenXsds=false"/>
</java>
<replaceregexp file="${project.build.directory}/generated-resources/normalized/api/v1.0/cdb.wadl"
match="file:/.*/src/xsd/dbaas.xsd"
replace="xsd/cdb.xsd"/>
<war destfile="${project.build.directory}/docbkx/webhelp/cdb-wadls.war" needxmlfile="false">
<fileset dir="${project.build.directory}/generated-resources/normalized"/>
</war>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.3</version>
<configuration>
<descriptors>
<descriptor>includewars.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>assembly</id>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.3</version>
<configuration>
<descriptors>
<descriptor>includewars.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>assembly</id>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>Rackspace Research Repositories</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>rackspace-research</id>
<name>Rackspace Research Repository</name>
<url>http://maven.research.rackspacecloud.com/content/groups/public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>rackspace-research</id>
<name>Rackspace Research Repository</name>
<url>http://maven.research.rackspacecloud.com/content/groups/public/</url>
</pluginRepository>
</pluginRepositories>
</profile>
<profiles>
<profile>
<id>Rackspace Research Repositories</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>rackspace-research</id>
<name>Rackspace Research Repository</name>
<url>http://maven.research.rackspacecloud.com/content/groups/public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>rackspace-research</id>
<name>Rackspace Research Repository</name>
<url>http://maven.research.rackspacecloud.com/content/groups/public/</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</project>

View File

@ -62,7 +62,7 @@
</copyright>
<releaseinfo>API v1.0</releaseinfo>
<productname>OpenStack Cloud Databases</productname>
<pubdate>2013-05-02</pubdate>
<pubdate/>
<legalnotice role="apache2">
<annotation>
<remark>Copyright details are filled in by the

View File

@ -7,5 +7,5 @@ file_exception = includewars.xml
# These two options need to come as triplets:
book = apidocs
target_dir = target/docbkx/webhelp/cdb-devguide-reviewer
target_dir = target/docbkx/webhelp/cdb-devguide-external
publish_dir = api/openstack-databases