Skip to content

Commit

Permalink
Merge pull request #159 from ehsavoie/JBMETA-440
Browse files Browse the repository at this point in the history
[JBMETA-440]: Use urn instead of URL for jboss namespaces.
  • Loading branch information
ehsavoie authored Sep 14, 2022
2 parents 4018315 + a2bb761 commit ba57ed9
Show file tree
Hide file tree
Showing 14 changed files with 47 additions and 48 deletions.
22 changes: 11 additions & 11 deletions appclient/src/main/resources/schema/jboss-client_9_0.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
-->
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:jboss="https://www.jboss.com/xml/ns/jakartaee"
targetNamespace="https://www.jboss.com/xml/ns/jakartaee"
xmlns:jboss="urn:jboss:jakartaee:1.0"
targetNamespace="urn:jboss:jakartaee:1.0"
version="9.0"
elementFormDefault="qualified"
>
Expand All @@ -28,29 +28,29 @@
<xsd:documentation>
<![CDATA[
This is the XML Schema for the JBoss 8.0 application client deployment descriptor.
This is the XML Schema for the JBoss 9.0 application client deployment descriptor.
The deployment descriptor must be named "META-INF/jboss-client.xml" in
the application client's jar file. All the application client deployment descriptors must indicate
the JBoss schema by using the Java EE namespace:
the JBoss schema by using the Jakarta EE namespace:
https://www.jboss.com/xml/ns/jakartaee
urn:jboss:jakartaee:1.0
and by indicating the version of the schema by
using the version attribute as shown below:
<jboss-client xmlns="https://www.jboss.com/xml/ns/jakartaee"
<jboss-client xmlns="urn:jboss:jakartaee:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.jboss.com/xml/ns/jakartaee
https://www.jboss.org/j2ee/schema/jboss-client_9_0.xsd"
version="8.1">
xsi:schemaLocation="urn:jboss:jakartaee:1.0
https://www.jboss.org/schema/jbossas/jboss-client_9_0.xsd"
version="9.0">
...
</jboss-client>
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
]]>
</xsd:documentation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class AppclientSpecDescriptorTestCase extends SpecDescriptorTestCase {
@Parameters
public static List<Object[]> 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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions common/src/main/resources/schema/jboss-common_9_0.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
~ limitations under the License.
-->
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.jboss.com/xml/ns/jakartaee"
targetNamespace="urn:jboss:jakartaee:1.0"
xmlns:jakartaee="https://jakarta.ee/xml/ns/jakartaee"
xmlns:jboss="http://www.jboss.com/xml/ns/jakartaee"
xmlns:jboss="urn:jboss:jakartaee:1.0"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
Expand All @@ -31,7 +31,7 @@
This XML Schema defines types, elements and model groups that common to all application-specific JBoss schemas.
The target namespace is
http://www.jboss.com/xml/ns/jakartaaee
urn:jboss:jakartaee:1.0
Online URL https://www.jboss.org/schema/jbossas/jboss-common_9_0.xsd
]]>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, EarVersion> bindings = new HashMap<String, EarVersion>();
private static final Map<String, EarVersion> bindings = new HashMap<>();

private final String location;
private final String version;
Expand Down
16 changes: 8 additions & 8 deletions ear/src/main/resources/schema/jboss-app_9_0.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -19,36 +19,36 @@
<xs:schema xmlns="urn:jboss:jakartaee:1.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:jakartaee="https://jakarta.ee/xml/ns/jakartaee"
xmlns:jboss="http://www.jboss.com/xml/ns/jakartaee"
targetNamespace="http://www.jboss.com/xml/ns/jakartaee"
xmlns:jboss="urn:jboss:jakartaee:1.0"
targetNamespace="urn:jboss:jakartaee:1.0"
version="9.0"
elementFormDefault="qualified">

<xs:annotation>
<xs:documentation>
<![CDATA[
This is the XML Schema for the JBoss AS7 EAR application deployment descriptor.
This is the XML Schema for the JBoss EAR application deployment descriptor.
The deployment descriptor must be named "jboss-app.xml" and placed in the
.ear/META-INF folder. All the descriptors must indicate
the JBoss schema by using the Java EE namespace:
the JBoss schema by using the Jakarta EE namespace:
urn:jboss:jakartaee:1.0
and by indicating the version of the schema by
using the version attribute as shown below:
<jboss-app xmlns="http://www.jboss.com/xml/ns/jakartaee"
<jboss-app xmlns="urn:jboss:jakartaee:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="8.1">
version="9.0">
...
</jboss-app>
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
]]>
</xs:documentation>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee
https://jakarta.ee/xml/ns/jakartaee/application_10.xsd"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/application_10.xsd"
version="10" id="application-test-everything">

<application-name>ApplicationName</application-name>
Expand Down Expand Up @@ -926,8 +925,8 @@
<description>appManagedExecutor1-desc</description>
<name>appManagedExecutor1-name</name>
<context-service-ref>appManagedExecutor1-contextServiceRef</context-service-ref>
<hung-task-threshold>1</hung-task-threshold>
<max-async>1</max-async>
<hung-task-threshold>1</hung-task-threshold>
<property id="appManagedExecutor1Property1-id">
<name>appManagedExecutor1Property1Name</name>
<value>appManagedExecutor1Property1Value</value>
Expand All @@ -941,8 +940,8 @@
<description>appManagedExecutor2-desc</description>
<name>appManagedExecutor2-name</name>
<context-service-ref>appManagedExecutor2-contextServiceRef</context-service-ref>
<hung-task-threshold>2</hung-task-threshold>
<max-async>2</max-async>
<hung-task-threshold>2</hung-task-threshold>
<property id="appManagedExecutor2Property1-id">
<name>appManagedExecutor2Property1Name</name>
<value>appManagedExecutor2Property1Value</value>
Expand All @@ -961,8 +960,8 @@
<description>appManagedScheduledExecutor1-desc</description>
<name>appManagedScheduledExecutor1-name</name>
<context-service-ref>appManagedScheduledExecutor1-contextServiceRef</context-service-ref>
<hung-task-threshold>1</hung-task-threshold>
<max-async>1</max-async>
<hung-task-threshold>1</hung-task-threshold>
<property id="appManagedScheduledExecutor1Property1-id">
<name>appManagedScheduledExecutor1Property1Name</name>
<value>appManagedScheduledExecutor1Property1Value</value>
Expand All @@ -976,8 +975,8 @@
<description>appManagedScheduledExecutor2-desc</description>
<name>appManagedScheduledExecutor2-name</name>
<context-service-ref>appManagedScheduledExecutor2-contextServiceRef</context-service-ref>
<hung-task-threshold>2</hung-task-threshold>
<max-async>2</max-async>
<hung-task-threshold>2</hung-task-threshold>
<property id="appManagedScheduledExecutor2Property1-id">
<name>appManagedScheduledExecutor2Property1Name</name>
<value>appManagedScheduledExecutor2Property1Value</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->

<jboss-app xmlns="http://www.jboss.com/xml/ns/jakartaee"
<jboss-app xmlns="urn:jboss:jakartaee:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.com/xml/ns/jakartaee https://www.jboss.org/schema/jbossas/jboss-app_9_0.xsd"
xsi:schemaLocation="urn:jboss:jakartaee:1.0 https://www.jboss.org/schema/jbossas/jboss-app_9_0.xsd"
version="9.0"
id="jboss-app-id">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -49,7 +49,7 @@ public String getUriString() {
private static final Map<String, Namespace> MAP;

static {
final Map<String, Namespace> map = new HashMap<String, Namespace>();
final Map<String, Namespace> map = new HashMap<>();
for (Namespace namespace : values()) {
final String name = namespace.getUriString();
if (name != null) map.put(name, namespace);
Expand Down
4 changes: 2 additions & 2 deletions ejb/src/main/resources/schema/jboss-ejb3-4_0.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
~ limitations under the License.
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.jboss.com/xml/ns/jakartaee"
xmlns="http://www.jboss.com/xml/ns/jakartaee"
targetNamespace="urn:jboss:jakartaee:1.0"
xmlns="urn:jboss:jakartaee:1.0"
xmlns:jakartaee="https://jakarta.ee/xml/ns/jakartaee"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
Expand Down
12 changes: 6 additions & 6 deletions web/src/main/resources/schema/jboss-web_15_0.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
~ limitations under the License.
-->
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.jboss.com/xml/ns/jakartaee"
targetNamespace="urn:jboss:jakartaee:1.0"
xmlns:jakartaee="https://jakarta.ee/xml/ns/jakartaee"
xmlns:jboss="http://www.jboss.com/xml/ns/jakartaee"
xmlns:jboss="urn:jboss:jakartaee:1.0"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
Expand All @@ -32,15 +32,15 @@
This is the XML Schema for the 15.0 version of the WildFly web application deployment descriptor.
The deployment descriptor must be named "WEB-INF/jboss-web.xml" in
the WAR file. All JBoss Web deployment descriptors must indicate
the JBoss schema by using the Java EE namespace:
the JBoss schema by using the Jakarta EE namespace:
http://www.jboss.com/xml/ns/jakartaee
urn:jboss:jakartaee:1.0
and by indicating the version of the schema using the version element as shown below:
<jboss-web xmlns="http://www.jboss.com/xml/ns/jakartaee"
<jboss-web xmlns="urn:jboss:jakartaee:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.com/xml/ns/jakartaee https://www.jboss.org/schema/jbossas/jboss-web_15_0.xsd"
xsi:schemaLocation="urn:jboss:jakartaee:1.0 https://www.jboss.org/schema/jbossas/jboss-web_15_0.xsd"
version="15.0">
...
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web version="15.0" xmlns="http://www.jboss.com/xml/ns/jakartaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.com/xml/ns/jakartaee https://www.jboss.org/j2ee/schema/jboss-web_15_0.xsd">
<jboss-web version="15.0" xmlns="urn:jboss:jakartaee:1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:jboss:jakartaee:1.0 https://www.jboss.org/schema/jbossas/jboss-web_15_0.xsd">

<max-active-sessions>10</max-active-sessions>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web version="15.0" xmlns="http://www.jboss.com/xml/ns/jakartaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jboss.com/xml/ns/jakartaaee https://www.jboss.org/j2ee/schema/jboss-web_15_0.xsd">
<jboss-web version="15.0" xmlns="urn:jboss:jakartaee:1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:jboss:jakartaee:1.0 https://www.jboss.org/j2ee/schema/jboss-web_15_0.xsd">

<replication-config>
<cache-name>testCache</cache-name>
Expand Down

0 comments on commit ba57ed9

Please sign in to comment.