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

已回答

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.

评论操作 固定链接

Hi Ellen,

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

1
评论操作 固定链接

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

0
评论操作 固定链接

Happy to help Ellen.

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

0

请先登录再写评论。