Rimvydas Vaidelis <rimvydas.vaide...@gmail.com> wrote: > I have a multi-module project and I want to create a bill of materials > (BOM) module. BOM module contains dependencyManagement. My parent module > imports BOM module. BOM module will be used in another project that is > going to use my library. In development environment I would like to change > version of one dependency. I tried to do that using a profile but it seems > that maven does not activate the profile while performing import. Is it a > normal behavior? Maybe you could recommend any other way to implement > dependency version change in development environment.
I believe you can add a regular dependency entry for the artifact for which you want to override the version, like this: ---- <dependencyManagement> <dependencies> <dependency> <groupId>com.example</groupId> <artifactId>example-bom</artifactId> <version>1.0.0</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>com.example</groupId> <artifactId>example-artifact-from-bom-i-want-to-override</artifactId> <version>1.1.0-SNAPSHOT</version><!-- Overrides version from example-bom for this artifact --> </dependency> </dependencies> </dependencyManagement> <dependencies> <dependency> <groupId>com.example</groupId> <artifactId>example-artifact-managed-by-bom</artifactId> </dependency> <dependency> <groupId>com.example</groupId> <artifactId>example-artifact-from-bom-i-want-to-override</artifactId> </dependency> </dependencies> ---- Nils. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org