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

jing-trang should install dependent .jar files to build directory or symlink them #53099

Closed
4 tasks done
ujay68 opened this issue Apr 13, 2020 · 4 comments
Closed
4 tasks done
Labels
outdated PR was locked due to age stale No recent activity

Comments

@ujay68
Copy link

ujay68 commented Apr 13, 2020

The jing-trang formula installs the files jing.jar and trang.jar to /usr/local/Cellar/jing-trang/20181222/libexec/build, and the dependent jars to /usr/local/Cellar/jing-trang/20181222/libexec/lib. However, jing.jar:META-INF/MANIFEST.MF sets a Class-Path that references the dependent jar files from that same directory, so they aren't found when jing.jar is launched as an executable jar file. This restricts jing's functionality and may lead to spurious errors, like because jing will be using Java's bundled and buggy XSLT processor instead of Saxon's. See, eg, relaxng/jing-trang#257.

The formula should either install all .jar files to libexec/build or symlink all .jar files from libexec/lib to libexec/build.

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

  • ran brew update and can still reproduce the problem?
  • ran brew doctor, fixed all issues and can still reproduce the problem?
  • ran brew gist-logs <formula> (where <formula> is the name of the formula that failed) and included the output link?
    -- Error: No logs.
  • if brew gist-logs didn't work: ran brew config and brew doctor and included their output with your issue?

$ brew config
HOMEBREW_VERSION: 2.2.13
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: 3d9cf83
Last commit: 3 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 2a5aa6f
Core tap last commit: 71 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.…/org.macosforge.xquartz:0
HOMEBREW_MAKE_JOBS: 8
CPU: octa-core 64-bit kabylake
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
Clang: 11.0 build 1103
Git: 2.26.0 => /usr/local/bin/git
Curl: 7.64.1 => /usr/bin/curl
Java: 11.0.6, 1.8.0_242
macOS: 10.15.4-x86_64
CLT: 11.0.33.17
Xcode: 11.4
XQuartz: 2.7.11 => /opt/X11

$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run brew link on these:
gnupg

What you were trying to do (and why)

Running Jing to do a Schematron validation (see relaxng/jing-trang#257)

What happened (include command output)

Command output
ERROR:  'Namespace for prefix 't' has not been declared.'
fatal: exception "java.lang.RuntimeException" thrown: Namespace for prefix 't' has not been declared.  

What you expected to happen

The Schematron should have worked. It does if you symlink the dependent .jar files from the libexec/lib to the libexec/build folder.

Step-by-step reproduction instructions (by running brew install commands)

$ brew install jing-trang
$ jing test.sch test.xml

@SMillerDev
Copy link
Member

Shouldn't the classpath be updated to include the new (more logical) directory instead?

@stale
Copy link

stale bot commented May 6, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale No recent activity label May 6, 2020
@ujay68
Copy link
Author

ujay68 commented May 7, 2020

Yes, one could update the classpath. However, this would mean to either modify the build instructions of the original jing-trang project or to patch the binaries jing.jar and trang.jar afterwards, specifically, the META-INF/MANIFEST.MF files inside. Not worth the effort, IMO. I think it would be much easier to just keep the directory layout of the original project, even if it isn't perfect.

@stale stale bot removed the stale No recent activity label May 7, 2020
@stale
Copy link

stale bot commented May 30, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale No recent activity label May 30, 2020
@stale stale bot closed this as completed Jun 6, 2020
@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Dec 2, 2020
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Dec 2, 2020
BrewTestBot pushed a commit that referenced this issue Nov 24, 2022
jing-trang fix #53099

This fixes the issue identified in #53099.
As a result of this chang jing can validate against schematron schema.
Without this fix a fatal error is returned:
% jing http://docs.oasis-open.org/docbook/xml/5.0/sch/docbook.sch xmldoc/readme.xml
ERROR:  'Namespace for prefix 'db' has not been declared.'

Closes #114567.

Signed-off-by: Sean Molenaar <[email protected]>
Signed-off-by: BrewTestBot <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age stale No recent activity
Projects
None yet
Development

No branches or pull requests

3 participants