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

It will be nice to have an example with Maven and Java 11. #11

Closed
javadev opened this issue Dec 12, 2021 · 5 comments
Closed

It will be nice to have an example with Maven and Java 11. #11

javadev opened this issue Dec 12, 2021 · 5 comments

Comments

@javadev
Copy link
Contributor

javadev commented Dec 12, 2021

Dear sir,

Please send me an example with pom.xml file.

@mnlipp
Copy link
Owner

mnlipp commented Dec 12, 2021

See the documentation.

@mnlipp mnlipp closed this as completed Dec 12, 2021
@javadev
Copy link
Contributor Author

javadev commented Dec 12, 2021

Thank you for the link.

Please send me an example with pom.xml file.

@mnlipp
Copy link
Owner

mnlipp commented Dec 12, 2021

I'm afraid you didn't get the meaning of the link. I don't like maven, I don't use it, and I will (hopefully) never have to use it. If you wonder why, here is a good explanation.

Therefore if you want to use mdoclet with maven, you'll have to find your own way how to do this. Feel free to document your solution for the sake of others. But I won't support this endeavor, I recommend to use gradle.

@rmuller
Copy link

rmuller commented Feb 27, 2023

This plugin can be used with maven without any issues, just add the following to your pom:

  <plugin>
    <artifactId>maven-javadoc-plugin</artifactId>
    <!-- do not use 3.5.1: transitive dependencies of docletArtifact are not added to 
         docletpath, version 3.5.1 resolves this issue.
         https://issues.apache.org/jira/browse/MJAVADOC-742 -->
    <version>3.4.1</version>
    <configuration>
      ... your configuration options here
      <useStandardDocletOptions>true</useStandardDocletOptions>
      <doclet>org.jdrupes.mdoclet.MDoclet</doclet>
      <docletArtifacts>
        <docletArtifact>
          <groupId>org.jdrupes.mdoclet</groupId>
          <artifactId>doclet</artifactId>
          <version>3.1.0</version>
        </docletArtifact>
        <docletArtifact>
          <groupId>com.vladsch.flexmark</groupId>
          <artifactId>flexmark-all</artifactId>
          <version>0.64.0</version>   
        </docletArtifact>   
      </docletArtifacts>      
      <!--  Note: additionalDependencies are added to the -classpath, not the docletpath -->
      <additionalDependencies>
      </additionalDependencies>
      <additionalJOptions>
        <additionalJOption>-J--add-exports=jdk.javadoc/jdk.javadoc.internal.tool=ALL-UNNAMED</additionalJOption>
        <additionalJOption>-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</additionalJOption>
      </additionalJOptions>
    </configuration>
  </plugin>

@mnlipp maybe you can add this to the documentation. I think it will be helpful for many users/

@mnlipp
Copy link
Owner

mnlipp commented Feb 27, 2023

@rmuller: Done.

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

No branches or pull requests

3 participants