Configuration:
- Maven: 3.0.5
- Java: 1.6.0_45
Description:
Say we have a profile configuration as shown below:
<profiles> <profile> <id>profile-1</id> <activation> <jdk>1.6</jdk> <property> <name>name</name> <value>Hubert</value> </property> </activation> </profile> <profile> <id>profile-2</id> <activation> <jdk>1.6</jdk> <property> <name>name</name> <value>Wiktoria</value> </property> </activation> </profile> </profiles>
We have two profiles: profile-1 and profile-2.
Profile-1 profile must be active when two requirements are met:
- jdk - version 1.6
- property name is Hubert
Question:
Check out this configuration:
mvn -Dname = Hubert Help: Active Profiles
The result is that there are two active profiles: profile-1 and profile-2.
Hm ...
Profile-2 profile should not be active, since the property name has a value different from what Wiktoria expected.
Can someone explain to me why this works? Is this normal behavior?
Thanks.
java maven maven-3
Hubert
source share