Open farfouille64 opened 5 years ago
activeByDefault=true property in profile configuration doesn't work either.
<profiles>
<profile>
<id>TEST</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<revision>1.0.1-SNAPSHOT</revision>
</properties>
</profile>
<profile>
<id>PRE</id>
<properties>
<revision>1.0.1-PRE-SNAPSHOT</revision>
</properties>
</profile>
</profiles>
I have the same problem.
boy oh boy i sure do love debugging
Nothing new since pratically 3 years?
maybe this is intentional?
from docu: profiles | resolved specially | only the Activation and the Dependency dependencies of a Profile are copied to the flattened POM. If you set the parameter embedBuildProfileDependencies to true then only profiles Activation activated by JDK or OS will be added to the flattened POM while the other profiles are triggered by the current build setup and if activated their impact on dependencies is embedded into the resulting flattened POM. |
---|
enabledByDefault is not part of that activation list: JDK/OS
Given the following pom.xml :
flatten
succeeds if profiles are activated explicitly (-P
option) but fails when they are activated by properties :mvn process-resources
=> failuremvn -Dprof process-resources
=> failuremvn -PProfA process-resources
=> successmvn -PProfDef process-resources
=> success failure message :[ERROR] 'dependencies.dependency.version' for junit:junit:jar must be a valid version but is '4.${revision}'.