Skip to content

Commit 3527c47

Browse files
authored
feat: adding pom profile to generate docfx yml from javadoc (#213)
* feat: adding pom profile to generate docfx yml from javadoc * fix: update pom path * fix: update path to be less explicit
1 parent f1447d8 commit 3527c47

File tree

2 files changed

+41
-25
lines changed

2 files changed

+41
-25
lines changed

.kokoro/release/common.cfg

+3
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,6 @@ before_action {
4747
}
4848
}
4949
}
50+
51+
# Downloads docfx doclet resource. This will be in ${KOKORO_GFILE_DIR}/<doclet name>
52+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/docfx"

pom.xml

+38-25
Original file line numberDiff line numberDiff line change
@@ -653,48 +653,61 @@
653653
</profile>
654654

655655
<profile>
656-
<!-- NOTE - this profile is still in progress and needs work -->
657656
<id>docFX</id>
658657
<activation>
659658
<property>
659+
<!-- Activate with -P docFX -->
660660
<name>docFX</name>
661661
</property>
662662
</activation>
663-
<build>
663+
<reporting>
664664
<plugins>
665665
<plugin>
666666
<groupId>org.apache.maven.plugins</groupId>
667667
<artifactId>maven-javadoc-plugin</artifactId>
668668
<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>
669+
<reportSets>
670+
<reportSet>
671+
<id>docFX</id>
672+
<reports>
673+
<report>javadoc</report>
674+
<report>aggregate</report>
675+
<report>aggregate-jar</report>
676+
</reports>
677+
</reportSet>
678+
</reportSets>
677679
<configuration>
678680
<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>
691681
<useStandardDocletOptions>false</useStandardDocletOptions>
692-
<additionalOptions>-outputpath ${project.build.directory}/docfx/</additionalOptions>
693-
<!-- Add additional options here when needed -->
682+
<docletPath>${env.KOKORO_GFILE_DIR}/docfx-doclet-1.0-SNAPSHOT-jar-with-dependencies-143274.jar</docletPath>
683+
<additionalOptions>-outputpath ${project.build.directory}/docfx-yml</additionalOptions>
684+
<doclint>none</doclint>
685+
<show>protected</show>
686+
<nohelp>true</nohelp>
687+
<groups>
688+
<group>
689+
<title>Test helpers packages</title>
690+
<packages>com.google.cloud.testing</packages>
691+
</group>
692+
<group>
693+
<title>SPI packages</title>
694+
<packages>com.google.cloud.spi*</packages>
695+
</group>
696+
</groups>
697+
<links>
698+
<link>https://googleapis.dev/java/api-common/</link>
699+
<link>https://googleapis.dev/java/gax/</link>
700+
<link>https://googleapis.dev/java/google-auth-library/</link>
701+
702+
<link>https://developers.google.com/protocol-buffers/docs/reference/java/</link>
703+
<link>https://googleapis.github.io/common-protos-java/apidocs/</link>
704+
<link>https://grpc.io/grpc-java/javadoc/</link>
705+
</links>
694706
</configuration>
707+
695708
</plugin>
696709
</plugins>
697-
</build>
710+
</reporting>
698711
</profile>
699712

700713
<profile>

0 commit comments

Comments
 (0)