Press Ctrl+Shift+O or click in the Gradle tool window to import the changes. Otherwise, your code might be processed incorrectly. That is why, if the test sources root is missing, you need to create one. For example, compilation results for sources and test sources are normally placed into different folders. The IDE processes the code from different sources differently. In the Project tool window, this folder is marked with the icon. The Test Sources Root is a folder that stores your test code. When the dependency is added to adle, press Ctrl+Shift+O or click in the Gradle tool window to import the changes.īefore you start creating tests, make sure that the Test Sources Root is configured for your project. In your adle, press Alt+Insert and select Add dependency. In Gradle projects, add the necessary dependencies to your build file manually. When the dependency is added to pom.xml, press Ctrl+Shift+O or click in the Maven tool window to import the changes.įor more information on how to work with Maven, refer to Maven dependencies. Locate the necessary dependency in the search results and click Add next to it. In the tool window that opens, type the necessary dependency in the search field, for example: :junit-jupiter. In your pom.xml, press Alt+Insert and select Add dependency. Add libraries using the Dependencies tool windowįollow these steps if you're using Maven in your project: For example, this can be helpful if you need a specific library version or distribution. You can also add libraries to your project manually. In this case, the IDE automatically adds the necessary dependencies to your pom.xml. IntelliJ IDEA allows you to add missing libraries as you code: once the IDE detects that you're using some code from the library that is not added to your project yet, it will prompt you to download it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |