Closed PMarci closed 2 years ago
Note: before the dokka:dokka
goal attempts I also ran mvn package
to populate the target
directory.
@PMarci Any breakthroughs in the last week?
Is there any mechanism for increasing importance of an issue? I am running into this exact same problem. At best the docs are hard to understand and at worst there is a bug.
One thing potentially worth noting is I've requested access to the Slack channel that the docs point to. Once I have access I plan to escalate that way.
@expjoschmidt None. I ended up provisionally creating a shell script that moves the current documentation to a versioned subfolder and creates the version.json
file. All this in the hopes that if and when this is eventually fixed I'll be able to replace it with the plugin and point olderVersionsDir
to the docs already accumulated. I can share that script with you if you want.
@PMarci I would like that script please. It sounds like a nice stop-gap.
Hi! Unfortunately, our maven runner is rather simple and many advanced features may not work as expected or at all (i.e multimodule builds don't work at all, I suspect versioning as well).
We'll definitely get to supporting these features for maven sometime, but currently there are no immediate plans to work on it as we're focusing on making dokka stable
@expjoschmidt Here, I published it as a gist: https://gist.github.com/PMarci/59500c1512fcd67c940f326620242e62
EDIT: For the sake of clarity, this was placed in the project root, as the CI/CD for the project is set up for GitLab Pages, where the docs have to be in a folder in the root named public
. Dokka was already configured to output to ${project.basedir}/public/
as you can see from my pom.xml
in the OP.
Thank you @PMarci I'll take a look!
<org.jetbrains.dokka.versioning.VersioningPlugin>
should be used instead of <org.jetbrains.dokka.versioning.VersioningConfiguration>
.
The correct configuration for the versioning plugin:
<pluginsConfiguration>
<org.jetbrains.dokka.versioning.VersioningPlugin>
<version>${project.version}</version>
<olderVersionsDir>${project.basedir}/old</olderVersionsDir>
</org.jetbrains.dokka.versioning.VersioningPlugin>
</pluginsConfiguration>
Describe the bug After failing to get the versioning working on a fork of a company project, I tried to do it with the maven example project. Based on this and this I modified the
pom.xml
to this:as well as a stab in the dark with variations of
in the
configuration
tags. Even when manually placing different outputs into theolderVersionsDir
folder, the version dropdown was never generated. Also, the version was never inserted intoversion.json
:I debugged the
dokka:dokka
goal, placing various watch and break points intoorg.jetbrains.dokka.versioning.VersioningConfiguration
, but none were triggered. At some other position in the code, I once saw the contents of theorg.jetbrains.dokka.versioning.VersioningConfiguration
tags inpom.xml
serialized with tags and all, and a property alongside it marking that the format was XML. I don't remember exactly where. This is what inspired me to try the json version as well, as well as the guidance on the version doc page's examples section.Expected behaviour I expected the versions dropdown to be generated in the output, similarly to how it works with the
dokkaHtmlMultiModule
task in the gradle example, which I confirmed works as expected. I also expected the automatic management of theolderVersionsDir
to work as described, however I haven't managed to move a folder once using Maven. Based on some discussion I saw here on various issues here, I got the feeling the maven plugin is probably not even capable of what I expect, however this isn't reflected in the documentation.Screenshots There aren't any visible aspects to this other than the dropdowns not being present, which I trust you can picture.
To Reproduce Try to get the maven example project to generate the dropdown and to manage the past outputs using my
pom.xml
or any other configuration.Dokka configuration Contained in the POM.
Installation
Are you willing to provide a PR? As soon as a working configuration is discovered, it should be added as a separate example, much like the
examples/gradle
folder.