-
-
Notifications
You must be signed in to change notification settings - Fork 301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BndConfiguration.getConfiguration(List<Plugin>) does not take into account global configuration #6390
Comments
Would you be able to do a PR? |
I am still trying to work out the inner Maven logic. We need to reproduce it in bnd due to the bnd instruction inheritance which deviates a bit from the Maven Plugin configuration inheritance I found https://github.com/apache/maven/blob/maven-3.9.x/maven-model-builder/src/main/java/org/apache/maven/model/plugin/DefaultPluginConfigurationExpander.java, but not sure yet when this kicks in. I opened https://issues.apache.org/jira/browse/MNGSITE-544 to document the status quo a bit better. |
I think this is actually expected and nothing bnd should/need to handle because maven already merges the configurations appropriately.. In your child you provide a configuration that would apply to all executions but in your specific execution you override this so it is merged with the plugin one and effectively overriding what is configured in the child. This would be different if you specify an additional execution without configuration, then your general configuration will take precedence. To accomplish what you described your child configuration must look like this:
|
The merging mechanism in Maven and Bnd differs! bnd-maven-plugin deliberately deviates from Maven standards to allow merging of bnd configurations (which wouldn't be possible in Maven). Therefore also the same kind of merging should happen on all levels.
Currently the bnd specific merging is only implemented for 2. |
bnd-maven already considers the parent pom so have you tried my suggestion? |
parent pom is not correctly considered: for example having multiple parent levels with each having |
Can you probably give a runnable example (or even better, provide a testcase here)? |
The code at
bnd/biz.aQute.bnd.maven/src/aQute/bnd/maven/lib/configuration/BndConfiguration.java
Line 114 in f9b2c85
For example if the parent pom has something like
and the child pom has
The configuration being returned by
bnd/biz.aQute.bnd.maven/src/aQute/bnd/maven/lib/configuration/BndConfiguration.java
Line 114 in f9b2c85
The logic is missing some merge logic between execution configuration and global configuration (compare also with https://stackoverflow.com/questions/33908315/what-is-the-difference-between-executions-and-configurations-in-a-maven-plugin).
The text was updated successfully, but these errors were encountered: