Maven: How do I exclude specific source files from javadoc?

前端 未结 4 583
臣服心动
臣服心动 2020-12-16 16:11

I need to exclude specific source files (NOT just packages) from Javadoc using Maven. The setting will not work for me: it only allows you to exc

相关标签:
4条回答
  • 2020-12-16 16:16

    And what about this?

    <sourceFileExcludes>
        <exclude>net/my/packagename/mock/*.java</exclude>
        <exclude>net/my/packagename/samples/*.java</exclude>
        <exclude>**Mock*.java</exclude>
    </sourceFileExcludes>
    
    0 讨论(0)
  • 2020-12-16 16:32

    You need to specify sourcepath also. Then sourceFileExcludes will work.

    <sourceFileExcludes>
      <exclude>CryptoUtils.java</exclude>
    </sourceFileExcludes>
    <sourcepath>${basedir}/src/main/java/com/sdk/entity;${basedir}/src/main/java/com/sdk/main;${basedir}/src/main/java/com/sdk/util</sourcepath>
    Note :

    CryptoUtils is inside "/src/main/java/com/sdk/util"

    0 讨论(0)
  • 2020-12-16 16:33

    It might just not be working at the moment. There is bug logged in the plugin issue tracker - MJAVADOC-365

    0 讨论(0)
  • 2020-12-16 16:40
      <sourceFileIncludes>
        <includes>com/cod/user/**</includes>
    
       </sourceFileIncludes>
      <sourceFileExcludes>
     <exclude>com/cod/user/impl/**</exclude>
    

    includes you want ,exclude else

    0 讨论(0)
提交回复
热议问题