You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by co...@apache.org on 2021/10/07 09:21:46 UTC
[santuario-xml-security-java] branch master updated: Fixing
build/test with JDK17
This is an automated email from the ASF dual-hosted git repository.
coheigea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/santuario-xml-security-java.git
The following commit(s) were added to refs/heads/master by this push:
new 08ea2e3 Fixing build/test with JDK17
08ea2e3 is described below
commit 08ea2e303fca060929d2a082ca172d8368dc7e86
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Thu Oct 7 09:50:54 2021 +0100
Fixing build/test with JDK17
---
pom.xml | 19 +++++++++++++++++++
.../test/dom/signature/ECDSASignatureTest.java | 11 ++++++++++-
2 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 8a436d2..c8ab476 100644
--- a/pom.xml
+++ b/pom.xml
@@ -225,6 +225,13 @@
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.14.0</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.glassfish.jaxb</groupId>
+ <artifactId>jaxb-runtime</artifactId>
+ <version>2.3.5</version>
+ </dependency>
+ </dependencies>
<executions>
<execution>
<id>bindings</id>
@@ -364,6 +371,18 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <version>3.0.0-M3</version>
+ <configuration>
+ <rules>
+ <requireMavenVersion>
+ <version>3.5</version>
+ </requireMavenVersion>
+ </rules>
+ </configuration>
+ </plugin>
</plugins>
</pluginManagement>
diff --git a/src/test/java/org/apache/xml/security/test/dom/signature/ECDSASignatureTest.java b/src/test/java/org/apache/xml/security/test/dom/signature/ECDSASignatureTest.java
index a28af38..5493c6d 100644
--- a/src/test/java/org/apache/xml/security/test/dom/signature/ECDSASignatureTest.java
+++ b/src/test/java/org/apache/xml/security/test/dom/signature/ECDSASignatureTest.java
@@ -46,6 +46,7 @@ import org.apache.xml.security.utils.XMLUtils;
import org.w3c.dom.Element;
import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assumptions.assumeTrue;
/**
@@ -59,6 +60,7 @@ public class ECDSASignatureTest {
private static final String ECDSA_JKS =
"src/test/resources/org/apache/xml/security/samples/input/ecdsa.jks";
private static final String ECDSA_JKS_PASSWORD = "security";
+ private boolean isJDK17up;
public ECDSASignatureTest() throws Exception {
@@ -66,6 +68,12 @@ public class ECDSASignatureTest {
//dbf.setAttribute(id, IndexedDocument.class.getName());
org.apache.xml.security.Init.init();
+ try {
+ int javaVersion = Integer.parseInt(System.getProperty("java.version"));
+ isJDK17up = javaVersion >= 17;
+ } catch (NumberFormatException ex) {
+ // ignore
+ }
}
@org.junit.jupiter.api.Test
@@ -76,6 +84,7 @@ public class ECDSASignatureTest {
if ("IBM Corporation".equals(System.getProperty("java.vendor"))) {
return;
}
+ assumeTrue(!isJDK17up);
KeyStore keyStore = KeyStore.getInstance("JKS");
keyStore.load(new FileInputStream(ECDSA_JKS), ECDSA_JKS_PASSWORD.toCharArray());
@@ -277,4 +286,4 @@ public class ECDSASignatureTest {
}
*/
-}
\ No newline at end of file
+}