My javadoc .html does not have "copyright" tag


(Jiaqi Guan) #1

I’m currently migrating my maven project to gradle. And I used the ‘javadoc’ task to generate the javadoc of my project. Then I compared the two javadoc .html files between maven and gradle. I found that the files which was generated by Gradle doesn’t have the html tag about copyright.
Like follows, it doesn’t include the

content in my javadoc by gradle. But it does exist in the files generated by maven.

Copyright © 2018. All rights reserved.

Could someone tell me how to fix this? Since every html file doesn’t have this tag, I think this maybe related to the configuration. But I don’t where to fix this.


(James Justinic) #2

This is a difference in the default value for the bottom option between the tools. Maven’s default has a copyright, but Gradle’s default is blank. You can easily add it back in Gradle with:

javadoc {
    options.bottom = 'Copyright © 2018. All rights reserved.'
}

or if you want it to be dynamic, something like:

javadoc {
    options.bottom = "Copyright © ${java.time.Year.now()}. All rights reserved."
}