Shawyeok commented on code in PR #4526:
URL: https://github.com/apache/bookkeeper/pull/4526#discussion_r1846053539


##########
.github/workflows/bk-ci.yml:
##########
@@ -242,7 +242,7 @@ jobs:
         run: mvn -B -nsu clean install -Pdocker -DskipTests
 
       - name: Run metadata driver tests
-        run: mvn -B -nsu -f metadata-drivers/pom.xml test -DintegrationTests
+        run: mvn -B -nsu -f metadata-drivers/pom.xml -pl '!jetcd-core-shaded' 
test -DintegrationTests

Review Comment:
   > you could exclude jetcd-core-shaded in that pom file when 
-DintegrationTests is set by having an integrationTest profile in the file 
which gets activated with integrationTests system property.
   
   Cannot do this without step 1.
   
   1. remove `jetcd-core-shaded` module from main part of the pom.xml
   2. add a main profile includes all modules, make main profile activate by 
default
   3. add `integrationTests` include all modules except `jetcd-core-shaded `, 
make `integrationTests` activated with `integrationTests` system property
   
   ```diff
   Index: metadata-drivers/pom.xml
   IDEA additional info:
   Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
   <+>UTF-8
   ===================================================================
   diff --git a/metadata-drivers/pom.xml b/metadata-drivers/pom.xml
   --- a/metadata-drivers/pom.xml       (revision 
964b5ed6e7cfa71f50d0c3d5043d4a73c518f795)
   +++ b/metadata-drivers/pom.xml       (date 1731916332256)
   @@ -27,7 +27,27 @@
        <packaging>pom</packaging>
        <name>Apache BookKeeper :: Metadata Drivers :: Parent</name>
        <modules>
   -        <module>jetcd-core-shaded</module>
   -        <module>etcd</module>
   -    </modules>
   +        <module>etcd</module>
   +    </modules>
   +    <profiles>
   +        <profile>
   +            <id>integrationTests</id>
   +            <activation>
   +                <property>
   +                    <name>integrationTests</name>
   +                </property>
   +            </activation>
   +            <modules />
   +        </profile>
   +        <profile>
   +            <id>main</id>
   +            <activation>
   +                <activeByDefault>true</activeByDefault>
   +            </activation>
   +            <modules>
   +                <module>jetcd-core-shaded</module>
   +                <module>etcd</module>
   +            </modules>
   +        </profile>
   +    </profiles>
    </project>
   ```
   
   ref: https://stackoverflow.com/a/8305931/3378901
   
   > Unfortunately, uing the profile you can't exclude a module earlier 
mentioned in the main <modules> part of the pom.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to