Skip to content

Commit 34712af

Browse files
authored
docs: Latest for Cloud-RAD (#199)
* Latest for Cloud-RAD * Initial try at DocFX (still in progress) * send correct paths to Javadoc / docLava * Simplify AntRun processing * chore(docs): Fix code review problems * Make sure google-java-format version is 1.7 * Add comment to use of SNAPSHOT
1 parent 0cf9c25 commit 34712af

File tree

1 file changed

+71
-19
lines changed

1 file changed

+71
-19
lines changed

pom.xml

+71-19
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version='1.0' encoding='UTF-8'?>
2-
<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">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
35
<modelVersion>4.0.0</modelVersion>
46
<groupId>com.google.cloud</groupId>
57
<artifactId>google-cloud-shared-config</artifactId>
@@ -26,7 +28,8 @@
2628
</organization>
2729
<scm>
2830
<connection>scm:git:git@github.com:googleapis/java-shared-config.git</connection>
29-
<developerConnection>scm:git:git@github.com:googleapis/java-shared-config.git</developerConnection>
31+
<developerConnection>scm:git:git@github.com:googleapis/java-shared-config.git
32+
</developerConnection>
3033
<url>https://github.com/googleapis/java-shared-config</url>
3134
<tag>HEAD</tag>
3235
</scm>
@@ -195,7 +198,8 @@
195198
<version>3.1.2</version>
196199
<configuration>
197200
<ignoredUnusedDeclaredDependencies>
198-
<ignoredUnusedDeclaredDependency>javax.annotation:javax.annotation-api</ignoredUnusedDeclaredDependency>
201+
<ignoredUnusedDeclaredDependency>javax.annotation:javax.annotation-api
202+
</ignoredUnusedDeclaredDependency>
199203
</ignoredUnusedDeclaredDependencies>
200204
</configuration>
201205
</plugin>
@@ -640,12 +644,59 @@
640644
</plugins>
641645
</build>
642646
</profile>
647+
643648
<profile>
644649
<id>enable-integration-tests</id>
645650
<properties>
646651
<skipITs>false</skipITs>
647652
</properties>
648653
</profile>
654+
655+
<profile>
656+
<!-- NOTE - this profile is still in progress and needs work -->
657+
<id>docFX</id>
658+
<activation>
659+
<property>
660+
<name>docFX</name>
661+
</property>
662+
</activation>
663+
<build>
664+
<plugins>
665+
<plugin>
666+
<groupId>org.apache.maven.plugins</groupId>
667+
<artifactId>maven-javadoc-plugin</artifactId>
668+
<version>3.2.0</version>
669+
<executions>
670+
<execution>
671+
<phase>site</phase>
672+
<goals>
673+
<goal>aggregate</goal>
674+
</goals>
675+
</execution>
676+
</executions>
677+
<configuration>
678+
<doclet>com.microsoft.doclet.DocFxDoclet</doclet>
679+
<docletArtifact>
680+
<groupId>com.microsoft</groupId>
681+
<artifactId>docfx-doclet</artifactId>
682+
<version>1.0-SNAPSHOT</version><!-- this is temporary - NO PRODUCTION USE -->
683+
</docletArtifact>
684+
<additionalDependencies>
685+
<additionalDependency>
686+
<groupId>com.google.j2objc</groupId>
687+
<artifactId>j2objc-annotations</artifactId>
688+
<version>1.3</version>
689+
</additionalDependency>
690+
</additionalDependencies>
691+
<useStandardDocletOptions>false</useStandardDocletOptions>
692+
<additionalOptions>-outputpath ${project.build.directory}/docfx/</additionalOptions>
693+
<!-- Add additional options here when needed -->
694+
</configuration>
695+
</plugin>
696+
</plugins>
697+
</build>
698+
</profile>
699+
649700
<profile>
650701
<id>devsite-apidocs</id>
651702
<activation>
@@ -656,6 +707,8 @@
656707
</activation>
657708
<build>
658709
<plugins>
710+
<!-- WARNING - JavaDoc / DocLava must be run using Java 8 and nothing higher
711+
AntRun version must be the correct version or the syntax below is incorrect! -->
659712
<plugin>
660713
<!-- Generate API docs using Doclava for the developer site. -->
661714
<artifactId>maven-javadoc-plugin</artifactId>
@@ -693,13 +746,13 @@
693746
<additionalOption>/java/_project.yaml</additionalOption>
694747
<additionalOption>-hdf</additionalOption>
695748
<additionalOption>devsite.path</additionalOption>
696-
<additionalOption>${docRoot}</additionalOption>
749+
<additionalOption>${docRoot}${env.NAME}/latest/</additionalOption>
697750
<additionalOption>-d</additionalOption>
698751
<additionalOption>${project.build.directory}/devsite</additionalOption>
699752
<additionalOption>-templatedir</additionalOption>
700753
<additionalOption>${devsite.template}</additionalOption>
701754
<additionalOption>-toroot</additionalOption>
702-
<additionalOption>${docRoot}</additionalOption>
755+
<additionalOption>${docRoot}${env.NAME}/latest/</additionalOption>
703756
<additionalOption>-yaml</additionalOption>
704757
<additionalOption>_toc.yaml</additionalOption>
705758
<additionalOption>-warning</additionalOption>
@@ -711,7 +764,7 @@
711764
<plugin>
712765
<!-- Clean up some references and files. -->
713766
<artifactId>maven-antrun-plugin</artifactId>
714-
<version>1.8</version>
767+
<version>3.0.0</version>
715768
<executions>
716769
<execution>
717770
<phase>site</phase>
@@ -720,19 +773,18 @@
720773
</goals>
721774
<configuration>
722775
<target>
723-
<echo message="Updating relative links in API docs" />
724-
<!-- TODO: What is the right behavior for io* and google*? -->
725-
<replace dir="${project.build.directory}/devsite" token="href=&quot;com" value="href=&quot;${docRoot}com" />
726-
<replace dir="${project.build.directory}/devsite" token="href=&quot;io" value="href=&quot;${docRoot}io" />
727-
<replace dir="${project.build.directory}/devsite" token="href=&quot;google" value="href=&quot;${docRoot}google" />
728-
<copy file="${project.build.directory}/devsite/assets/_toc.yaml" todir="${project.build.directory}/devsite/reference" />
729-
<echo message="Removing files not needed by Devsite" />
730-
<delete file="${project.build.directory}/devsite/reference/classes.html" />
731-
<delete file="${project.build.directory}/devsite/reference/hierarchy.html" />
732-
<delete file="${project.build.directory}/devsite/reference/index.html" />
733-
<delete file="${project.build.directory}/devsite/reference/lists.js" />
734-
<delete file="${project.build.directory}/devsite/reference/packages.html" />
735-
<delete file="${project.build.directory}/devsite/reference/current.xml" />
776+
<echo message="Removing files not needed by CloudSite / DevSite"/>
777+
<delete file="${project.build.directory}/devsite/reference/classes.html"/>
778+
<delete file="${project.build.directory}/devsite/reference/index.html"/>
779+
<delete file="${project.build.directory}/devsite/reference/packages.html"/>
780+
<delete file="${project.build.directory}/devsite/reference/hierarchy.html"/>
781+
<delete file="${project.build.directory}/devsite/reference/lists.js"/>
782+
<delete file="${project.build.directory}/devsite/reference/current.xml"/>
783+
784+
<echo message="duplicating _toc.yaml" />
785+
<copy
786+
file="${project.build.directory}/devsite/assets/_toc.yaml"
787+
todir="${project.build.directory}/devsite/reference" />
736788
</target>
737789
</configuration>
738790
</execution>

0 commit comments

Comments
 (0)