Skip to content

MYFACES-4654: Support Schema Validation for 4.1#805

Merged
volosied merged 5 commits into
apache:4.1.xfrom
volosied:schemas
Nov 26, 2024
Merged

MYFACES-4654: Support Schema Validation for 4.1#805
volosied merged 5 commits into
apache:4.1.xfrom
volosied:schemas

Conversation

@volosied
Copy link
Copy Markdown
Contributor

@volosied volosied commented Nov 20, 2024

Pulled from https://jakarta.ee/xml/ns/jakartaee/

  1. web services client xsd was pulled in to fix this error:
jakarta.faces.FacesException: org.xml.sax.SAXParseException; systemId: file:... jakartaee_11.xsd; lineNumber: 106; columnNumber: 52; src-resolve: Cannot resolve the name ‘jakartaee:service-refGroup’ to a(n) ‘group’ component.
  1. standard config xml was updated to 2.3 because <client-window-factory>org.apache.myfaces.lifecycle.clientwindow.ClientWindowFactoryImpl</client-window-factory> is used. It was added in 2.3. Otherwise validation failures for 2.0 to 2.2.

  2. Added support for XML validation for 2.2-4.1

  3. DTD for 1.0 still works. Verifed via

<?xml version="1.0"?>
<!DOCTYPE facelet-taglib PUBLIC
"-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
"https://java.sun.com/dtd/facelet-taglib_1_0.dtd">
<facelet-taglib>
...
  1. This change will be ported to earlier versions, but later on. I'll keep the JIRA open for now.

@volosied volosied self-assigned this Nov 20, 2024
@volosied volosied marked this pull request as draft November 20, 2024 15:54
@volosied
Copy link
Copy Markdown
Contributor Author

@bohmber @tandraschko Can I pull in these xsd files? My concern is the copyrights.

SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

@volosied
Copy link
Copy Markdown
Contributor Author

I get the get the feeling it's a no -

This is a copyleft license, meaning that any derivative works created using GPLv2 code must also be released under the GPLv2, which can be incompatible with the more flexible Apache license.

@volosied
Copy link
Copy Markdown
Contributor Author

But tomcat also has it? https://github.com/apache/tomcat/blob/main/java/jakarta/servlet/resources/jakartaee_11.xsd

I'm honestly not sure.

@tandraschko
Copy link
Copy Markdown
Member

no idea, sorry

@melloware
Copy link
Copy Markdown
Contributor

It is very weird these are GPL2?

@bohmber
Copy link
Copy Markdown
Contributor

bohmber commented Nov 21, 2024

ASF 3rd Party License Policy
EPL 2.0 is Category B only the object/binary form is allowed. But there is an exception:

For small amounts of source code that the ASF product directly consumes at runtime, and for which that source is unmodified and unlikely to be changed anyway (say, by virtue of being specified by a standard), you may include appropriately labeled source code. An example of this is the web-facesconfig_1_0.dtd, whose inclusion is mandated by the JSR 127: JavaServer Faces specification.

@volosied
Copy link
Copy Markdown
Contributor Author

Sounds like we should be allowed to include these schemas in MyFaces then? Any objections?

I would like to use the official files over copying our older files and editing them for EE11.

@melloware
Copy link
Copy Markdown
Contributor

No objections here

Comment thread impl/src/main/java/org/apache/myfaces/config/ConfigFilesXmlValidationUtils.java Outdated
@volosied volosied changed the title MYFACES-4654: EE11 Schemas MYFACES-4654: Support Schema Validation for 4.1 Nov 26, 2024
@volosied volosied marked this pull request as ready for review November 26, 2024 18:36
@bohmber
Copy link
Copy Markdown
Contributor

bohmber commented Nov 26, 2024

@volosied all these new files are CDDL or EPL-2.0?

@bohmber bohmber self-requested a review November 26, 2024 19:34
Copy link
Copy Markdown
Contributor

@bohmber bohmber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these new files are CDDL or EPL-2.0?

@volosied
Copy link
Copy Markdown
Contributor Author

volosied commented Nov 26, 2024

I retrieved the javaee files from http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/index.html

Looking at the documentation within:

The contents of this file are subject to the terms of either the GNU
      General Public License Version 2 only ("GPL") or the Common Development
      and Distribution License("CDDL")

@volosied
Copy link
Copy Markdown
Contributor Author

volosied commented Nov 26, 2024

So they are both. Some are EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 (for JakartaEE Files) while the older ones (JavaEE Files) are CDDL+GPL_1_1

@volosied volosied merged commit 4d00f1f into apache:4.1.x Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants