asciidoctor / asciidoclet

:clipboard: A Javadoc Doclet based on Asciidoctor that lets you write Javadoc in the AsciiDoc syntax.
https://github.com/asciidoctor/asciidoclet
Apache License 2.0
133 stars 40 forks source link

includes of test-source files #25

Closed chrisvest closed 10 years ago

chrisvest commented 10 years ago

It looks like the include::some-file.txt[] macro only works for files that I make javadoc copy over into the target/site/apidocs/ directory, which would be stuff in the src/main/javadoc/resources/**/doc-files directories. And then only if I explicitly enable this with by adding a <docfilessubdirs>true</docfilessubdirs> configuration to the maven-javadoc-plugin plugin in my pom.xml file.

It would be really helpful if at least the test-sources directory became available to include from, because then the example code I include will be checked by the compiler on build.

johncarl81 commented 10 years ago

Maybe this should be called out better, but to include files in other directories you need to specify the -include-basedir parameter. For instance: https://github.com/asciidoctor/asciidoclet/blob/master/pom.xml#L124

Let me know if this works for you.

chrisvest commented 10 years ago

Yes, that works. Thanks.