How to use javadoc:aggregate properly in multi-module maven project?

后端 未结 1 1997
情歌与酒
情歌与酒 2021-01-18 09:06

This is my parent pom.xml file (part of it) in a multi-module project:

...

    
        
                     


        
1条回答
  •  后悔当初
    2021-01-18 09:40

    You need to enable aggregation for this plugin:

      
        maven-javadoc-plugin
        
          true 
        
      
    

    On the commandline type:

    mvn javadoc:aggregate
    

    Edit:

    Okay, I did some digging into maven plugin's jira and found that all the javadoc plugin mojos have been annotated with @aggregator. But there seem to be problems with maven's aggregator the issue for which has been filed here

    There are also related bugs here and here and some more

    This seems to be a blocker issue with maven's aggregator since some plugins like e.g. clover wont run.

    To to summarize, you are doing nothing wrong

    Just switch back to earlier versions of maven-javadoc-plugin that does not use @aggregator mojo annotation and you will not get the warnings (unless you are using certain feature of the javadoc plugin thats not available in earlier version)

    On a side note, If you run the javadoc plugin as report then the @aggregator is ignored.

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