I have three different plugins. The execution of one of them is wrapped in a profile and disabled by default.
<profiles>
<profile>
<id>profile-exec</id>
<build>
...
<phase>generate-sources</phase>
....
</build>
<activation>
<activeByDefault>false<activeByDefault>
</activation>
</profile>
<profile>
</profiles>
<build>
<plugins>
<plugin>
...
<phase>generate-sources</phase>
<id>test1</id>
</plugin>
<plugin>
...
<phase>generate-sources</phase>
<id>test2</id>
</plugin>
</plugins>
</build>
When I run mvn generate-sources -Pprofile-exec, I see that the order of execution is the following:
test1
profile-exec
test2
what I am looking for is to obtain this order:
test1
test2
profile-exec
so that the profile is executed last. Is this possible? If so, how can it be achieved?