Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import local schema to avoid DNS lookup in build #4933

Merged
merged 1 commit into from
Nov 8, 2022

Conversation

jgneff
Copy link
Contributor

@jgneff jgneff commented Nov 6, 2022

This pull request changes two files to fix apache/netbeans#4920.

  1. It modifies jakartaee_9.xsd to import the "xml:" namespace from a local copy of xml.xsd instead of importing it remotely from http://www.w3.org/2001/xml.xsd.
  2. It replaces the local xml.xsd file with the latest version dated 2009-01 instead of the previous copy which seems to have been derived from the earliest version dated 2001-03.

Furthermore, I made the following changes to the xml.xsd file from the W3C:

  • I removed the XML stylesheet because it causes a same-origin policy error in Firefox when viewing the file locally: "Error loading stylesheet: An unknown error has occurred (805303f4)."
  • I added the current W3C Software and Document Notice and License as a comment formatted with an 80-character line length.
  • I removed all trailing whitespace in the file.

How can I test this fix locally? I tried the following two test targets. The first one worked, but the second one failed.

$ ant -quiet -Dmetabuild.branch=release160 -Dcluster.config=release commit-validation
$ ant -quiet -Dmetabuild.branch=release160 -Dcluster.config=release test-basic

Let's add this to NetBeans 16 only if someone far more knowledgeable than I am about JavaEE and Jakarta can review and approve it. Otherwise, I have a workaround and can wait for the fix in NetBeans 17.

@mbien mbien added Java EE/Jakarta EE [ci] enable enterprise job build labels Nov 6, 2022
@neilcsmith-net neilcsmith-net added the do not merge Don't merge this PR, it is not ready or just demonstration purposes. label Nov 7, 2022
@neilcsmith-net neilcsmith-net added this to the NB16 milestone Nov 7, 2022
@neilcsmith-net
Copy link
Member

neilcsmith-net commented Nov 7, 2022

Requested reviews and we'll see if we have a 16-rc4. Can you move the commit (rebase onto) delivery, so that it's possible to merge there if necessary. Actually, changed base is clean. Thanks!

@neilcsmith-net neilcsmith-net changed the base branch from master to delivery November 7, 2022 09:46
Copy link
Contributor

@juneau001 juneau001 left a comment

Choose a reason for hiding this comment

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

Looks like a good remedy to prevent Maven from trying to obtain the xml.xsd from the schema source location.

@mbien
Copy link
Member

mbien commented Nov 7, 2022

will we remember to do the same for the next xsd which is added? :)

@jgneff
Copy link
Contributor Author

jgneff commented Nov 7, 2022

Actually, changed base is clean. Thanks!

Thanks, Neil. My local pull-request branch is also based off the delivery branch. I didn't notice that GitHub used the master branch as a base by default. Good to know.

@neilcsmith-net neilcsmith-net removed the do not merge Don't merge this PR, it is not ready or just demonstration purposes. label Nov 8, 2022
@neilcsmith-net neilcsmith-net merged commit 2dbc0fe into apache:delivery Nov 8, 2022
@jgneff jgneff deleted the import-local-schema branch November 10, 2022 22:10
jgneff added a commit to jgneff/strictly-netbeans that referenced this pull request Nov 10, 2022
Revert back to building the binary release with the default cluster
configuration (release) now that NetBeans 16-rc4 includes:

  Import local schema to avoid DNS lookup in build
  apache/netbeans#4933

which fixes:

  Build fails with UnknownHostException: www.w3.org
  apache/netbeans#4920
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Java EE/Jakarta EE [ci] enable enterprise job
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build fails with UnknownHostException: www.w3.org
4 participants