eclipse-ee4j / starter

Eclipse Starter for Jakarta EE
Eclipse Public License 2.0
50 stars 38 forks source link

web.xml should toggle xmlns btw. Jakarta 8 and 9+ (JCP vs Jakarta EE namespace) #174

Closed scottkurz closed 1 year ago

scottkurz commented 1 year ago

In archetype/src/main/resources/archetype-resources/src/main/webapp/WEB-INF/web.xml we toggle the schemaLocation based on 8 vs 9+.... we should also set the xmlns accordingly to the 8 vs 9+ namespaces

#if (${jakartaVersion} == '8')
#set ($webAppVersion = "4.0")
#set ($schemaLocation = "http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd")
#elseif ((${jakartaVersion} == '9') || (${jakartaVersion} == '9.1'))
#set ($webAppVersion = "5.0")
#set ($schemaLocation = "https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd")
#elseif (${jakartaVersion} == '10')
#set ($webAppVersion = "6.0")
#set ($schemaLocation = "https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd")
#end
<web-app version="$webAppVersion"
    xmlns="http://xmlns.jcp.org/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="$schemaLocation">
m-reza-rahman commented 1 year ago

Great catch! Will fix ASAP.

scottkurz commented 1 year ago

Great catch! Will fix ASAP.

Think I fixed it.