Java – how to resolve conflicting attributes if multiple profiles are activated

Maven profiles documentation does not mention this, which may be a sign of wrong design in the construction process, but if multiple configuration files are active and they all define the same attributes, do they have rules to resolve conflicting attributes?

I'm pretty sure the local declaration (in POM. XML) will override settings. XML XML instead of determining the Colocal configuration file

>Does the order of declarations in the document matter? Can a defined activation sequence be important? Is an important sequence if manually activated through cli (- pprofile1, profile2)?

thank you

Solution

There is no resolution of the conflict – it is just overwhelming The order of AFAIK is set, POM, and then the command line For multiple configuration files in POM and setup files, the order in the files is also important. These configuration files are different except Maven version

I strongly recommend that you reduce your profile usage so that you don't have to worry about these complexities and install the help plug-in

In addition, you can see the valid POM in eclipse in the m2eclipse plug-in in the POM editor This should help you

And answer your question:

yes

yes

yes

All orders are important and may lead to, sometimes let's say "surprising" results

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>