You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by lh...@apache.org on 2021/06/03 12:37:51 UTC

[pulsar] branch master updated: [Build] Fix main profile activation by default (#10814)

This is an automated email from the ASF dual-hosted git repository.

lhotari pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 94fec9d  [Build] Fix main profile activation by default (#10814)
94fec9d is described below

commit 94fec9d2c32fbcb5c4f0ecd4c6e0a3213d77ea78
Author: Lari Hotari <lh...@users.noreply.github.com>
AuthorDate: Thu Jun 3 15:37:04 2021 +0300

    [Build] Fix main profile activation by default (#10814)
    
    - 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.
---
 pom.xml | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 8cad23e..d5a8f5f3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -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>