Skip to content

Commit

Permalink
[Build] Fix main profile activation by default (apache#10814)
Browse files Browse the repository at this point in the history
- Use a better solution to activate the main profile by default by using a property value with inversion (!) rule.
- The previous solution used <exists><file>pom.xml</file></exists> which doesn't work in all cases for some reason.
- In maven, activeByDefault works only if no other profile is already active. This isn't usable since there's already a profile called jdk11 which is active.
  • Loading branch information
lhotari authored Jun 3, 2021
1 parent d6dbcd7 commit 94fec9d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1872,7 +1872,11 @@ flexible messaging model and an intuitive client API.</description>
<activation>
<!-- always activate this profile by default. Use "-main" or "!main" in the "-P" parameter to exclude it -->
<!-- for example use "-Pcore-modules,-main" to activate the core-modules profile -->
<file><exists>pom.xml</exists></file>
<property>
<name>disableMainProfile</name>
<!-- always active unless true is passed as a value -->
<value>!true</value>
</property>
</activation>
<modules>
<module>buildtools</module>
Expand Down

0 comments on commit 94fec9d

Please sign in to comment.