From a2bb76164edac070660f1b86721cfb7694d10924 Mon Sep 17 00:00:00 2001 From: Emmanuel Hugonnet Date: Wed, 14 Sep 2022 21:16:48 +0200 Subject: [PATCH] [JBMETA-440]: Use urn instead of URL for jboss namespaces. * Replacing http://www.jboss.com/xml/ns/jakartaee with urn:jboss:jakartaee:1.0 * Fixing a bunch of leftovers in comments Signed-off-by: Emmanuel Hugonnet --- .../resources/schema/jboss-client_9_0.xsd | 22 +++++++++---------- .../AppclientSpecDescriptorTestCase.java | 2 +- .../javaee/spec/JavaEEMetaDataConstants.java | 2 +- .../resources/schema/jboss-common_9_0.xsd | 6 ++--- .../metadata/ear/parser/jboss/Namespace.java | 2 +- .../jboss/metadata/ear/spec/EarVersion.java | 2 +- .../main/resources/schema/jboss-app_9_0.xsd | 16 +++++++------- .../ear/Ear10xEverything_testEverything.xml | 11 +++++----- .../JBossApp9xEverything_testEverything.xml | 4 ++-- .../ejb/parser/jboss/ejb3/Namespace.java | 4 ++-- .../main/resources/schema/jboss-ejb3-4_0.xsd | 4 ++-- .../main/resources/schema/jboss-web_15_0.xsd | 12 +++++----- .../web/JBossWeb150_testClustering.xml | 4 ++-- .../web/JBossWeb150_testReplicationConfig.xml | 4 ++-- 14 files changed, 47 insertions(+), 48 deletions(-) diff --git a/appclient/src/main/resources/schema/jboss-client_9_0.xsd b/appclient/src/main/resources/schema/jboss-client_9_0.xsd index 647add38c..d332bd29a 100644 --- a/appclient/src/main/resources/schema/jboss-client_9_0.xsd +++ b/appclient/src/main/resources/schema/jboss-client_9_0.xsd @@ -18,8 +18,8 @@ --> @@ -28,29 +28,29 @@ + xsi:schemaLocation="urn:jboss:jakartaee:1.0 + https://www.jboss.org/schema/jbossas/jboss-client_9_0.xsd" + version="9.0"> ... The instance documents may indicate the published version of the schema using the xsi:schemaLocation attribute for the - Java EE namespace with the following location: + Jakarta EE namespace with the following location: - https://www.jboss.org/j2ee/schema/jboss-client_9_0.xsd + https://www.jboss.org/schema/jbossas/jboss-client_9_0.xsd ]]> diff --git a/appclient/src/test/java/org/jboss/test/metadata/appclient/AppclientSpecDescriptorTestCase.java b/appclient/src/test/java/org/jboss/test/metadata/appclient/AppclientSpecDescriptorTestCase.java index bdcc9911b..67e0c1ad6 100644 --- a/appclient/src/test/java/org/jboss/test/metadata/appclient/AppclientSpecDescriptorTestCase.java +++ b/appclient/src/test/java/org/jboss/test/metadata/appclient/AppclientSpecDescriptorTestCase.java @@ -38,7 +38,7 @@ public class AppclientSpecDescriptorTestCase extends SpecDescriptorTestCase { @Parameters public static List parameters() { // The spec descriptor should be guarded in schema - return Arrays.asList(new Object[][]{{"schema/application-client_6.xsd"},{"schema/application-client_7.xsd"},{"schema/application-client_8.xsd"},{"schema/application-client_9.xsd"}}); + return Arrays.asList(new Object[][]{{"schema/application-client_6.xsd"},{"schema/application-client_7.xsd"},{"schema/application-client_8.xsd"},{"schema/application-client_9.xsd"},{"schema/application-client_10.xsd"}}); } public AppclientSpecDescriptorTestCase(String xsd) { diff --git a/common/src/main/java/org/jboss/metadata/javaee/spec/JavaEEMetaDataConstants.java b/common/src/main/java/org/jboss/metadata/javaee/spec/JavaEEMetaDataConstants.java index cf231c1f0..9854e1f8b 100644 --- a/common/src/main/java/org/jboss/metadata/javaee/spec/JavaEEMetaDataConstants.java +++ b/common/src/main/java/org/jboss/metadata/javaee/spec/JavaEEMetaDataConstants.java @@ -59,7 +59,7 @@ public interface JavaEEMetaDataConstants { /** * The jboss jakartaee namespaces */ - String JBOSS_JAKARTAEE_NS = "http://www.jboss.com/xml/ns/jakartaee"; + String JBOSS_JAKARTAEE_NS = "urn:jboss:jakartaee:1.0"; /** * The jbosscmp-jdbc namespace diff --git a/common/src/main/resources/schema/jboss-common_9_0.xsd b/common/src/main/resources/schema/jboss-common_9_0.xsd index dc6dde5af..139b9b299 100644 --- a/common/src/main/resources/schema/jboss-common_9_0.xsd +++ b/common/src/main/resources/schema/jboss-common_9_0.xsd @@ -17,9 +17,9 @@ ~ limitations under the License. --> diff --git a/ear/src/main/java/org/jboss/metadata/ear/parser/jboss/Namespace.java b/ear/src/main/java/org/jboss/metadata/ear/parser/jboss/Namespace.java index d1359c63c..b67bb0198 100644 --- a/ear/src/main/java/org/jboss/metadata/ear/parser/jboss/Namespace.java +++ b/ear/src/main/java/org/jboss/metadata/ear/parser/jboss/Namespace.java @@ -31,7 +31,7 @@ public enum Namespace { // must be first UNKNOWN(null), JBOSS("http://www.jboss.com/xml/ns/javaee"), - JBOSS_JAKARTA("http://www.jboss.com/xml/ns/jakartaee"), + JBOSS_JAKARTA("urn:jboss:jakartaee:1.0"), SPEC("http://java.sun.com/xml/ns/javaee"), SPEC_7_0("http://xmlns.jcp.org/xml/ns/javaee"), JAKARTAEE("https://jakarta.ee/xml/ns/jakartaee"); diff --git a/ear/src/main/java/org/jboss/metadata/ear/spec/EarVersion.java b/ear/src/main/java/org/jboss/metadata/ear/spec/EarVersion.java index 0d24d1115..6fbfea16a 100644 --- a/ear/src/main/java/org/jboss/metadata/ear/spec/EarVersion.java +++ b/ear/src/main/java/org/jboss/metadata/ear/spec/EarVersion.java @@ -42,7 +42,7 @@ public enum EarVersion { APP_9_0("https://jakarta.ee/xml/ns/jakartaee/application_9.xsd", "9.0", JavaEEVersion.V9), APP_10_0("https://jakarta.ee/xml/ns/jakartaee/application_10.xsd", "10.0", JavaEEVersion.V10); - private static final Map bindings = new HashMap(); + private static final Map bindings = new HashMap<>(); private final String location; private final String version; diff --git a/ear/src/main/resources/schema/jboss-app_9_0.xsd b/ear/src/main/resources/schema/jboss-app_9_0.xsd index ef52a8ab3..0cc3989c9 100644 --- a/ear/src/main/resources/schema/jboss-app_9_0.xsd +++ b/ear/src/main/resources/schema/jboss-app_9_0.xsd @@ -19,8 +19,8 @@ @@ -28,27 +28,27 @@ + version="9.0"> ... The instance documents may indicate the published version of the schema using the xsi:schemaLocation attribute for the - Java EE namespace with the following location: + Jakarta EE namespace with the following location: - https://www.jboss.org/schema/jbossas/jboss-app_10_0.xsd + https://www.jboss.org/schema/jbossas/jboss-app_9_0.xsd ]]> diff --git a/ear/src/test/resources/org/jboss/test/metadata/ear/Ear10xEverything_testEverything.xml b/ear/src/test/resources/org/jboss/test/metadata/ear/Ear10xEverything_testEverything.xml index 1b6131b09..57672b889 100644 --- a/ear/src/test/resources/org/jboss/test/metadata/ear/Ear10xEverything_testEverything.xml +++ b/ear/src/test/resources/org/jboss/test/metadata/ear/Ear10xEverything_testEverything.xml @@ -1,8 +1,7 @@ ApplicationName @@ -926,8 +925,8 @@ appManagedExecutor1-desc appManagedExecutor1-name appManagedExecutor1-contextServiceRef - 1 1 + 1 appManagedExecutor1Property1Name appManagedExecutor1Property1Value @@ -941,8 +940,8 @@ appManagedExecutor2-desc appManagedExecutor2-name appManagedExecutor2-contextServiceRef - 2 2 + 2 appManagedExecutor2Property1Name appManagedExecutor2Property1Value @@ -961,8 +960,8 @@ appManagedScheduledExecutor1-desc appManagedScheduledExecutor1-name appManagedScheduledExecutor1-contextServiceRef - 1 1 + 1 appManagedScheduledExecutor1Property1Name appManagedScheduledExecutor1Property1Value @@ -976,8 +975,8 @@ appManagedScheduledExecutor2-desc appManagedScheduledExecutor2-name appManagedScheduledExecutor2-contextServiceRef - 2 2 + 2 appManagedScheduledExecutor2Property1Name appManagedScheduledExecutor2Property1Value diff --git a/ear/src/test/resources/org/jboss/test/metadata/ear/JBossApp9xEverything_testEverything.xml b/ear/src/test/resources/org/jboss/test/metadata/ear/JBossApp9xEverything_testEverything.xml index 0f207e7d2..535390123 100644 --- a/ear/src/test/resources/org/jboss/test/metadata/ear/JBossApp9xEverything_testEverything.xml +++ b/ear/src/test/resources/org/jboss/test/metadata/ear/JBossApp9xEverything_testEverything.xml @@ -21,9 +21,9 @@ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. --> - diff --git a/ejb/src/main/java/org/jboss/metadata/ejb/parser/jboss/ejb3/Namespace.java b/ejb/src/main/java/org/jboss/metadata/ejb/parser/jboss/ejb3/Namespace.java index 903c9eeba..594997314 100644 --- a/ejb/src/main/java/org/jboss/metadata/ejb/parser/jboss/ejb3/Namespace.java +++ b/ejb/src/main/java/org/jboss/metadata/ejb/parser/jboss/ejb3/Namespace.java @@ -31,7 +31,7 @@ public enum Namespace { // must be first UNKNOWN(null), JBOSS("http://www.jboss.com/xml/ns/javaee"), - JBOSS_JAKARTA("http://www.jboss.com/xml/ns/jakartaee"), + JBOSS_JAKARTA("urn:jboss:jakartaee:1.0"), SPEC("http://java.sun.com/xml/ns/javaee"), SPEC_7_0("http://xmlns.jcp.org/xml/ns/javaee"), JAKARTAEE("https://jakarta.ee/xml/ns/jakartaee"); @@ -49,7 +49,7 @@ public String getUriString() { private static final Map MAP; static { - final Map map = new HashMap(); + final Map map = new HashMap<>(); for (Namespace namespace : values()) { final String name = namespace.getUriString(); if (name != null) map.put(name, namespace); diff --git a/ejb/src/main/resources/schema/jboss-ejb3-4_0.xsd b/ejb/src/main/resources/schema/jboss-ejb3-4_0.xsd index 41e4494cd..3d8e473b9 100644 --- a/ejb/src/main/resources/schema/jboss-ejb3-4_0.xsd +++ b/ejb/src/main/resources/schema/jboss-ejb3-4_0.xsd @@ -17,8 +17,8 @@ ~ limitations under the License. --> ... diff --git a/web/src/test/resources/org/jboss/test/metadata/web/JBossWeb150_testClustering.xml b/web/src/test/resources/org/jboss/test/metadata/web/JBossWeb150_testClustering.xml index 2d55ed303..e2eb9170c 100644 --- a/web/src/test/resources/org/jboss/test/metadata/web/JBossWeb150_testClustering.xml +++ b/web/src/test/resources/org/jboss/test/metadata/web/JBossWeb150_testClustering.xml @@ -1,6 +1,6 @@ - + 10 diff --git a/web/src/test/resources/org/jboss/test/metadata/web/JBossWeb150_testReplicationConfig.xml b/web/src/test/resources/org/jboss/test/metadata/web/JBossWeb150_testReplicationConfig.xml index df6e1fef7..124b0e6e9 100644 --- a/web/src/test/resources/org/jboss/test/metadata/web/JBossWeb150_testReplicationConfig.xml +++ b/web/src/test/resources/org/jboss/test/metadata/web/JBossWeb150_testReplicationConfig.xml @@ -1,6 +1,6 @@ - + testCache