What does the "Annotations" option mean when downloading a Maven library?

Answered

When I had IDEA generate a test method for me, it inserted the annotation @org.junit.jupiter.api.Test, as expected. To resolve the dependency, I selected the suggestion to add JUnit to the test path (choosing JUnit 5). I then got this window:

I understand all of the checkbox annotations except for the last one. What does checking "Annotations" do? The JUnit annotations (such as @org.junit.jupiter.api.Test) seem to get downloaded even if I don't check that box.

3 comments
Comment actions Permalink

Hi Ellen,

This checkbox corresponds to external annotations: regular annotations stored outside of your source code in an XML file called annotations.xml.

1
Comment actions Permalink

Thanks for your reply, Arina. I had not heard of external annotations before. I appreciate the information.

0
Comment actions Permalink

Happy to help Ellen.

Any other questions or problems, just let us know 👍🏻

0

Please sign in to leave a comment.