Effects of multiple active profiles in maven

What exactly happens when multiple profiles are activated and they have conflicting property definitions? For example, if there are two profiles, they define a property ${platform-path}

but define it as two different values, what would be the last effective value?

I tried using help:effective-pom

and it seems like it is a profile defined later in the file settings.xml

that has the last word, but I couldn't see this behavior recorded on both the maven site and the sonaType book.

+3


source to share


1 answer


I guess it depends on the implementation of the xml parser. A quick test showed me that the last variable definition in the pom file is the one deemed correct.



+3


source







All Articles