

You can view transitive dependencies that were pulled in with the added or imported Maven dependency. However, note that this dependency will only be available on your machine and you can use it only for the local deployment.

You can also add a custom jar file as a dependency using the Maven scope system when you define your dependency. Note that changing dependency's scope in the Project Structure dialog will not affect the pom.xml file. In the Project Structure dialog, on the Modules page you can see that the scope of the dependency is also displayed. The name of the scope is displayed in the Maven tool window.
WINDOWS MAVEN INSTALL CODE
In your POM, in the dependency description add scope and using the code completion add the name of the scope. In this case IntelliJ IDEA will execute the dependency at the specified phase. 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.

Press Alt+Insert to open the Generate context menu.į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. You can use dependencyManagement to consolidate and centralize the management of the dependencies' versions. 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 / Preferences | Build, Execution, Deployment | Compiler.
