Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Maven plugin help task #3036

Merged
merged 7 commits into from Oct 11, 2023
Merged

Conversation

aSemy
Copy link
Contributor

@aSemy aSemy commented Jun 6, 2023

Fix #3035

  • update pom.template.xml so the HelpMojo is generated correctly
  • Created basic test for dokka:help
  • split up the tasks that prepare/generate/sync the Maven plugin files
  • remove (now) unused MavenCliSetupExtension.mavenBuildDir

- Created basic test for `dokka:help`
- split up the tasks that prepare/generate/sync the Maven plugin files
- remove (now) unused `MavenCliSetupExtension.mavenBuildDir`
@aSemy
Copy link
Contributor Author

aSemy commented Jun 6, 2023

hey @binkley, could you take a look please? Do you have an idea why the @Mojo annotation might not be generated when running mvn maven-plugin-plugin:helpmojo?

@binkley
Copy link

binkley commented Jun 6, 2023

Do I have the right Dokka version?
I updated to 1.8.20 after dependabot noticed.
However the release page says this is a beta version:
https://github.com/Kotlin/dokka/releases/tag/v1.8.20

@aSemy
Copy link
Contributor Author

aSemy commented Jun 7, 2023

Do I have the right Dokka version? I updated to 1.8.20 after dependabot noticed. However the release page says this is a beta version: https://github.com/Kotlin/dokka/releases/tag/v1.8.20

Hey, sorry, I'm not sure what you mean?

This PR is a proposed fix, it's not merged into the master branch yet. Even after it's merged, it could be a few months before it's released!

But I would appreciate it if you reviewed my proposed changes, and ask questions or suggest improvements. You could also check out my branch, publish it to Maven Local ./gradlew publishToMavenLocal, and then try using 1.9.0-SNAPSHOT in your project. I don't work with Maven any more, so I'm only guessing at how to fix it.

Comment on lines +97 to +101
public class org/jetbrains/dokka/maven/HelpMojo : org/apache/maven/plugin/AbstractMojo {
public fun <init> ()V
public fun execute ()V
}

Copy link
Contributor Author

@aSemy aSemy Jun 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This addition indicates that dokka:help hasn't been available at most since Dokka 1.4.32 (when the BCV was introduced), and probably not before that.

@binkley
Copy link

binkley commented Jun 8, 2023

Apologies that this conversation is going off topic. The real purpose is that mvn dokka:help does the right thing

@aSemy Sorry, I do not understand.
I expect the release pages to talk about public versions, and betas and release candidates (something I value).
What I do not expect is that a beta release is discussed as a final release.
It violates the principle of least astonishment (https://en.wikipedia.org/wiki/Principle_of_least_astonishment)

So if a git tag in the repo refers to a release version (ie, something like x.y.z) when pointing to beta, this is a problem. The release notes refer to the tag of 1.8.20 but the release notes state this is Beta.

@IgnatBeresnev IgnatBeresnev self-requested a review July 6, 2023 16:19
@IgnatBeresnev
Copy link
Member

I expect the release pages to talk about public versions, and betas and release candidates (something I value).
What I do not expect is that a beta release is discussed as a final release.

Dokka as a tool is technically in Beta now, see Stability of Kotlin components. Not sure what you mean by "the final release", but I agree it can be confusing. Hopefully it won't be a problem for much longer though, as Dokka is slowly approaching the Stable release.


I don't know much about Maven plugins, but I can have a look at the PR if you think it's ready @aSemy. I think some of the bugs you mentioned might be due to the outdated versions of Maven dependencies, I don't remember when we updated them last

@binkley
Copy link

binkley commented Jul 6, 2023

@IgnatBeresnev Thank you for the explanation. My expectations were in the wrong place. I think of Dokka as a solid tool, and forgot about the beta nature.

@aSemy aSemy marked this pull request as ready for review July 7, 2023 05:41
@aSemy
Copy link
Contributor Author

aSemy commented Jul 7, 2023

I don't know much about Maven plugins, but I can have a look at the PR if you think it's ready @aSemy. I think some of the bugs you mentioned might be due to the outdated versions of Maven dependencies, I don't remember when we updated them last

Please, take a look, thanks. I thought I would attempt a fix since I refactored the Maven Plugin config in #2911.

Copy link
Member

@IgnatBeresnev IgnatBeresnev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job, as always 👍

@IgnatBeresnev
Copy link
Member

Could you please rebase onto master (or merge it in) to resolve the conflicts? After that, I'll run the integration tests and make sure publishing is not affected, and it can be merged

# Conflicts:
#	runners/maven-plugin/build.gradle.kts
@aSemy aSemy reopened this Sep 3, 2023
@IgnatBeresnev
Copy link
Member

Ran the test locally, everything looks good. Thank you very much for the contribution!

@IgnatBeresnev IgnatBeresnev merged commit 514cbb1 into Kotlin:master Oct 11, 2023
6 checks passed
@aSemy aSemy deleted the fix/maven_plugin_help branch October 11, 2023 22:57
@IgnatBeresnev IgnatBeresnev added this to the Dokka 1.9.20 milestone Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maven dokka:help
3 participants