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
groovydoc-jar has wrong extension when installed/deployed #151
Comments
My only concern with changing to javadoc classifier is if a project that had both Java and Groovy in it decided to produce both a javadoc and a groovydoc artifacts. I'll do some reading on the artifact handler, thank you for those links. In the meantime, you can change the classifier with <classifier>javadoc</classifier> |
Hi, |
I'm having trouble adding the artifact handler without also adding a custom package type and lifecycle (which is the only way I'd used the artifact handler in the past -- I'm not sure it's possible otherwise). I'm thinking now of making it "javadoc" type, so the default handler can parse it, but still keep "groovydoc" classifier. Can you think of any downsides to this approach? |
Hi, this is a good approach. Keeping the groovydoc classifier has the benefit of beeing backwards compatible, even if it might not be the best default for most project. I think you can merge this |
I apologize for the delay, I forgot to open a PR and lost track of this. |
No problem, thanks for fixing this ! Also I think it's a good thing that in the end you chose the type "javadoc". |
Hi,
the groovydoc-jar is installed in the .m2 or deployed to remote repositories with an extension of "groovydoc":
That's because it uses the type "groovydoc"
GroovyDocJarMojo.java:
and you don't provided an artifacthandler for this type.
`See https://maven.apache.org/ref/3.6.3/maven-core/artifact-handlers.html where javadoc type is correctly mapped to the ".jar" extension (in https://github.com/apache/maven/blob/master/maven-core/src/main/resources/META-INF/plexus/artifact-handlers.xml). If you wanted to to the same, you would have to add a component.xml and the plugin should be used with the "extension=true" parameter (as per this stackoverflow answer: https://stackoverflow.com/a/1427749 )
An alternative could be to simply use the "javadoc" type. That's what the scaladoc-maven-plugin does. https://github.com/davidB/scala-maven-plugin/blob/da1784d364236ac1b55e68649539aee9197afc93/src/main/java/scala_maven/ScalaDocJarMojo.java#L138
Note that you could also set the classifier to javadoc by default, I think it would help most projects.. Again that's what scaladoc-maven-plugin does: https://github.com/davidB/scala-maven-plugin/blob/da1784d364236ac1b55e68649539aee9197afc93/src/main/java/scala_maven/ScalaDocJarMojo.java#L70
Cheers,
Jon
The text was updated successfully, but these errors were encountered: