Let's say I have a profile "dostuff" defined in a pom.xml that uses a plugin to do some stuff when the user runs mvn -P dostuff:
<profiles>
<profile>
<id>dostuff</id>
<build>
<plugins>
<plugin>
...
</plugin>
<plugins>
</build>
</profile>
<profiles>
The task the profile performs have been replaced by a new non-maven command entirely.
Of course I can just remove the profile, but that has two problems:
- It doesn't fail the build, it just produces a warning:
[WARNING] The requested profile "dostuff" could not be activated because it does not exist.
- It doesn't give the user any information that they should use the new command instead.
So, I would like any use of the profile "dostuff" to produce an error with a message telling them to use the new non-maven command instead.
Is that even possible? It's a plus if the solution doesn't require a plugin.