vert-x3 / vertx-docgen Goto Github PK
View Code? Open in Web Editor NEWDocumentation generation
License: Apache License 2.0
Documentation generation
License: Apache License 2.0
The following doc snippet:
* Vert.x core tools monitoring: TCP/HTTP client and servers, {@link io.vertx.core.datagram.DatagramSocket},
{@link io.vertx.core.eventbus.EventBus} and pools
Turns into:
* Vert.x core tools monitoring: TCP/HTTP client and servers, `link:../../apidocs/io/vertx/core/datagram/DatagramSocket.html[DatagramSocket]`,
`link:../../apidocs/io/vertx/core/eventbus/EventBus.html[EventBus]`and pools
Notice the missing space before and pools
. It causes link to not be properly displayed in renderers.
Suppose I have a ex1
example method to be generated in doc
@Source
public class Examples {
public void ex1() {
// comment1
/**
* comment1
*/
/*
comment1
*/
System.out.println("Hello,World!");
// comment2
System.out.println("Hello,World!");
}
}
comment1 will be ignored to be generated in doc, comment2 will be generated in doc correctly.
Any comment(line or block comments) before the first appearing code in method will be ignored by the generator. This problem only occurs in Java.
an asciidoc file is processed, the {@link }
inside are processed like in a package doc.
When docgen needs to create a link for a method containing an annotated parameter, it cannot use toString
as the output is not the expected link. It needs to extract the unannotated type and call toString
on this type.
This is related to https://github.com/vert-x3/vert-x3.github.io/pull/5
From @fbricon on October 7, 2016 14:13
Opening the vertx-web javadoc shows badly formatted doc. This is caused by the javadoc being initially written in asciidoc, but not properly rendered to HTML.
I haven't checked but that probably affects other vertx projects.
Open vertx-web-3.3.3-javadoc.jar, look for io/vertx/ext/web/package-summary.html
Copied from original issue: vert-x3/vertx-web#464
I am currently working on the Scala-Docs and ran into an issue.
Luckily it also manifests in other generated docs :)
Take a look at:
http://vertx.io/docs/vertx-core/ceylon/#_reading_from_a_buffer
The code-example contains a 4 at the very end.
This is printed instead of the increment operation that is supposed to go there.
I see the same when implementing forLoop in ScalaCodeBuilder.and doing update.render(renderer)
It cannot be supported anymore because of #38
It seems that docgen hardwires the relative path for links from asciidoc content generated from javadoc comments in package-info
files to the language-specific api documentation.
For Java API documentation, those links are hardwired to:
../../apidocs
...and for Javascript, these paths are:
../dataobjects.html
../enums.html
../jsdoc
Is there a way to parameterize these paths?
Post-processors can modify the content on the asciidoc before its written on disk.
The syntax is:
[post-processor-name, arg1, arg2]
----
The post-processed content
----
It could be implemented directly with Asciidoctor but post processors may need access to the DocGen processor so, it makes more sense to add it inside docgen.
Hi,
All java source files are without license headers.
Please, confirm the licensing of code and/or content/s, and add license headers
Thanks in advance
Regards
Vertx codegen/codetrans seem to be advancing with the rest of the vertx libs for each release, but the latest release of docgen I can find is 3.5.1. Is that correct? Is this library still active? We're using it for documenting our internal polyglot api's.
If I write this:
[source,java]
----
{@link cookbook.microservices.first.step01.FirstMicroService}
----
I get only the source code of the class, but I would like to display the needed packages too
Which version(s) did you encounter this bug ?
0.9.4
I ran the unit tests and got this output:
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------< io.vertx:vertx-docgen >------------------------
[INFO] Building vertx-docgen 0.9.4
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The artifact org.apache.maven.plugins:maven-resources-plugin:jar:2.6 has been relocated to org.apache.maven.plugins:maven-resources-plugin:jar:3.3.0
[WARNING] The artifact org.apache.maven.plugins:maven-compiler-plugin:jar:3.1 has been relocated to org.apache.maven.plugins:maven-compiler-plugin:jar:3.10.1
[WARNING] The artifact org.apache.maven.plugins:maven-surefire-plugin:jar:2.12.4 has been relocated to org.apache.maven.plugins:maven-surefire-plugin:jar:2.22.3
[INFO]
[INFO] --- maven-resources-plugin:3.3.0:resources (default-resources) @ vertx-docgen ---
[INFO] skip non existing resourceDirectory /home/joe/dev/Debian/data/vertx-docgen/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.10.1:compile (default-compile) @ vertx-docgen ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:3.3.0:testResources (default-testResources) @ vertx-docgen ---
[INFO] Copying 10 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.10.1:testCompile (default-testCompile) @ vertx-docgen ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.22.3:test (default-test) @ vertx-docgen ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running io.vertx.docgen.EntityUtilsTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.046 s - in io.vertx.docgen.EntityUtilsTest
[INFO] Running io.vertx.docgen.DocWriterTest
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 s - in io.vertx.docgen.DocWriterTest
[INFO] Running io.vertx.docgen.BaseProcessorTest
io.vertx.docgen.DocGenException: Could not resolve io.vertx.test.includecircular.sub2
at io.vertx.docgen.BaseProcessor.lambda$visitLink$6(BaseProcessor.java:494)
at io.vertx.docgen.DocWriter.lambda$render$0(DocWriter.java:36)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at io.vertx.docgen.DocWriter.render(DocWriter.java:33)
at io.vertx.docgen.DocWriter.render(DocWriter.java:28)
at io.vertx.docgen.BaseProcessor.lambda$process$4(BaseProcessor.java:200)
at java.base/java.util.HashMap.forEach(HashMap.java:1421)
at io.vertx.docgen.BaseProcessor.lambda$process$5(BaseProcessor.java:199)
at java.base/java.util.HashMap.forEach(HashMap.java:1421)
at io.vertx.docgen.BaseProcessor.process(BaseProcessor.java:198)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:1023)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors$ProcessorStateIterator.runContributingProcs(JavacProcessingEnvironment.java:859)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1265)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1404)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1234)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:916)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:104)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.invocationHelper(JavacTaskImpl.java:152)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:100)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:94)
at io.vertx.docgen.Compiler.failCompile(Compiler.java:66)
at io.vertx.docgen.BaseProcessorTest.testDocFileNotFile(BaseProcessorTest.java:636)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:61)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
io.vertx.docgen.DocGenException: Could not resolve io.vertx.test.file.DoesNotExists
at io.vertx.docgen.BaseProcessor.lambda$visitLink$6(BaseProcessor.java:494)
at io.vertx.docgen.DocWriter.lambda$render$0(DocWriter.java:36)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at io.vertx.docgen.DocWriter.render(DocWriter.java:33)
at io.vertx.docgen.DocWriter.render(DocWriter.java:28)
at io.vertx.docgen.BaseProcessor.lambda$process$4(BaseProcessor.java:200)
at java.base/java.util.HashMap.forEach(HashMap.java:1421)
at io.vertx.docgen.BaseProcessor.lambda$process$5(BaseProcessor.java:199)
at java.base/java.util.HashMap.forEach(HashMap.java:1421)
at io.vertx.docgen.BaseProcessor.process(BaseProcessor.java:198)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:1023)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors$ProcessorStateIterator.runContributingProcs(JavacProcessingEnvironment.java:859)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1265)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1404)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1234)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:916)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:104)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.invocationHelper(JavacTaskImpl.java:152)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:100)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:94)
at io.vertx.docgen.Compiler.failCompile(Compiler.java:66)
at io.vertx.docgen.BaseProcessorTest.testDocFileWithLinkToUnresolvableType(BaseProcessorTest.java:622)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:61)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
io.vertx.docgen.DocGenException: Could not resolve io.vertx.test.linkunresolvedtypewithsignature.DoesNotExist#whatever
at io.vertx.docgen.BaseProcessor.lambda$visitLink$6(BaseProcessor.java:494)
at io.vertx.docgen.DocWriter.lambda$render$0(DocWriter.java:36)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at io.vertx.docgen.DocWriter.render(DocWriter.java:33)
at io.vertx.docgen.DocWriter.render(DocWriter.java:28)
at io.vertx.docgen.BaseProcessor.lambda$process$4(BaseProcessor.java:200)
at java.base/java.util.HashMap.forEach(HashMap.java:1421)
at io.vertx.docgen.BaseProcessor.lambda$process$5(BaseProcessor.java:199)
at java.base/java.util.HashMap.forEach(HashMap.java:1421)
at io.vertx.docgen.BaseProcessor.process(BaseProcessor.java:198)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:1023)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors$ProcessorStateIterator.runContributingProcs(JavacProcessingEnvironment.java:859)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1265)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1404)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1234)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:916)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:104)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.invocationHelper(JavacTaskImpl.java:152)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:100)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:94)
at io.vertx.docgen.Compiler.failCompile(Compiler.java:66)
at io.vertx.docgen.BaseProcessorTest.failDoc(BaseProcessorTest.java:697)
at io.vertx.docgen.BaseProcessorTest.testLinkUnresolvedTypeWithSignature(BaseProcessorTest.java:435)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:61)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
io.vertx.docgen.DocGenException: Could not resolve non_existing
at io.vertx.docgen.BaseProcessor.lambda$visitLink$6(BaseProcessor.java:494)
at io.vertx.docgen.DocWriter.lambda$render$0(DocWriter.java:36)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at io.vertx.docgen.DocWriter.render(DocWriter.java:33)
at io.vertx.docgen.DocWriter.render(DocWriter.java:28)
at io.vertx.docgen.BaseProcessor.lambda$process$4(BaseProcessor.java:200)
at java.base/java.util.HashMap.forEach(HashMap.java:1421)
at io.vertx.docgen.BaseProcessor.lambda$process$5(BaseProcessor.java:199)
at java.base/java.util.HashMap.forEach(HashMap.java:1421)
at io.vertx.docgen.BaseProcessor.process(BaseProcessor.java:198)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:1023)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors$ProcessorStateIterator.runContributingProcs(JavacProcessingEnvironment.java:859)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1265)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1404)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1234)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:916)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:104)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.invocationHelper(JavacTaskImpl.java:152)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:100)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:94)
at io.vertx.docgen.Compiler.failCompile(Compiler.java:66)
at io.vertx.docgen.BaseProcessorTest.failDoc(BaseProcessorTest.java:697)
at io.vertx.docgen.BaseProcessorTest.testIncludeNonExisting(BaseProcessorTest.java:40)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:61)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
io.vertx.docgen.DocGenException: Circular include
at io.vertx.docgen.BaseProcessor$Doc.process(BaseProcessor.java:304)
at io.vertx.docgen.BaseProcessor$LinkProcessing.handle(BaseProcessor.java:569)
at io.vertx.docgen.BaseProcessor$ElementResolution.add(BaseProcessor.java:546)
at io.vertx.docgen.BaseProcessor$ElementResolution.access$500(BaseProcessor.java:503)
at io.vertx.docgen.BaseProcessor.visitLink(BaseProcessor.java:490)
at io.vertx.docgen.BaseProcessor.access$200(BaseProcessor.java:29)
at io.vertx.docgen.BaseProcessor$Doc$1.visitLink(BaseProcessor.java:388)
at io.vertx.docgen.BaseProcessor$Doc$1.visitLink(BaseProcessor.java:312)
at jdk.compiler/com.sun.tools.javac.tree.DCTree$DCLink.accept(DCTree.java:538)
at jdk.compiler/com.sun.source.util.DocTreeScanner.scan(DocTreeScanner.java:84)
at jdk.compiler/com.sun.source.util.DocTreeScanner.scan(DocTreeScanner.java:103)
at io.vertx.docgen.BaseProcessor$Doc$1.visitDocComment(BaseProcessor.java:328)
at io.vertx.docgen.BaseProcessor$Doc$1.visitDocComment(BaseProcessor.java:312)
at jdk.compiler/com.sun.tools.javac.tree.DCTree$DCDocComment.accept(DCTree.java:138)
at io.vertx.docgen.BaseProcessor$Doc.process(BaseProcessor.java:392)
at io.vertx.docgen.BaseProcessor$LinkProcessing.handle(BaseProcessor.java:569)
at io.vertx.docgen.BaseProcessor$ElementResolution.add(BaseProcessor.java:546)
at io.vertx.docgen.BaseProcessor$ElementResolution.access$500(BaseProcessor.java:503)
at io.vertx.docgen.BaseProcessor.visitLink(BaseProcessor.java:490)
at io.vertx.docgen.BaseProcessor.access$200(BaseProcessor.java:29)
at io.vertx.docgen.BaseProcessor$Doc$1.visitLink(BaseProcessor.java:388)
at io.vertx.docgen.BaseProcessor$Doc$1.visitLink(BaseProcessor.java:312)
at jdk.compiler/com.sun.tools.javac.tree.DCTree$DCLink.accept(DCTree.java:538)
at jdk.compiler/com.sun.source.util.DocTreeScanner.scan(DocTreeScanner.java:84)
at jdk.compiler/com.sun.source.util.DocTreeScanner.scan(DocTreeScanner.java:103)
at io.vertx.docgen.BaseProcessor$Doc$1.visitDocComment(BaseProcessor.java:328)
at io.vertx.docgen.BaseProcessor$Doc$1.visitDocComment(BaseProcessor.java:312)
at jdk.compiler/com.sun.tools.javac.tree.DCTree$DCDocComment.accept(DCTree.java:138)
at io.vertx.docgen.BaseProcessor$Doc.process(BaseProcessor.java:392)
at io.vertx.docgen.BaseProcessor$LinkProcessing.handle(BaseProcessor.java:569)
at io.vertx.docgen.BaseProcessor$ElementResolution.doResolve(BaseProcessor.java:538)
at io.vertx.docgen.BaseProcessor$ElementResolution.tryResolve(BaseProcessor.java:515)
at io.vertx.docgen.BaseProcessor.process(BaseProcessor.java:192)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:1023)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:939)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1267)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1382)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1234)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:916)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:104)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.invocationHelper(JavacTaskImpl.java:152)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:100)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:94)
at io.vertx.docgen.Compiler.failCompile(Compiler.java:66)
at io.vertx.docgen.BaseProcessorTest.failDoc(BaseProcessorTest.java:697)
at io.vertx.docgen.BaseProcessorTest.testIncludeCircular(BaseProcessorTest.java:45)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:61)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
io.vertx.docgen.DocGenException: Could not resolve io.vertx.test.linktomethodwithunresolvabletype.TheClass#m(foobar)
at io.vertx.docgen.BaseProcessor.lambda$visitLink$6(BaseProcessor.java:494)
at io.vertx.docgen.DocWriter.lambda$render$0(DocWriter.java:36)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at io.vertx.docgen.DocWriter.render(DocWriter.java:33)
at io.vertx.docgen.DocWriter.render(DocWriter.java:28)
at io.vertx.docgen.BaseProcessor.lambda$process$4(BaseProcessor.java:200)
at java.base/java.util.HashMap.forEach(HashMap.java:1421)
at io.vertx.docgen.BaseProcessor.lambda$process$5(BaseProcessor.java:199)
at java.base/java.util.HashMap.forEach(HashMap.java:1421)
at io.vertx.docgen.BaseProcessor.process(BaseProcessor.java:198)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:1023)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors$ProcessorStateIterator.runContributingProcs(JavacProcessingEnvironment.java:859)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1265)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1404)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1234)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:916)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:104)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.invocationHelper(JavacTaskImpl.java:152)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:100)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:94)
at io.vertx.docgen.Compiler.failCompile(Compiler.java:66)
at io.vertx.docgen.BaseProcessorTest.failDoc(BaseProcessorTest.java:697)
at io.vertx.docgen.BaseProcessorTest.testLinkToMethodWithUnresolvableType(BaseProcessorTest.java:168)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:61)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
java.io.FileNotFoundException: Cannot process document /home/joe/dev/Debian/data/vertx-docgen/./does_not_exists
at io.vertx.docgen.BaseProcessor.process(BaseProcessor.java:155)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:1023)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:939)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1267)
at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1382)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1234)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:916)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:104)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.invocationHelper(JavacTaskImpl.java:152)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:100)
at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:94)
at io.vertx.docgen.Compiler.failCompile(Compiler.java:66)
at io.vertx.docgen.BaseProcessorTest.testDocFileNotFound(BaseProcessorTest.java:629)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:61)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
[ERROR] Tests run: 54, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 2.925 s <<< FAILURE! - in io.vertx.docgen.BaseProcessorTest
[ERROR] testCode(io.vertx.docgen.BaseProcessorTest) Time elapsed: 0.027 s <<< FAILURE!
org.junit.ComparisonFailure: expected:<...ins `some code here`[ and a `literal`].> but was:<...ins `some code here`[some code here and a `literal`literal].>
at io.vertx.docgen.BaseProcessorTest.testCode(BaseProcessorTest.java:309)
[INFO] Running io.vertx.docgen.PostProcessorTest
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in io.vertx.docgen.PostProcessorTest
[INFO] Running io.vertx.docgen.LanguageFilterPostProcessorTest
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 s - in io.vertx.docgen.LanguageFilterPostProcessorTest
[INFO] Running io.vertx.docgen.DocGenProcessorTest
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.315 s - in io.vertx.docgen.DocGenProcessorTest
[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] BaseProcessorTest.testCode:309 expected:<...ins `some code here`[ and a `literal`].> but was:<...ins `some code here`[some code here and a `literal`literal].>
[INFO]
[ERROR] Tests run: 76, Failures: 1, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.584 s
[INFO] Finished at: 2023-02-10T05:22:57Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.3:test (default-test) on project vertx-docgen: There are test failures.
[ERROR]
[ERROR] Please refer to /home/joe/dev/Debian/data/vertx-docgen/target/surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
yes, the unit tests included in vertx-docgen
It would be neat to be able to filer in/out some port of the doc depending on the current language:
*
* [language,java]
* ----
* This is only displayed for java. But it can have...
* Several lines.
* ----
*
* [language, javascript, ruby]
* ----
* This is only displayed for javascript and ruby.
* ----
*
Requires #10.
Right now, it's not possible to includes a whole class as source such as
----
{@link com.acme.MyExample}
----
We should support this.
Nice project, this one! I would like to use it with Gradle. Are you aware of any versions doing that?
For javadoc to asciidoc
I found this as well https://github.com/asciidoctor/asciidoclet
When translate
is set to false
it should be able to include the whole (Java) file using:
----
{@link org.acme.MyClass}
----
Obviously, this would only be available for Java class inclusion (that's why it forces translate=false
)
Sometimes you are including code in your example that must not be translated to other languages. A perfect example of this is the documentation of vertx-unit, because some part a really specific to Java (integration with junit) and does not need to be translated into JavaScript or Groovy. In addition, only the java version should be used in the generated documentation.
For support this feature we could add a translate=false
attribute to the @Source
annotation. When this attribute is found, the Java version of the code is used regardless the current language.
Currently the generator does not support entities, i.e. HTML entities (such as &
or \
). This support should be added.
This issue is related to vert-x3/vertx-codetrans#2.
I've found that docgen fails when generating code from @Source
examples, when we are referencing a method that has "varargs" arguments and we call it with no argument. The JS doc generation at least fails, but it seems that some others are ok (I didn't see any error with kotlin for instance).
For some reasons I wasn't able to create a reproducer as a unit test in vertx-docgen (I may not be familiar enough with these tests) so here's the steps to reproduce:
@Source
:@Source
public class Examples {
public void reproducer0() {
System.out.println(MyClass.myFunc(1));
System.out.println(MyClass.myFunc(1, 2, 3));
}
public void reproducer() {
System.out.println(MyClass.myFunc());
}
}
public class MyClass {
public static Integer myFunc(Integer... args) {
return 0;
}
}
[source,$lang]
----
{@link examples.Examples#reproducer0()}
----
[source,$lang]
----
{@link examples.Examples#reproducer()}
----
When I build vertx-lang-js
, I get the following error:
Cannot generate Examples#reproducer : Index: 0, Size: 0
Note that reproducer0
passed. The problem seems to be when we're passing 0 argument on a function that uses varargs.
The javadoc syntax {@code xxx}
should generate:
`xxx`
I just documented the usage of vertx-infinispan on Openshift3 and saw this strange output in Asciidoc:
vert-x3/vertx-infinispan@5bacb3c#diff-6fce4ef17888cd332ba78b36b73631b5R214
The source looks fine but for some reason the generated Asciidoc line gets prefixed with a star.
com.sun.tools.javac.code.Type
fails the compilation since Java 16, its use can be removed at the expense of giving up on maven coordinate resolution and work arounds.
The docgen.source
option allow to process a list of files but does not support directories.
With the following dependency configuration in my gradle 5.3.1 build script:
def vertxVersion = "3.6.3"
dependencies {
// snip
compileOnly "io.vertx:vertx-lang-js-gen:$vertxVersion"
compileOnly "io.vertx:vertx-codetrans:$vertxVersion"
compileOnly "io.vertx:vertx-docgen:0.9.2"
annotationProcessor "io.vertx:vertx-docgen:0.9.2"
annotationProcessor "io.vertx:vertx-lang-js-gen:$vertxVersion"
annotationProcessor "io.vertx:vertx-rx-java2-gen:$vertxVersion"
annotationProcessor "io.vertx:vertx-codegen:$vertxVersion"
// snip
}
...and the following docgen task:
task generateJsAsciiDocs(type: JavaCompile) {
group = 'documentation'
source = sourceSets.main.java
options.annotationProcessorPath = configurations.annotationProcessor
classpath = configurations.compile + configurations.compileOnly
destinationDir = project.file("$buildDir/docs/asciidoc/vertx/js-manual")
options.compilerArgs = [
"-proc:only",
"-processor", "io.vertx.docgen.DocGenProcessor",
"-Adocgen.output=$buildDir/docs/asciidoc/vertx/js-manual"
]
}
I get the following build failure when running the js doc generation task:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':generateJsAsciiDocs'.
> java.util.ServiceConfigurationError: io.vertx.docgen.DocGenerator: Provider io.vertx.lang.js.JSDocGenerator could not be instantiated
I've tried various combinations of using compile
, compileOnly
, and annotationProcessor
configurations for the different vertx dependencies, but I can't find any that work.
I have a pretty nearly identical dependency/task configuration for using the codegen libraries in this same project, and those all work without error, but I can't find a way around this docgen problem.
If you have a module-info
with:
@Document(fileName = "index.adoc")
and no document associated, the build fails with an NPE:
java.lang.NullPointerException
at io.vertx.docgen.BaseProcessor$Doc.process(BaseProcessor.java:434)
at io.vertx.docgen.BaseProcessor.handleGen(BaseProcessor.java:237)
at io.vertx.docgen.BaseProcessor.lambda$process$1(BaseProcessor.java:122)
at java.lang.Iterable.forEach(Iterable.java:75)
at io.vertx.docgen.BaseProcessor.process(BaseProcessor.java:119)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:794)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:705)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)
at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176)
at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:856)
at com.sun.tools.javac.main.Main.compile(Main.java:523)
at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129)
at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138)
at org.bsc.maven.plugin.processor.AbstractAnnotationProcessorMojo.executeWithExceptionsHandled(AbstractAnnotationProcessorMojo.java:650)
at org.bsc.maven.plugin.processor.AbstractAnnotationProcessorMojo.execute(AbstractAnnotationProcessorMojo.java:379)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:954)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:192)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
You can reproduce it from https://github.com/cescoffier/vertx-amqp-client by modifying the io/vertx/ext/amqp/package-info.java
file
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.