Merging plugin configuration from profile
Asked Answered
V

0

12

I have a configuration entry for exec-maven-plugin

                    <configuration>
                        <executable>compass</executable>
                        <arguments>
                            <argument>compile</argument>
                            <argument>-c</argument>
                            <argument>config_production.rb</argument>
                            <argument>--force</argument>
                        </arguments>
                    </configuration>

now in a profile I'd like to merge this configuration with:

                                <configuration>
                                    <arguments>
                                        <argument>compile</argument>
                                    </arguments>
                                </configuration>

because combine.children="merge" is the default I'd expect the effective configuration to be:

                    <configuration>
                        <executable>compass</executable>
                        <arguments>
                            <argument>compile</argument>
                        </arguments>
                    </configuration>

but instead it's the same as original.

What gives? I've tried setting combine.children="merge" and combine.self="override" to no avail.

Maven documentation only mentions "how child POMs inherit configuration from parent POMs", but I'd expect merging from profiles to work the same way.

Above results show that merging from profiles works differently - how?

Viscardi answered 30/9, 2015 at 16:0 Comment(5)
Did you try to put combine.self="override" on the profile <configuration> element, like this answer?Calibrate
@Calibrate can try that, but I want to override the <arguments> tag, not whole configurationViscardi
I think it only works if it's added to this element.Calibrate
@Tunaki: Attribute 'combine.self' is not allowed to appear in element 'configuration'.Viscardi
Can you add the XML exactly as you have tried it?Chad

© 2022 - 2024 — McMap. All rights reserved.