felipepessoto commented on code in PR #13560:
URL: https://github.com/apache/gluten/pull/13560#discussion_r4542167652


##########
gluten-arrow/pom.xml:
##########
@@ -278,4 +278,47 @@
     
<testOutputDirectory>target/scala-${scala.binary.version}/test-classes</testOutputDirectory>
   </build>
 
+  <profiles>
+    <profile>
+      <id>exclude-jni-test</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <configuration>
+              <excludes combine.children="append">
+                <!-- The jni-test profile requires the separately built native 
test bridge. -->
+                <exclude>**/JavaExceptionJniTest.java</exclude>
+              </excludes>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    <profile>
+      <id>jni-test</id>
+      <properties>
+        
<gluten.jni.test.lib.dir>${project.basedir}/../cpp/build/test-libs</gluten.jni.test.lib.dir>
+      </properties>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <configuration>
+              <failIfNoTests>true</failIfNoTests>
+              <forkedProcessTimeoutInSeconds>60</forkedProcessTimeoutInSeconds>
+              <systemPropertyVariables>
+                
<gluten.jni.test.lib.dir>${gluten.jni.test.lib.dir}</gluten.jni.test.lib.dir>
+              </systemPropertyVariables>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>

Review Comment:
   This repeats the [earlier profile-activation 
finding](https://github.com/apache/gluten/pull/13560#discussion_r4541164647). 
Maven deactivates `activeByDefault` when another profile in the **same POM** is 
activated. The Spark/backend/Java profiles are in the parent, not 
`gluten-arrow`.
   
   The current POM was verified through actual Maven execution with those 
parent profiles enabled: without `jni-test`, the JNI exclusion remains active 
and no bridge is required; with `jni-test`, the four JNI tests run. No 
configuration change is needed for the scenario described here.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to