January 16, 2016


Let's post this thing to my english blog too. So finally I released my tool called JAuthorTagger which I wanted to publish 3 weeks ago. :D

JAuthorTagger helps you manage your javadoc @author tags at project level. How? See below.

  1. Create a file named ".authors" in your project directory, with this content:
    +Your Name
  2. Start JAuthorTagger and specify your project directory:
    java -jar jauthortagger-1.1.0.jar /path/2/ur/project
  3. The thing will run thru the src folder and reads all your .java files; extracts the authors from them; modifies them according to the config; and finally exports a ".authors-diff-report.html" file which you can use to verify the procedure.
  4. If anything went wrong, just chill out, the program made a backup, and you can restore the previous version of your files:
    java -jar jauthortagger-1.1.0.jar /path/2/ur/project restore
  5. Or if the result seems OK, you can remove backup files:
    java -jar jauthortagger-1.1.0.jar /path/2/ur/project nobackup

To get the right output, source files should be well formatted - details in readme -, especially the author lines should look like this:
" * @author Name", so they should start with a space.

The configuration provides many options: you can remove authors by regex, skip classes and also you can specify classes to authors instead of authors to classes - you choose! :)

I hope you guys like it, let me know if you find a bug or have an idea! :)

No comments: