I want to be able to set a property for a specific maven phase. How can I do that?
For example, assume that I want to set a property like this:
<properties>
<spring.profiles.active>production<spring.profiles.active>
</properties>
only when one is executing mvn package. I know that I can manually set a property, but I want it to be automatic so it is not forgotten.
This is not possible.
But probably there is a solution for the original problem you want to solve. Please write a new question which describes the use case.