Geert Stappers <stapp...@stappers.nl> writes: > Thing that I mis is what to modify to get > |- <groupId>org.apache.felix</groupId> > |: <artifactId>maven-bundle-plugin</artifactId> > |- <version>3.5.0</version> > upon: > mvn help:effective-pom -Doutput=effective-pom.xml > grep --context=1 maven-bundle-plugin effective-pom.xml > before running > mh_make > again
First, here is some background. The version 3.2.0 comes from the parent POM hierarchy which is: --8<---------------cut here---------------start------------->8--- $ mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.1:display-ancestors |grep --before-context=1 "Ancestor POMs" [INFO] --- maven-dependency-plugin:3.1.1:display-ancestors (default-cli) @ jackson-modules-base --- [INFO] Ancestor POMs: com.fasterxml.jackson:jackson-base:2.9.4 <- com.fasterxml.jackson:jackson-bom:2.9.4 <- com.fasterxml.jackson:jackson-parent:2.9.1 <- com.fasterxml:oss-parent:30 -- [INFO] --- maven-dependency-plugin:3.1.1:display-ancestors (default-cli) @ jackson-module-afterburner --- [INFO] Ancestor POMs: com.fasterxml.jackson.module:jackson-modules-base:2.9.4 <- com.fasterxml.jackson:jackson-base:2.9.4 <- com.fasterxml.jackson:jackson-bom:2.9.4 <- com.fasterxml.jackson:jackson-parent:2.9.1 <- com.fasterxml:oss-parent:30 -- [INFO] --- maven-dependency-plugin:3.1.1:display-ancestors (default-cli) @ jackson-module-guice --- [INFO] Ancestor POMs: com.fasterxml.jackson.module:jackson-modules-base:2.9.4 <- com.fasterxml.jackson:jackson-base:2.9.4 <- com.fasterxml.jackson:jackson-bom:2.9.4 <- com.fasterxml.jackson:jackson-parent:2.9.1 <- com.fasterxml:oss-parent:30 -- [INFO] --- maven-dependency-plugin:3.1.1:display-ancestors (default-cli) @ jackson-module-jaxb-annotations --- [INFO] Ancestor POMs: com.fasterxml.jackson.module:jackson-modules-base:2.9.4 <- com.fasterxml.jackson:jackson-base:2.9.4 <- com.fasterxml.jackson:jackson-bom:2.9.4 <- com.fasterxml.jackson:jackson-parent:2.9.1 <- com.fasterxml:oss-parent:30 -- [INFO] --- maven-dependency-plugin:3.1.1:display-ancestors (default-cli) @ jackson-module-mrbean --- [INFO] Ancestor POMs: com.fasterxml.jackson.module:jackson-modules-base:2.9.4 <- com.fasterxml.jackson:jackson-base:2.9.4 <- com.fasterxml.jackson:jackson-bom:2.9.4 <- com.fasterxml.jackson:jackson-parent:2.9.1 <- com.fasterxml:oss-parent:30 -- [INFO] --- maven-dependency-plugin:3.1.1:display-ancestors (default-cli) @ jackson-module-osgi --- [INFO] Ancestor POMs: com.fasterxml.jackson.module:jackson-modules-base:2.9.4 <- com.fasterxml.jackson:jackson-base:2.9.4 <- com.fasterxml.jackson:jackson-bom:2.9.4 <- com.fasterxml.jackson:jackson-parent:2.9.1 <- com.fasterxml:oss-parent:30 -- [INFO] --- maven-dependency-plugin:3.1.1:display-ancestors (default-cli) @ jackson-module-paranamer --- [INFO] Ancestor POMs: com.fasterxml.jackson.module:jackson-modules-base:2.9.4 <- com.fasterxml.jackson:jackson-base:2.9.4 <- com.fasterxml.jackson:jackson-bom:2.9.4 <- com.fasterxml.jackson:jackson-parent:2.9.1 <- com.fasterxml:oss-parent:30 --8<---------------cut here---------------end--------------->8--- In this case, com.fasterxml:oss-parent:pom:30 defines the version of maven-bundle-plugin as: --8<---------------cut here---------------start------------->8--- <project> <properties> <version.plugin.bundle>3.2.0</version.plugin.bundle> </properties> <build> <pluginManagement> <plugins> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <version>${version.plugin.bundle}</version> </plugin> </plugins> </pluginManagement> </build> <plugins> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <version>${version.plugin.bundle}</version> <extensions>true</extensions> </plugin> </plugins> </project> --8<---------------cut here---------------end--------------->8--- You have to dig through parent POMs manually, I don't have a way to automate this with plain CLI, without extra efforts. There are several ways to change the version of maven-bundle-plugin. 1) When building, you can re-assign the value of property 'version.plugin.bundle' by passing additional parameter to mvn: $ mvn -Dversion.plugin.bundle=3.5.0 ... You can try it with effective-pom goal: --8<---------------cut here---------------start------------->8--- $ mvn help:effective-pom -Doutput=effective-pom.xml $ mvn -Dversion.plugin.bundle=3.5.0 help:effective-pom -Doutput=effective-pom-custom-bundle-plugin.xml $ diff --unified effective-pom.xml effective-pom-custom-bundle-plugin.xml --8<---------------cut here---------------end--------------->8--- 2) Permanently, by adding re-assigning version in the POM: --8<---------------cut here---------------start------------->8--- <properties> <version.plugin.bundle>3.5.0</version.plugin.bundle> </properties> --8<---------------cut here---------------end--------------->8--- 3) Permanently, by adding this to the POM: --8<---------------cut here---------------start------------->8--- <plugins> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <version>3.5.0</version> </plugin> </plugins> --8<---------------cut here---------------end--------------->8--- Ideally, 2) or 3) should be applied to com.fasterxml:oss-parent:pom:30 (the root of the hierarchy) and all sub-modules of the project will inherit this. Otherwise, the same snippet should be applied for every single sub-module. -- Mykola https://manandbytes.git{lab,hub}.io/