Dependencies update for 4.0.0 (#1309)
* JAXB-API dependency updated.
* JAXB-RI
* Angus Mail
Signed-off-by: Tomas Kraus <tomas.kraus@oracle.com>
diff --git a/bundles/eclipselink/pom.xml b/bundles/eclipselink/pom.xml
index 6d2711f..92e003d 100644
--- a/bundles/eclipselink/pom.xml
+++ b/bundles/eclipselink/pom.xml
@@ -76,8 +76,8 @@
<optional>true</optional>
</dependency>
<dependency>
- <groupId>com.sun.mail</groupId>
- <artifactId>jakarta.mail</artifactId>
+ <groupId>org.eclipse.angus</groupId>
+ <artifactId>angus-mail</artifactId>
<optional>true</optional>
</dependency>
<dependency>
diff --git a/bundles/eclipselink/src/main/assembly/eclipselink.zip.xml b/bundles/eclipselink/src/main/assembly/eclipselink.zip.xml
index a1469b1..af4b3cc 100644
--- a/bundles/eclipselink/src/main/assembly/eclipselink.zip.xml
+++ b/bundles/eclipselink/src/main/assembly/eclipselink.zip.xml
@@ -83,8 +83,10 @@
<include>jakarta.xml.bind:jakarta.xml.bind-api</include>
<include>jakarta.validation:jakarta.validation-api</include>
<include>jakarta.json:jakarta.json-api</include>
- <include>com.sun.activation:jakarta.activation</include>
- <include>com.sun.mail:jakarta.mail</include>
+ <include>jakarta.activation:jakarta.activation-api</include>
+ <include>org.eclipse.angus:angus-activation</include>
+ <include>jakarta.mail:jakarta.mail-api</include>
+ <include>org.eclipse.angus:angus-mail</include>
<include>com.sun.xml.bind:jaxb-core</include>
<include>com.sun.xml.bind:jaxb-xjc</include>
<include>org.eclipse.parsson:parsson</include>
diff --git a/bundles/others/pom.xml b/bundles/others/pom.xml
index 17ed878..cbb870e 100644
--- a/bundles/others/pom.xml
+++ b/bundles/others/pom.xml
@@ -149,8 +149,8 @@
<artifactId>angus-activation</artifactId>
</dependency>
<dependency>
- <groupId>com.sun.mail</groupId>
- <artifactId>jakarta.mail</artifactId>
+ <groupId>org.eclipse.angus</groupId>
+ <artifactId>angus-mail</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
diff --git a/bundles/p2site/pom.xml b/bundles/p2site/pom.xml
index 6a6f6ff..27123e2 100644
--- a/bundles/p2site/pom.xml
+++ b/bundles/p2site/pom.xml
@@ -125,8 +125,8 @@
<artifactId>angus-activation</artifactId>
</dependency>
<dependency>
- <groupId>com.sun.mail</groupId>
- <artifactId>jakarta.mail</artifactId>
+ <groupId>org.eclipse.angus</groupId>
+ <artifactId>angus-mail</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
diff --git a/bundles/tests/src/test/java/org/eclipse/persistence/testing/osgi/OSGITestHelper.java b/bundles/tests/src/test/java/org/eclipse/persistence/testing/osgi/OSGITestHelper.java
index 8a649ad..56764f6 100644
--- a/bundles/tests/src/test/java/org/eclipse/persistence/testing/osgi/OSGITestHelper.java
+++ b/bundles/tests/src/test/java/org/eclipse/persistence/testing/osgi/OSGITestHelper.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -31,7 +31,7 @@
public class OSGITestHelper {
// Environment variables defined in antbuild.properties/antbuild.xml
private static final String PLUGINS_DIR = System.getProperty("plugins.dir","target/osgi-test-plugins/");
- private static final String ACTIVATION_JAR = System.getProperty("activation.jar", "jakarta.activation.jar");
+ private static final String ACTIVATION_JAR = System.getProperty("activation.jar", "jakarta.activation-api.jar");
private static final String JAXB_API_JAR = System.getProperty("jaxb-api.jar", "jakarta.xml.bind-api.jar");
private static final String JAXB_OSGI = System.getProperty("jaxb-osgi.jar", "jaxb-xjc.jar");
private static final String JAXRS_JAR = System.getProperty("jaxrs.jar", "jakarta.ws.rs-api.jar");
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/descriptors/ClassDescriptor.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/descriptors/ClassDescriptor.java
index 7e09c22..17c0004 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/descriptors/ClassDescriptor.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/descriptors/ClassDescriptor.java
@@ -156,7 +156,7 @@
* @see org.eclipse.persistence.oxm.XMLDescriptor
*/
public class ClassDescriptor extends CoreDescriptor<AttributeGroup, DescriptorEventManager, DatabaseField, InheritancePolicy, InstantiationPolicy, Vector, ObjectBuilder> implements Cloneable, Serializable {
- protected Class javaClass;
+ protected Class<?> javaClass;
protected String javaClassName;
protected Vector<DatabaseTable> tables;
protected transient DatabaseTable defaultTable;
@@ -1485,7 +1485,7 @@
Class redirectorClass = null;
if (getJavaClassName() != null){
- Class descriptorClass = null;
+ Class<?> descriptorClass = null;
try{
if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){
try {
@@ -5034,7 +5034,7 @@
* Every descriptor maps one and only one class.
*/
@Override
- public void setJavaClass(Class theJavaClass) {
+ public void setJavaClass(Class<?> theJavaClass) {
javaClass = theJavaClass;
}
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/DescriptorException.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/DescriptorException.java
index 43247fe..ac0349b 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/DescriptorException.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/DescriptorException.java
@@ -1260,7 +1260,6 @@
public static DescriptorException nullPointerWhileConstructorInstantiation(ClassDescriptor descriptor, Throwable exception) {
Object[] args = { };
-
DescriptorException descriptorException = new DescriptorException(ExceptionMessageGenerator.buildMessage(DescriptorException.class, NULL_POINTER_WHILE_CONSTRUCTOR_INSTANTIATION, args), descriptor, exception);
descriptorException.setErrorCode(NULL_POINTER_WHILE_CONSTRUCTOR_INSTANTIATION);
return descriptorException;
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/IntegrityChecker.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/IntegrityChecker.java
index 8eb6437..c02ae21 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/IntegrityChecker.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/exceptions/IntegrityChecker.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/localization/i18n/ExceptionLocalizationResource.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/localization/i18n/ExceptionLocalizationResource.java
index 54e22ec..2aa7455 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/localization/i18n/ExceptionLocalizationResource.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/localization/i18n/ExceptionLocalizationResource.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2018 IBM Corporation and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
@@ -183,6 +183,7 @@
{ "sdo_helper_invalid_target_for_typehelper", "The provided target Class [{0}] must be EclipseLink SDOTypeHelper class." },
{ "sdo_helper_invalid_target_for_xmlhelper", "The provided target Class [{0}] must be one of EclipseLink SDOXMLHelper, EclipseLink XMLMarshaller or EclipseLink XMLUnmarshaller." },
{ "sdo_helper_invalid_target_for_xsdhelper", "The provided target Class [{0}] must be EclipseLink SDOXSDHelper class." },
+ { "jaxb_context_factory_property_invalid", "Property eclipselink.moxy.factory value {0} is invalid" },
{ "jaxb_helper_invalid_jaxbcontext", "The provided JAXBContext [{0}] is not an EclipseLink JAXBContext, and therefore could not be converted." },
{ "jaxb_helper_invalid_unmarshaller", "The provided Unmarshaller [{0}] is not an EclipseLink JAXBUnmarshaller, and therefore could not be converted." },
{ "jaxb_helper_invalid_marshaller", "The provided Marshaller [{0}] is not an EclipseLink JAXBMarshaller, and therefore could not be converted." },
diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/oxm/mappings/Descriptor.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/oxm/mappings/Descriptor.java
index 9340d59..721a8e5 100644
--- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/oxm/mappings/Descriptor.java
+++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/internal/oxm/mappings/Descriptor.java
@@ -106,7 +106,7 @@
/**
* Return the java class.
*/
- Class getJavaClass();
+ Class<?> getJavaClass();
/**
* Return the class name, used by the MW.
@@ -224,7 +224,7 @@
* Set the Java class that this descriptor maps.
* Every descriptor maps one and only one class.
*/
- void setJavaClass(Class theJavaClass);
+ void setJavaClass(Class<?> theJavaClass);
/**
* INTERNAL:
diff --git a/jpa/eclipselink.jaxrs.test/src/main/resources/org/eclipse/persistence/testing/jaxrs/model/jaxb.properties b/jpa/eclipselink.jaxrs.test/src/main/resources/org/eclipse/persistence/testing/jaxrs/model/jaxb.properties
deleted file mode 100644
index f123872..0000000
--- a/jpa/eclipselink.jaxrs.test/src/main/resources/org/eclipse/persistence/testing/jaxrs/model/jaxb.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0,
-# or the Eclipse Distribution License v. 1.0 which is available at
-# http://www.eclipse.org/org/documents/edl-v10.php.
-#
-# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
-#
-
-jakarta.xml.bind.JAXBContextFactory=org.eclipse.persistence.jaxb.JAXBContextFactory
diff --git a/jpa/eclipselink.jpa.test/src/it/resources/eclipselink-advanced-field-access-model/org/eclipse/persistence/testing/models/jpa/fieldaccess/relationships/jaxb.properties b/jpa/eclipselink.jpa.test/src/it/resources/eclipselink-advanced-field-access-model/org/eclipse/persistence/testing/models/jpa/fieldaccess/relationships/jaxb.properties
deleted file mode 100644
index f123872..0000000
--- a/jpa/eclipselink.jpa.test/src/it/resources/eclipselink-advanced-field-access-model/org/eclipse/persistence/testing/models/jpa/fieldaccess/relationships/jaxb.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0,
-# or the Eclipse Distribution License v. 1.0 which is available at
-# http://www.eclipse.org/org/documents/edl-v10.php.
-#
-# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
-#
-
-jakarta.xml.bind.JAXBContextFactory=org.eclipse.persistence.jaxb.JAXBContextFactory
diff --git a/jpa/eclipselink.jpa.test/src/it/resources/eclipselink-annotation-model/org/eclipse/persistence/testing/models/jpa/lob/jaxb.properties b/jpa/eclipselink.jpa.test/src/it/resources/eclipselink-annotation-model/org/eclipse/persistence/testing/models/jpa/lob/jaxb.properties
deleted file mode 100644
index f123872..0000000
--- a/jpa/eclipselink.jpa.test/src/it/resources/eclipselink-annotation-model/org/eclipse/persistence/testing/models/jpa/lob/jaxb.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0,
-# or the Eclipse Distribution License v. 1.0 which is available at
-# http://www.eclipse.org/org/documents/edl-v10.php.
-#
-# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
-#
-
-jakarta.xml.bind.JAXBContextFactory=org.eclipse.persistence.jaxb.JAXBContextFactory
diff --git a/jpa/eclipselink.jpa.test/src/it/resources/eclipselink-delimited-model/org/eclipse/persistence/testing/models/jpa/lob/jaxb.properties b/jpa/eclipselink.jpa.test/src/it/resources/eclipselink-delimited-model/org/eclipse/persistence/testing/models/jpa/lob/jaxb.properties
deleted file mode 100644
index f123872..0000000
--- a/jpa/eclipselink.jpa.test/src/it/resources/eclipselink-delimited-model/org/eclipse/persistence/testing/models/jpa/lob/jaxb.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0,
-# or the Eclipse Distribution License v. 1.0 which is available at
-# http://www.eclipse.org/org/documents/edl-v10.php.
-#
-# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
-#
-
-jakarta.xml.bind.JAXBContextFactory=org.eclipse.persistence.jaxb.JAXBContextFactory
diff --git a/jpa/eclipselink.jpa.test/src/it/resources/eclipselink-lob-model/org/eclipse/persistence/testing/models/jpa/lob/jaxb.properties b/jpa/eclipselink.jpa.test/src/it/resources/eclipselink-lob-model/org/eclipse/persistence/testing/models/jpa/lob/jaxb.properties
deleted file mode 100644
index f123872..0000000
--- a/jpa/eclipselink.jpa.test/src/it/resources/eclipselink-lob-model/org/eclipse/persistence/testing/models/jpa/lob/jaxb.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0,
-# or the Eclipse Distribution License v. 1.0 which is available at
-# http://www.eclipse.org/org/documents/edl-v10.php.
-#
-# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
-#
-
-jakarta.xml.bind.JAXBContextFactory=org.eclipse.persistence.jaxb.JAXBContextFactory
diff --git a/moxy/org.eclipse.persistence.moxy.utils.xjc/pom.xml b/moxy/org.eclipse.persistence.moxy.utils.xjc/pom.xml
index 2efb170..7307ce3 100644
--- a/moxy/org.eclipse.persistence.moxy.utils.xjc/pom.xml
+++ b/moxy/org.eclipse.persistence.moxy.utils.xjc/pom.xml
@@ -40,6 +40,10 @@
<artifactId>org.eclipse.persistence.moxy</artifactId>
<scope>runtime</scope>
</dependency>
+ <dependency>
+ <groupId>jakarta.activation</groupId>
+ <artifactId>jakarta.activation-api</artifactId>
+ </dependency>
</dependencies>
<build>
diff --git a/moxy/org.eclipse.persistence.moxy/pom.xml b/moxy/org.eclipse.persistence.moxy/pom.xml
index 8f1b291..033f478 100644
--- a/moxy/org.eclipse.persistence.moxy/pom.xml
+++ b/moxy/org.eclipse.persistence.moxy/pom.xml
@@ -81,8 +81,8 @@
<artifactId>angus-activation</artifactId>
</dependency>
<dependency>
- <groupId>com.sun.mail</groupId>
- <artifactId>jakarta.mail</artifactId>
+ <groupId>org.eclipse.angus</groupId>
+ <artifactId>angus-mail</artifactId>
</dependency>
<!--Test dependencies-->
diff --git a/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/JAXBContext.java b/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/JAXBContext.java
index 7c99942..a965cb4 100644
--- a/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/JAXBContext.java
+++ b/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/JAXBContext.java
@@ -445,7 +445,6 @@
* Create a JAXBValidator. The JAXBValidator is used to validate Java objects against
* an XSD.
*/
- @Override
public JAXBValidator createValidator() {
return new JAXBValidator(getXMLContext().createValidator());
}
diff --git a/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/JAXBContextProperties.java b/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/JAXBContextProperties.java
index cf65e80..4369928 100644
--- a/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/JAXBContextProperties.java
+++ b/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/JAXBContextProperties.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -29,6 +29,27 @@
*/
public class JAXBContextProperties {
+ /**
+ * The name of the property used to specify which JAXB Context Factory
+ * will be used for context creation.
+ * Default {@link org.eclipse.persistence.jaxb.JAXBContextFactory} will be used when this property
+ * is not set.
+ * Supported values are listed in {@link Factory} class.
+ * @since 4.0
+ */
+ public static final String MOXY_FACTORY = "eclipselink.moxy.factory";
+
+ /**
+ * Supported values of {@code eclipselink.moxy.factory} property.
+ * @since 4.0
+ */
+ public static final class Factory {
+ /** Use default {@link org.eclipse.persistence.jaxb.JAXBContextFactory} for context creation. */
+ public static final String DEFAULT = "default";
+ /** Use {@link org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContextFactory} for context creation. */
+ public static final String DYNAMIC = "dynamic";
+ }
+
/**`
* The name of the property used to specify a value that will be prepended
* to all keys that are mapped to an XML attribute. By default there is no
diff --git a/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/JAXBUnmarshaller.java b/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/JAXBUnmarshaller.java
index 510a2a7..c590cee 100644
--- a/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/JAXBUnmarshaller.java
+++ b/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/JAXBUnmarshaller.java
@@ -771,7 +771,6 @@
return new JAXBUnmarshallerHandler(this);
}
- @Override
public void setValidating(boolean validate) throws JAXBException {
if (validate) {
xmlUnmarshaller.setValidationMode(XMLUnmarshaller.SCHEMA_VALIDATION);
@@ -780,7 +779,6 @@
}
}
- @Override
public boolean isValidating() throws JAXBException {
return xmlUnmarshaller.getValidationMode() != XMLUnmarshaller.NONVALIDATING;
}
diff --git a/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/JAXBValidator.java b/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/JAXBValidator.java
index 32b4460..b0b2aa4 100644
--- a/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/JAXBValidator.java
+++ b/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/JAXBValidator.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -18,14 +18,13 @@
import jakarta.xml.bind.PropertyException;
import jakarta.xml.bind.ValidationEventHandler;
import jakarta.xml.bind.ValidationException;
-import jakarta.xml.bind.Validator;
import jakarta.xml.bind.helpers.DefaultValidationEventHandler;
import org.eclipse.persistence.oxm.XMLValidator;
/**
* Facilitates JAXBValidation.
*/
-public class JAXBValidator implements Validator {
+public class JAXBValidator /*implements Validator*/ {
private ValidationEventHandler validationEventHandler;
private XMLValidator xmlValidator;
@@ -49,7 +48,6 @@
* @return true if a valid root object, false otherwise
* @throws JAXBException
*/
- @Override
public boolean validateRoot(Object rootObject) throws JAXBException {
if (rootObject == null) {
throw new IllegalArgumentException();
@@ -69,7 +67,6 @@
* @return true if a valid object, false otherwise
* @throws JAXBException
*/
- @Override
public boolean validate(Object object) throws JAXBException {
if (object == null) {
throw new IllegalArgumentException();
@@ -82,7 +79,6 @@
}
}
- @Override
public void setEventHandler(ValidationEventHandler newValidationEventHandler) throws JAXBException {
if (null == newValidationEventHandler) {
validationEventHandler = new DefaultValidationEventHandler();
@@ -92,12 +88,10 @@
xmlValidator.setErrorHandler(new JAXBErrorHandler(validationEventHandler));
}
- @Override
public ValidationEventHandler getEventHandler() throws JAXBException {
return validationEventHandler;
}
- @Override
public void setProperty(String key, Object value) throws PropertyException {
if (key == null) {
throw new IllegalArgumentException();
@@ -105,7 +99,6 @@
throw new PropertyException(key, value);
}
- @Override
public Object getProperty(String key) throws PropertyException {
if (key == null) {
throw new IllegalArgumentException();
diff --git a/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/XMLBindingContextFactory.java b/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/XMLBindingContextFactory.java
index c5d54fe..443995c 100644
--- a/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/XMLBindingContextFactory.java
+++ b/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/XMLBindingContextFactory.java
@@ -14,6 +14,10 @@
import jakarta.xml.bind.JAXBContext;
import jakarta.xml.bind.JAXBException;
+import org.eclipse.persistence.internal.localization.ExceptionLocalization;
+import org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContextFactory;
+
+import java.util.Collections;
import java.util.Map;
/**
@@ -30,12 +34,38 @@
@Override
public JAXBContext createContext(Class<?>[] types, Map<String, ?> map) throws JAXBException {
- return JAXBContextFactory.createContext(types, map);
+ @SuppressWarnings("unchecked")
+ Map<String, Object> opts = map != null ? (Map<String, Object>) map : Collections.emptyMap();
+ Object factory = opts.getOrDefault(JAXBContextProperties.MOXY_FACTORY, JAXBContextProperties.Factory.DEFAULT);
+ if (factory instanceof String) {
+ switch ((String) factory) {
+ case JAXBContextProperties.Factory.DEFAULT:
+ return JAXBContextFactory.createContext(types, opts);
+ case JAXBContextProperties.Factory.DYNAMIC:
+ return DynamicJAXBContextFactory.createContext(types, opts);
+ default:
+ throw new JAXBException(ExceptionLocalization.buildMessage("jaxb_context_factory_property_invalid", new Object[] {factory}));
+ }
+ }
+ throw new JAXBException(ExceptionLocalization.buildMessage("jaxb_context_factory_property_invalid", new Object[] {factory}));
}
@Override
public JAXBContext createContext(String string, ClassLoader cl, Map<String, ?> map) throws JAXBException {
- return JAXBContextFactory.createContext(string, cl, map);
+ @SuppressWarnings("unchecked")
+ Map<String, Object> opts = map != null ? (Map<String, Object>) map : Collections.emptyMap();
+ Object factory = opts.getOrDefault(JAXBContextProperties.MOXY_FACTORY, JAXBContextProperties.Factory.DEFAULT);
+ if (factory instanceof String) {
+ switch ((String) factory) {
+ case JAXBContextProperties.Factory.DEFAULT:
+ return JAXBContextFactory.createContext(string, cl, opts);
+ case JAXBContextProperties.Factory.DYNAMIC:
+ return DynamicJAXBContextFactory.createContext(string, cl, opts);
+ default:
+ throw new JAXBException(ExceptionLocalization.buildMessage("jaxb_context_factory_property_invalid", new Object[] {factory}));
+ }
+ }
+ throw new JAXBException(ExceptionLocalization.buildMessage("jaxb_context_factory_property_invalid", new Object[] {factory}));
}
-
+
}
diff --git a/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/compiler/AnnotationsProcessor.java b/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/compiler/AnnotationsProcessor.java
index 51c60f4..484f163 100644
--- a/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/compiler/AnnotationsProcessor.java
+++ b/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/compiler/AnnotationsProcessor.java
@@ -3809,7 +3809,7 @@
String url;
String localName;
String defaultValue = null;
- Class<XmlElementDecl.GLOBAL> scopeClass = jakarta.xml.bind.annotation.XmlElementDecl.GLOBAL.class;
+ Class<?> scopeClass = jakarta.xml.bind.annotation.XmlElementDecl.GLOBAL.class;
if (xmlEltDecl != null) {
url = xmlEltDecl.getNamespace();
diff --git a/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/dynamic/DynamicJAXBContextFactory.java b/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/dynamic/DynamicJAXBContextFactory.java
index 011980b..7cf12ec 100644
--- a/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/dynamic/DynamicJAXBContextFactory.java
+++ b/moxy/org.eclipse.persistence.moxy/src/main/java/org/eclipse/persistence/jaxb/dynamic/DynamicJAXBContextFactory.java
@@ -81,6 +81,12 @@
public static final String SCHEMAMETADATA_CLASS_NAME = "org.eclipse.persistence.jaxb.dynamic.metadata.SchemaMetadata";
/**
+ * Creates an instance of {@code DynamicJAXBContextFactory}.
+ */
+ public DynamicJAXBContextFactory() {
+ }
+
+ /**
* Create a <code>DynamicJAXBContext</code>, using either an XML Schema, EclipseLink OXM file,
* or EclipseLink <code>sessions.xml</code> as the metadata source. This creation method will be
* called if the user calls the <code>newInstance()</code> method on <code>jakarta.xml.bind.JAXBContext</code>,
diff --git a/moxy/org.eclipse.persistence.moxy/src/main/resources/org/eclipse/persistence/jaxb/xmlmodel/jaxb.properties b/moxy/org.eclipse.persistence.moxy/src/main/resources/org/eclipse/persistence/jaxb/xmlmodel/jaxb.properties
deleted file mode 100644
index f123872..0000000
--- a/moxy/org.eclipse.persistence.moxy/src/main/resources/org/eclipse/persistence/jaxb/xmlmodel/jaxb.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0,
-# or the Eclipse Distribution License v. 1.0 which is available at
-# http://www.eclipse.org/org/documents/edl-v10.php.
-#
-# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
-#
-
-jakarta.xml.bind.JAXBContextFactory=org.eclipse.persistence.jaxb.JAXBContextFactory
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/dynamic/DynamicJAXBContextCreationTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/dynamic/DynamicJAXBContextCreationTestCases.java
index ab1305a..9baa3c5 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/dynamic/DynamicJAXBContextCreationTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/dynamic/DynamicJAXBContextCreationTestCases.java
@@ -31,7 +31,6 @@
import org.eclipse.persistence.dynamic.DynamicEntity;
import org.eclipse.persistence.exceptions.DynamicException;
-import org.eclipse.persistence.jaxb.JAXBContextFactory;
import org.eclipse.persistence.jaxb.JAXBContextProperties;
import org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContext;
import org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContextFactory;
@@ -51,6 +50,14 @@
return "Dynamic JAXB: Context Creation: " + super.getName();
}
+ public void setUp() {
+ System.setProperty(JAXBContext.JAXB_CONTEXT_FACTORY, DynamicJAXBContextFactory.class.getName());
+ }
+
+ public void tearDown() {
+ System.clearProperty(JAXBContext.JAXB_CONTEXT_FACTORY);
+ }
+
public void testNewInstanceString() throws JAXBException {
DynamicJAXBContext jaxbContext = (DynamicJAXBContext) JAXBContext.newInstance(SESSION_NAMES);
DynamicEntity docWrapper = jaxbContext.newDynamicEntity(DOCWRAPPER_CLASS_NAME);
@@ -134,6 +141,7 @@
}
public void testNewInstanceXSDExternalBinding() throws Exception {
+ System.clearProperty(JAXBContext.JAXB_CONTEXT_FACTORY);
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
docFactory.setNamespaceAware(true);
@@ -151,6 +159,7 @@
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(DynamicJAXBContextFactory.XML_SCHEMA_KEY, xsdSource);
properties.put(DynamicJAXBContextFactory.EXTERNAL_BINDINGS_KEY, xjbSource);
+ properties.put(JAXBContextProperties.MOXY_FACTORY, JAXBContextProperties.Factory.DYNAMIC);
// Have to include a path to a jaxb.properties, so just reusing a context path that does contain one.
DynamicJAXBContext jaxbContext = (DynamicJAXBContext) JAXBContext.newInstance("org.eclipse.persistence.testing.jaxb.dynamic", classLoader, properties);
@@ -275,6 +284,7 @@
}
public void testNewInstanceXSDExternalBindings() throws Exception {
+ System.clearProperty(JAXBContext.JAXB_CONTEXT_FACTORY);
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
docFactory.setNamespaceAware(true);
@@ -301,6 +311,7 @@
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(DynamicJAXBContextFactory.XML_SCHEMA_KEY, xsdSource);
properties.put(DynamicJAXBContextFactory.EXTERNAL_BINDINGS_KEY, extBindings);
+ properties.put(JAXBContextProperties.MOXY_FACTORY, JAXBContextProperties.Factory.DYNAMIC);
// Have to include a path to a jaxb.properties, so just reusing a context path that does contain one.
DynamicJAXBContext jaxbContext = (DynamicJAXBContext) JAXBContext.newInstance("org.eclipse.persistence.testing.jaxb.dynamic", classLoader, properties);
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/dynamic/DynamicJAXBFromSessionsXMLTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/dynamic/DynamicJAXBFromSessionsXMLTestCases.java
index 341d53d..1d712e4 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/dynamic/DynamicJAXBFromSessionsXMLTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/dynamic/DynamicJAXBFromSessionsXMLTestCases.java
@@ -14,26 +14,32 @@
// rbarkhouse - 2010-03-04 12:22:11 - initial implementation
package org.eclipse.persistence.testing.jaxb.dynamic;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-import java.util.Vector;
+import org.eclipse.persistence.dynamic.DynamicEntity;
+import org.eclipse.persistence.internal.dynamic.DynamicEntityImpl;
+import org.eclipse.persistence.internal.helper.Helper;
+import org.eclipse.persistence.jaxb.JAXBContextProperties;
+import org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContext;
+import org.eclipse.persistence.oxm.NamespaceResolver;
+import org.eclipse.persistence.oxm.XMLRoot;
+import org.eclipse.persistence.testing.jaxb.JAXBTestCases;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.Text;
import javax.xml.namespace.QName;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
-
-import org.eclipse.persistence.dynamic.DynamicEntity;
-import org.eclipse.persistence.internal.dynamic.DynamicEntityImpl;
-import org.eclipse.persistence.internal.helper.Helper;
-import org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContext;
-import org.eclipse.persistence.oxm.NamespaceResolver;
-import org.eclipse.persistence.oxm.XMLRoot;
-import org.eclipse.persistence.testing.jaxb.JAXBTestCases;
-import org.w3c.dom.*;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Vector;
public class DynamicJAXBFromSessionsXMLTestCases extends JAXBTestCases {
@@ -64,6 +70,11 @@
private static final String EMP_CLASS_NAME =
"org.persistence.testing.jaxb.dynamic.zzz.Employee";
+ private static final Map<String, Object> PROPERTIES = new HashMap<>(1);
+ static {
+ PROPERTIES.put(JAXBContextProperties.MOXY_FACTORY, JAXBContextProperties.Factory.DYNAMIC);
+ }
+
protected ArrayList objectsAlreadyCheckedForEquality;
public DynamicJAXBFromSessionsXMLTestCases(String name) throws Exception {
@@ -71,8 +82,8 @@
setControlDocument(XML_RESOURCE);
- // Calling newInstance will end up eventually end up in DynamicJAXBContextFactory.createContext
- jaxbContext = DynamicJAXBContext.newInstance(SESSION_NAMES);
+ // Calling newInstance requires eclipselink.moxy.factory="dynamic" to end up in DynamicJAXBContextFactory.createContext
+ jaxbContext = DynamicJAXBContext.newInstance(SESSION_NAMES, Thread.currentThread().getContextClassLoader(), PROPERTIES);
jaxbMarshaller = jaxbContext.createMarshaller();
jaxbUnmarshaller = jaxbContext.createUnmarshaller();
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/dynamic/DynamicJAXBUsingXMLNamesTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/dynamic/DynamicJAXBUsingXMLNamesTestCases.java
index b34f786..4322037 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/dynamic/DynamicJAXBUsingXMLNamesTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/dynamic/DynamicJAXBUsingXMLNamesTestCases.java
@@ -41,6 +41,14 @@
super(name);
}
+ public void setUp() {
+ System.setProperty(JAXBContext.JAXB_CONTEXT_FACTORY, DynamicJAXBContextFactory.class.getName());
+ }
+
+ public void tearDown() {
+ System.clearProperty(JAXBContext.JAXB_CONTEXT_FACTORY);
+ }
+
@Override
public String getName() {
return "Dynamic JAXB: Using XML Names: " + super.getName();
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlmarshaller/NoSchemaRefTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlmarshaller/NoSchemaRefTestCases.java
index 120112e..ce53f2e 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlmarshaller/NoSchemaRefTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlmarshaller/NoSchemaRefTestCases.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2021 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -14,24 +14,24 @@
// Blaise Doughan - 2.2 - initial implementation
package org.eclipse.persistence.testing.jaxb.xmlmarshaller;
-import jakarta.xml.bind.JAXBContext;
+import org.eclipse.persistence.jaxb.JAXBContext;
import jakarta.xml.bind.JAXBException;
import jakarta.xml.bind.ValidationException;
-import jakarta.xml.bind.Validator;
import junit.framework.TestCase;
import org.eclipse.persistence.exceptions.XMLMarshalException;
-import org.eclipse.persistence.jaxb.JAXBContextFactory;
+import org.eclipse.persistence.jaxb.JAXBValidator;
+import org.eclipse.persistence.jaxb.XMLBindingContextFactory;
import org.eclipse.persistence.platform.xml.XMLPlatformException;
public class NoSchemaRefTestCases extends TestCase {
public void testValidateRootNoSchemaReference() {
try {
- Class[] classes = {Address.class};
- JAXBContext jc = JAXBContextFactory.createContext(classes, null);
- Validator validator = jc.createValidator();
+ Class<?>[] classes = {Address.class};
+ JAXBContext jc = (JAXBContext) new XMLBindingContextFactory().createContext(classes, null);
+ JAXBValidator validator = jc.createValidator();
validator.validateRoot(new Address());
} catch(ValidationException e) {
XMLMarshalException xme = (XMLMarshalException) e.getLinkedException();
@@ -45,9 +45,9 @@
public void testValidateNoSchemaReference() throws JAXBException {
try {
- Class[] classes = {Address.class};
- JAXBContext jc = JAXBContextFactory.createContext(classes, null);
- Validator validator = jc.createValidator();
+ Class<?>[] classes = {Address.class};
+ JAXBContext jc = (JAXBContext) new XMLBindingContextFactory().createContext(classes, null);
+ JAXBValidator validator = jc.createValidator();
validator.validate(new Address());
} catch (ValidationException e) {
XMLMarshalException xme = (XMLMarshalException) e.getLinkedException();
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlmarshaller/UnmarshallValidationTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlmarshaller/UnmarshallValidationTestCases.java
index 4c7efcc..0aad2ec 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlmarshaller/UnmarshallValidationTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlmarshaller/UnmarshallValidationTestCases.java
@@ -14,29 +14,23 @@
// Oracle - initial API and implementation from Oracle TopLink
package org.eclipse.persistence.testing.jaxb.xmlmarshaller;
+import jakarta.xml.bind.JAXBContext;
+import jakarta.xml.bind.UnmarshalException;
+import jakarta.xml.bind.ValidationEventHandler;
+
import java.io.*;
-import java.net.URL;
-
-import jakarta.xml.bind.JAXBContext;
-import jakarta.xml.bind.Marshaller;
-import jakarta.xml.bind.MarshalException;
-import jakarta.xml.bind.Unmarshaller;
-import jakarta.xml.bind.UnmarshalException;
-
-import jakarta.xml.bind.ValidationEventHandler;
import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.transform.Source;
-import javax.xml.transform.stream.StreamSource;
-
-import org.w3c.dom.Node;
-
-import org.xml.sax.InputSource;
-
-import org.eclipse.persistence.platform.xml.XMLPlatformException;
import junit.framework.TestCase;
+import org.eclipse.persistence.jaxb.JAXBUnmarshaller;
+import org.eclipse.persistence.platform.xml.XMLPlatformException;
+import org.eclipse.persistence.testing.jaxb.xmlmarshaller.CustomErrorValidationEventHandler;
+import org.eclipse.persistence.testing.jaxb.xmlmarshaller.CustomFatalErrorValidationEventHandler;
+import org.eclipse.persistence.testing.jaxb.xmlmarshaller.EmployeeInvalidTypeProject;
+import org.eclipse.persistence.testing.jaxb.xmlmarshaller.JAXBSAXTestSuite;
+
public class UnmarshallValidationTestCases extends TestCase {
static String INVALID_CONTEXT_PATH = "org.eclipse.persistence.testing.oxm.jaxb.invalidtype";
@@ -46,7 +40,7 @@
static String SINGLE_FATAL_ERROR_XML = "org/eclipse/persistence/testing/oxm/jaxb/Employee_OneFatalError.xml";
static boolean test1passed;
- private Unmarshaller unmarshaller;
+ private JAXBUnmarshaller unmarshaller;
private String contextPath;
private ValidationEventHandler eventHandler;
@@ -59,7 +53,7 @@
contextPath = System.getProperty("jaxb.test.contextpath", JAXBSAXTestSuite.CONTEXT_PATH);
JAXBContext context = JAXBContext.newInstance(contextPath);
- unmarshaller = context.createUnmarshaller();
+ unmarshaller = (JAXBUnmarshaller) context.createUnmarshaller();
if (!unmarshaller.isValidating()) {
unmarshaller.setValidating(true);
}
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlmarshaller/UnmarshallerTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlmarshaller/UnmarshallerTestCases.java
index 96f590c..e95a39e 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlmarshaller/UnmarshallerTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlmarshaller/UnmarshallerTestCases.java
@@ -33,6 +33,7 @@
import javax.xml.transform.stream.StreamSource;
import junit.framework.TestCase;
+import org.eclipse.persistence.jaxb.JAXBUnmarshaller;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
@@ -48,7 +49,7 @@
private final static String CONTROL_EMPLOYEE_NAME = "Jane Doe";
private JAXBContext jaxbContext;
- private Unmarshaller unmarshaller;
+ private JAXBUnmarshaller unmarshaller;
private DocumentBuilder parser;
private String contextPath;
@@ -61,7 +62,7 @@
contextPath = System.getProperty("jaxb.test.contextpath", JAXBSAXTestSuite.CONTEXT_PATH);
jaxbContext = JAXBContext.newInstance(contextPath, getClass().getClassLoader());
- unmarshaller = jaxbContext.createUnmarshaller();
+ unmarshaller = (JAXBUnmarshaller) jaxbContext.createUnmarshaller();
DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
builderFactory.setIgnoringElementContentWhitespace(true);
parser = builderFactory.newDocumentBuilder();
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlmarshaller/ValidatorTestCases.java b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlmarshaller/ValidatorTestCases.java
index e766039..1a36ff2 100644
--- a/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlmarshaller/ValidatorTestCases.java
+++ b/moxy/org.eclipse.persistence.moxy/src/test/java/org/eclipse/persistence/testing/jaxb/xmlmarshaller/ValidatorTestCases.java
@@ -14,23 +14,32 @@
// Oracle - initial API and implementation from Oracle TopLink
package org.eclipse.persistence.testing.jaxb.xmlmarshaller;
-import java.io.File;
-import java.net.URL;
-import jakarta.xml.bind.JAXBContext;
import jakarta.xml.bind.PropertyException;
import jakarta.xml.bind.Unmarshaller;
import jakarta.xml.bind.ValidationException;
-import jakarta.xml.bind.Validator;
-import org.eclipse.persistence.testing.oxm.xmlmarshaller.Car;
+
+import java.io.File;
+
import junit.framework.TestCase;
+import org.eclipse.persistence.jaxb.JAXBContext;
+import org.eclipse.persistence.jaxb.JAXBValidator;
+import org.eclipse.persistence.testing.jaxb.xmlmarshaller.Address;
+import org.eclipse.persistence.testing.jaxb.xmlmarshaller.Badge;
+import org.eclipse.persistence.testing.jaxb.xmlmarshaller.Employee;
+import org.eclipse.persistence.testing.jaxb.xmlmarshaller.JAXBSAXTestSuite;
+import org.eclipse.persistence.testing.jaxb.xmlmarshaller.Job;
+import org.eclipse.persistence.testing.jaxb.xmlmarshaller.Job2;
+import org.eclipse.persistence.testing.jaxb.xmlmarshaller.Phone;
+import org.eclipse.persistence.testing.oxm.xmlmarshaller.Car;
+
public class ValidatorTestCases extends TestCase {
private final static String CONTROL_XML_FILE_NAME = "org/eclipse/persistence/testing/oxm/jaxb/Employee_WithAddresses.xml";
private final static String CONTROL_XML_ADDRESS_FAIL = "org/eclipse/persistence/testing/oxm/jaxb/Employee_WithAddresses_Fail.xml";
private final static String CONTROL_XML_INHERITANCE_FILE_NAME = "org/eclipse/persistence/testing/oxm/jaxb/Employee_WithPOBoxAddress.xml";
private final static String CONTROL_JOB_FILE_NAME = "org/eclipse/persistence/testing/oxm/jaxb/Job_Empty.xml";
private JAXBContext jaxbContext;
- private Validator validator;
+ private JAXBValidator validator;
private Unmarshaller unmarshaller;
private String contextPath;
@@ -42,7 +51,7 @@
public void setUp() throws Exception {
contextPath = System.getProperty("jaxb.test.contextpath", JAXBSAXTestSuite.CONTEXT_PATH);
- jaxbContext = JAXBContext.newInstance(contextPath);
+ jaxbContext = (JAXBContext) JAXBContext.newInstance(contextPath);
validator = jaxbContext.createValidator();
unmarshaller = jaxbContext.createUnmarshaller();
}
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/jaxb/beanvalidation/dom/jaxb.properties b/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/jaxb/beanvalidation/dom/jaxb.properties
deleted file mode 100644
index f123872..0000000
--- a/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/jaxb/beanvalidation/dom/jaxb.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0,
-# or the Eclipse Distribution License v. 1.0 which is available at
-# http://www.eclipse.org/org/documents/edl-v10.php.
-#
-# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
-#
-
-jakarta.xml.bind.JAXBContextFactory=org.eclipse.persistence.jaxb.JAXBContextFactory
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/jaxb/dynamic/jaxb.properties b/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/jaxb/dynamic/jaxb.properties
deleted file mode 100644
index ffc535d..0000000
--- a/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/jaxb/dynamic/jaxb.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0,
-# or the Eclipse Distribution License v. 1.0 which is available at
-# http://www.eclipse.org/org/documents/edl-v10.php.
-#
-# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
-#
-
-jakarta.xml.bind.JAXBContextFactory=org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContextFactory
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/jaxb/dynamic/secondproject/jaxb.properties b/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/jaxb/dynamic/secondproject/jaxb.properties
deleted file mode 100644
index 0486791..0000000
--- a/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/jaxb/dynamic/secondproject/jaxb.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0,
-# or the Eclipse Distribution License v. 1.0 which is available at
-# http://www.eclipse.org/org/documents/edl-v10.php.
-#
-# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
-#
-
-jakarta.xml.bind.JAXBContextFactory=org.eclipse.persistence.jaxb.DynamicJAXBContextFactory
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/jaxb/interfaces/jaxb.properties b/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/jaxb/interfaces/jaxb.properties
deleted file mode 100644
index f123872..0000000
--- a/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/jaxb/interfaces/jaxb.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0,
-# or the Eclipse Distribution License v. 1.0 which is available at
-# http://www.eclipse.org/org/documents/edl-v10.php.
-#
-# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
-#
-
-jakarta.xml.bind.JAXBContextFactory=org.eclipse.persistence.jaxb.JAXBContextFactory
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/jaxb/javadoc/xmlseealso/jaxb.properties b/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/jaxb/javadoc/xmlseealso/jaxb.properties
deleted file mode 100644
index f123872..0000000
--- a/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/jaxb/javadoc/xmlseealso/jaxb.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0,
-# or the Eclipse Distribution License v. 1.0 which is available at
-# http://www.eclipse.org/org/documents/edl-v10.php.
-#
-# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
-#
-
-jakarta.xml.bind.JAXBContextFactory=org.eclipse.persistence.jaxb.JAXBContextFactory
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/jaxb/jaxbcontext/xlink/jaxb.properties b/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/jaxb/jaxbcontext/xlink/jaxb.properties
deleted file mode 100644
index f123872..0000000
--- a/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/jaxb/jaxbcontext/xlink/jaxb.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0,
-# or the Eclipse Distribution License v. 1.0 which is available at
-# http://www.eclipse.org/org/documents/edl-v10.php.
-#
-# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
-#
-
-jakarta.xml.bind.JAXBContextFactory=org.eclipse.persistence.jaxb.JAXBContextFactory
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/jaxb/referenceresolver/jaxb.properties b/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/jaxb/referenceresolver/jaxb.properties
deleted file mode 100644
index f123872..0000000
--- a/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/jaxb/referenceresolver/jaxb.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0,
-# or the Eclipse Distribution License v. 1.0 which is available at
-# http://www.eclipse.org/org/documents/edl-v10.php.
-#
-# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
-#
-
-jakarta.xml.bind.JAXBContextFactory=org.eclipse.persistence.jaxb.JAXBContextFactory
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/jaxb/schemagen/date/jaxb.properties b/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/jaxb/schemagen/date/jaxb.properties
deleted file mode 100644
index f123872..0000000
--- a/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/jaxb/schemagen/date/jaxb.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0,
-# or the Eclipse Distribution License v. 1.0 which is available at
-# http://www.eclipse.org/org/documents/edl-v10.php.
-#
-# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
-#
-
-jakarta.xml.bind.JAXBContextFactory=org.eclipse.persistence.jaxb.JAXBContextFactory
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/jaxb/schemagen/inheritance/jaxb.properties b/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/jaxb/schemagen/inheritance/jaxb.properties
deleted file mode 100644
index f123872..0000000
--- a/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/jaxb/schemagen/inheritance/jaxb.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0,
-# or the Eclipse Distribution License v. 1.0 which is available at
-# http://www.eclipse.org/org/documents/edl-v10.php.
-#
-# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
-#
-
-jakarta.xml.bind.JAXBContextFactory=org.eclipse.persistence.jaxb.JAXBContextFactory
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/jaxb/xmladapter/elementref/jaxb.properties b/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/jaxb/xmladapter/elementref/jaxb.properties
deleted file mode 100644
index f123872..0000000
--- a/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/jaxb/xmladapter/elementref/jaxb.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0,
-# or the Eclipse Distribution License v. 1.0 which is available at
-# http://www.eclipse.org/org/documents/edl-v10.php.
-#
-# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
-#
-
-jakarta.xml.bind.JAXBContextFactory=org.eclipse.persistence.jaxb.JAXBContextFactory
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/oxm/jaxb/dom/jaxb.properties b/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/oxm/jaxb/dom/jaxb.properties
deleted file mode 100644
index f123872..0000000
--- a/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/oxm/jaxb/dom/jaxb.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0,
-# or the Eclipse Distribution License v. 1.0 which is available at
-# http://www.eclipse.org/org/documents/edl-v10.php.
-#
-# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
-#
-
-jakarta.xml.bind.JAXBContextFactory=org.eclipse.persistence.jaxb.JAXBContextFactory
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/oxm/jaxb/jaxb.properties b/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/oxm/jaxb/jaxb.properties
deleted file mode 100644
index f123872..0000000
--- a/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/oxm/jaxb/jaxb.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0,
-# or the Eclipse Distribution License v. 1.0 which is available at
-# http://www.eclipse.org/org/documents/edl-v10.php.
-#
-# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
-#
-
-jakarta.xml.bind.JAXBContextFactory=org.eclipse.persistence.jaxb.JAXBContextFactory
diff --git a/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/oxm/jaxb/sax/jaxb.properties b/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/oxm/jaxb/sax/jaxb.properties
deleted file mode 100644
index f123872..0000000
--- a/moxy/org.eclipse.persistence.moxy/src/test/resources/org/eclipse/persistence/testing/oxm/jaxb/sax/jaxb.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0,
-# or the Eclipse Distribution License v. 1.0 which is available at
-# http://www.eclipse.org/org/documents/edl-v10.php.
-#
-# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
-#
-
-jakarta.xml.bind.JAXBContextFactory=org.eclipse.persistence.jaxb.JAXBContextFactory
diff --git a/performance/eclipselink.perf.test/src/test/resources/org/eclipse/persistence/testing/perf/json/model/jaxb.properties b/performance/eclipselink.perf.test/src/test/resources/org/eclipse/persistence/testing/perf/json/model/jaxb.properties
deleted file mode 100644
index f123872..0000000
--- a/performance/eclipselink.perf.test/src/test/resources/org/eclipse/persistence/testing/perf/json/model/jaxb.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0,
-# or the Eclipse Distribution License v. 1.0 which is available at
-# http://www.eclipse.org/org/documents/edl-v10.php.
-#
-# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
-#
-
-jakarta.xml.bind.JAXBContextFactory=org.eclipse.persistence.jaxb.JAXBContextFactory
diff --git a/performance/eclipselink.perf.test/src/test/resources/org/eclipse/persistence/testing/perf/largexml/bigpo/jaxb.properties b/performance/eclipselink.perf.test/src/test/resources/org/eclipse/persistence/testing/perf/largexml/bigpo/jaxb.properties
deleted file mode 100644
index f123872..0000000
--- a/performance/eclipselink.perf.test/src/test/resources/org/eclipse/persistence/testing/perf/largexml/bigpo/jaxb.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0,
-# or the Eclipse Distribution License v. 1.0 which is available at
-# http://www.eclipse.org/org/documents/edl-v10.php.
-#
-# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
-#
-
-jakarta.xml.bind.JAXBContextFactory=org.eclipse.persistence.jaxb.JAXBContextFactory
diff --git a/performance/eclipselink.perf.test/src/test/resources/org/eclipse/persistence/testing/perf/moxy/referenceresolver/jaxb.properties b/performance/eclipselink.perf.test/src/test/resources/org/eclipse/persistence/testing/perf/moxy/referenceresolver/jaxb.properties
deleted file mode 100644
index f123872..0000000
--- a/performance/eclipselink.perf.test/src/test/resources/org/eclipse/persistence/testing/perf/moxy/referenceresolver/jaxb.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0,
-# or the Eclipse Distribution License v. 1.0 which is available at
-# http://www.eclipse.org/org/documents/edl-v10.php.
-#
-# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
-#
-
-jakarta.xml.bind.JAXBContextFactory=org.eclipse.persistence.jaxb.JAXBContextFactory
diff --git a/performance/eclipselink.perf.test/src/test/resources/org/eclipse/persistence/testing/perf/smallxml/workorder/jaxb.properties b/performance/eclipselink.perf.test/src/test/resources/org/eclipse/persistence/testing/perf/smallxml/workorder/jaxb.properties
deleted file mode 100644
index f123872..0000000
--- a/performance/eclipselink.perf.test/src/test/resources/org/eclipse/persistence/testing/perf/smallxml/workorder/jaxb.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0,
-# or the Eclipse Distribution License v. 1.0 which is available at
-# http://www.eclipse.org/org/documents/edl-v10.php.
-#
-# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
-#
-
-jakarta.xml.bind.JAXBContextFactory=org.eclipse.persistence.jaxb.JAXBContextFactory
diff --git a/pom.xml b/pom.xml
index c082a07..7832a35 100644
--- a/pom.xml
+++ b/pom.xml
@@ -186,14 +186,15 @@
<el.version>4.0.1</el.version>
<glassfish.version>6.2.0</glassfish.version>
<jaxwsrt.version>3.0.1</jaxwsrt.version>
- <jaxb.version>3.0.2-b01</jaxb.version>
- <jaxb.api.version>3.0.1</jaxb.api.version>
- <soap.api.version>2.0.1</soap.api.version>
+ <jaxb.version>3.1.0-M1</jaxb.version>
+ <jaxb.api.version>4.0.0-RC2</jaxb.api.version>
+ <soap.api.version>3.0.0-RC1</soap.api.version>
<jersey.version>3.0.2</jersey.version>
<jms.version>3.0.0</jms.version>
<json.version>2.0.1</json.version>
<jpa.api.version>3.0.0</jpa.api.version>
- <mail.version>2.0.1</mail.version>
+ <mail-api.version>2.1.0-RC1</mail-api.version>
+ <angus-mail.version>1.0.0-M1</angus-mail.version>
<oracle.ddlparser.version>3.0.0</oracle.ddlparser.version>
<org.glassfish.corba.version>4.2.4</org.glassfish.corba.version>
<parsson.version>1.0.0</parsson.version>
@@ -586,9 +587,14 @@
<version>${angus-activation.version}</version>
</dependency>
<dependency>
- <groupId>com.sun.mail</groupId>
- <artifactId>jakarta.mail</artifactId>
- <version>${mail.version}</version>
+ <groupId>jakarta.mail</groupId>
+ <artifactId>jakarta.mail-api</artifactId>
+ <version>${mail-api.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.angus</groupId>
+ <artifactId>angus-mail</artifactId>
+ <version>${angus-mail.version}</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
diff --git a/sdo/org.eclipse.persistence.sdo/pom.xml b/sdo/org.eclipse.persistence.sdo/pom.xml
index d54be37..f1e311c 100644
--- a/sdo/org.eclipse.persistence.sdo/pom.xml
+++ b/sdo/org.eclipse.persistence.sdo/pom.xml
@@ -87,8 +87,8 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>com.sun.mail</groupId>
- <artifactId>jakarta.mail</artifactId>
+ <groupId>org.eclipse.angus</groupId>
+ <artifactId>angus-mail</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/resources/org/eclipse/persistence/testing/sdo/helper/jaxbhelper/datafactory/jaxb.properties b/sdo/org.eclipse.persistence.sdo/src/test/resources/org/eclipse/persistence/testing/sdo/helper/jaxbhelper/datafactory/jaxb.properties
deleted file mode 100644
index f123872..0000000
--- a/sdo/org.eclipse.persistence.sdo/src/test/resources/org/eclipse/persistence/testing/sdo/helper/jaxbhelper/datafactory/jaxb.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0,
-# or the Eclipse Distribution License v. 1.0 which is available at
-# http://www.eclipse.org/org/documents/edl-v10.php.
-#
-# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
-#
-
-jakarta.xml.bind.JAXBContextFactory=org.eclipse.persistence.jaxb.JAXBContextFactory
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/resources/org/eclipse/persistence/testing/sdo/helper/jaxbhelper/helpercontext/jaxb.properties b/sdo/org.eclipse.persistence.sdo/src/test/resources/org/eclipse/persistence/testing/sdo/helper/jaxbhelper/helpercontext/jaxb.properties
deleted file mode 100644
index f123872..0000000
--- a/sdo/org.eclipse.persistence.sdo/src/test/resources/org/eclipse/persistence/testing/sdo/helper/jaxbhelper/helpercontext/jaxb.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0,
-# or the Eclipse Distribution License v. 1.0 which is available at
-# http://www.eclipse.org/org/documents/edl-v10.php.
-#
-# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
-#
-
-jakarta.xml.bind.JAXBContextFactory=org.eclipse.persistence.jaxb.JAXBContextFactory
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/resources/org/eclipse/persistence/testing/sdo/helper/jaxbhelper/jaxb/inverse/jaxb.properties b/sdo/org.eclipse.persistence.sdo/src/test/resources/org/eclipse/persistence/testing/sdo/helper/jaxbhelper/jaxb/inverse/jaxb.properties
deleted file mode 100644
index f123872..0000000
--- a/sdo/org.eclipse.persistence.sdo/src/test/resources/org/eclipse/persistence/testing/sdo/helper/jaxbhelper/jaxb/inverse/jaxb.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0,
-# or the Eclipse Distribution License v. 1.0 which is available at
-# http://www.eclipse.org/org/documents/edl-v10.php.
-#
-# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
-#
-
-jakarta.xml.bind.JAXBContextFactory=org.eclipse.persistence.jaxb.JAXBContextFactory
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/resources/org/eclipse/persistence/testing/sdo/helper/jaxbhelper/jaxb/jaxb.properties b/sdo/org.eclipse.persistence.sdo/src/test/resources/org/eclipse/persistence/testing/sdo/helper/jaxbhelper/jaxb/jaxb.properties
deleted file mode 100644
index f123872..0000000
--- a/sdo/org.eclipse.persistence.sdo/src/test/resources/org/eclipse/persistence/testing/sdo/helper/jaxbhelper/jaxb/jaxb.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0,
-# or the Eclipse Distribution License v. 1.0 which is available at
-# http://www.eclipse.org/org/documents/edl-v10.php.
-#
-# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
-#
-
-jakarta.xml.bind.JAXBContextFactory=org.eclipse.persistence.jaxb.JAXBContextFactory
diff --git a/sdo/org.eclipse.persistence.sdo/src/test/resources/org/eclipse/persistence/testing/sdo/helper/jaxbhelper/xsdhelper/jaxb.properties b/sdo/org.eclipse.persistence.sdo/src/test/resources/org/eclipse/persistence/testing/sdo/helper/jaxbhelper/xsdhelper/jaxb.properties
deleted file mode 100644
index f123872..0000000
--- a/sdo/org.eclipse.persistence.sdo/src/test/resources/org/eclipse/persistence/testing/sdo/helper/jaxbhelper/xsdhelper/jaxb.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
-#
-# This program and the accompanying materials are made available under the
-# terms of the Eclipse Public License v. 2.0 which is available at
-# http://www.eclipse.org/legal/epl-2.0,
-# or the Eclipse Distribution License v. 1.0 which is available at
-# http://www.eclipse.org/org/documents/edl-v10.php.
-#
-# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
-#
-
-jakarta.xml.bind.JAXBContextFactory=org.eclipse.persistence.jaxb.JAXBContextFactory