You can add a scope for your dependency using POM. However, if you want to overwrite the defined version, you need to include version when you add the managed dependency to the POM. You don't need to specify the version on the dependency it will be taken from the DependencyManagement. Select the desired dependency and click OK. IntelliJ IDEA also shows the list of dependencies from the BOM files. You can use dependencyManagement to consolidate and centralize the management of the dependencies' versions.įrom the context menu, select the Managed Dependency option that will show you the list of the dependencies that are defined in the dependencyManagement section of your parent POM in a multi-module project. In a multi-module Maven project, the dependency in the parent POM will be inherited by all sub projects. IntelliJ IDEA creates an annotation processors profile, enables the annotation processing and adds the appropriate path to the Annotation Processor settings located in Settings | Build, Execution, Deployment | Compiler. Specify the annotationProcessors and annotationProcessorPaths options. If the added dependency has its own transitive dependencies, IntelliJ IDEA displays them in both tool windows. IntelliJ IDEA also adds the dependency to the Dependencies node in the Maven tool window and to the External Libraries in the Project tool window. IntelliJ IDEA adds the dependency to your pom.xml. In the list of results select the one you need and click Add.įor more information on working with the Dependencies tool window, refer to Package Search. In the Dependencies tool window, in the search field, start typing the name of your dependency. Press Alt+Insert to open the Generate context menu.įrom the context menu, select Add dependency. Dependencies that you set up manually inside IntelliJ IDEA module settings will be discarded on the next Maven project reload. We recommend that you specify the dependency inside your POM. IntelliJ IDEA lets you add a Maven dependency to your project. You can add, import Maven dependencies, view them in the diagram, and also analyze them. IntelliJ IDEA lets you manage Maven dependencies in your project.
0 Comments
Leave a Reply. |