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

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-crypto.git


The following commit(s) were added to refs/heads/master by this push:
     new 9d866730 Prevent JNI code from loading under testjna
9d866730 is described below

commit 9d86673063be3db65946daad9f4f48089876995b
Author: Sebb <[email protected]>
AuthorDate: Thu Nov 9 15:15:06 2023 +0000

    Prevent JNI code from loading under testjna
    
    and vice-versa
    
    JNA code must not depend in JNI and vice-versa
---
 pom.xml | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/pom.xml b/pom.xml
index 1cf2053b..daffa093 100644
--- a/pom.xml
+++ b/pom.xml
@@ -332,6 +332,10 @@ The following provides more details on the included 
cryptographic software:
     <!-- Allow testing of JNI code only -->
     <profile>
       <id>testjni</id>
+      <properties>
+        <!-- prevent JNA code from loading -->
+        <commons.crypto.OpenSslNativeJna>_</commons.crypto.OpenSslNativeJna>
+      </properties>
       <build>
         <plugins>
           <plugin>
@@ -350,6 +354,10 @@ The following provides more details on the included 
cryptographic software:
     <!-- Allow testing of JNA code only -->
     <profile>
       <id>testjna</id>
+      <properties>
+        <!-- prevent JNI code from loading -->
+        <jni.library.name>_</jni.library.name>
+      </properties>
       <build>
         <plugins>
           <plugin>
@@ -670,6 +678,7 @@ The following provides more details on the included 
cryptographic software:
       <version>${jna.version}</version>
     </dependency>
     <dependency>
+      <!-- Currently only used for IOUtils.contentEquals in NativeCodeLoader 
-->
       <groupId>commons-io</groupId>
       <artifactId>commons-io</artifactId>
       <version>2.15.0</version>

Reply via email to