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

use jar-dependecies gem to track saxon jar in system #27

Open
mkristian opened this issue Mar 5, 2018 · 3 comments
Open

use jar-dependecies gem to track saxon jar in system #27

mkristian opened this issue Mar 5, 2018 · 3 comments

Comments

@mkristian
Copy link

@fidothe actually when you tried to ping my on gitter I was not able to get back to you.

I looked at your PR #20 and it looks OK. I really would like this gem to use jar-dependencies to load the jar as it gives more control which and whether jars are loaded with what version via jruby.

for this I would need to understand what use-case you wanted to solve with this PR:

  • there is already a saxon jar installed for the running JVM and you want to avoid loading the saxon jar again
  • another gem installed the jar and you do want avoid adding again to classpath

in short I am happy to provide an PR

@fidothe
Copy link
Owner

fidothe commented Mar 26, 2018

Hey, thanks for this - I'm really inexperienced with the wider Java ecosystem - I've used Gradle through a bit of Android programming, but haven't directly used Maven. I'm not sure I understand the implications of moving to jar-dependencies, and I'm bandwidth constrained at the moment (2-month-old smol human). I'll very happily take a PR for this, but it may take a while to merge it while I try and understand the wider context (it feels like Maven would solve some other problems for me, like automated integration of Saxon releases, so I'm keen to get my head around it)

@fidothe
Copy link
Owner

fidothe commented May 18, 2018

@mkristian, coming back to this issue, I have afew questions about how jar-dependencies will help here. The problem is that the Saxon core classes (net.sf.saxon.Configuration, say) are provided in three differently named jars, depending on whether you're using the open-source edition (HE) the professional edition (PE), or the enterprise edition (EE).

So, all the core classes are in all of the following jars:

  • saxon9-he.jar
  • saxon9-pe.jar
  • saxon9-ee.jar

I want to bundle the HE jar so that anyone can just get going without worrying about dependencies, but if someone's paid for the PE or EE version, I need them to be able to either put it on the CLASSPATH, or tell the wrapper where it is, and have saxon-xslt not add its vendored gem.

Poking around at jar-dependencies it looks like it would help manage different versions of, say, saxon9-he.jar, but doesn't help with the differently-named-jars-containing-the-same-classes problem I have here.

Am I missing something? (that would be great...)

@mkristian
Copy link
Author

@fidothe so I looked at the code and actually I would leave the loading as is but just register the saxon jar and its version via jar-dependencies, i.e. tell the jruby context what jars are loaded into the classloader. for this I need to extend jar-dependencies a bit to get this functionality into place. I do not have much time but I always keen on people to declare their used jars with jar-dependencies, as it helps bigger projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants