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

PlantUML version upgrade? #34

Open
lwalker-kforce opened this issue Apr 5, 2020 · 6 comments
Open

PlantUML version upgrade? #34

lwalker-kforce opened this issue Apr 5, 2020 · 6 comments

Comments

@lwalker-kforce
Copy link

Are there any plans to upgrade the PlantUML jar to a more current version? The latest is 1.2020.6...

@tillig
Copy link

tillig commented May 14, 2020

There might be a workaround here where you can specify PLANTUML_HOME in the environment to point to your own JAR file.

I ran into this same issue and started digging, I'm going to try it.

@tillig
Copy link

tillig commented May 14, 2020

I did get it working, but you also have to make sure you have vizjs.jar and the appropriate j2v8 jar file available as noted in the VizJS docs here. As a hack, I set up a folder called vendor and followed the pattern you see once you've installed the module. If you look in node_modules you see:

node_modules/
  node-plantuml/
    vendor/
      j2v8_macosx_x86_64-3.1.6.jar
      plantuml.jar
      vizjs.jar

The j2v8****.jar is installed based on your OS.

I created my own folder vendor outside of this, put the new plantuml.jar in there, and copied the other two files.

vendor/
  j2v8_macosx_x86_64-3.1.6.jar
  plantuml.jar # the new version
  vizjs.jar

Then I set my environment variable PLANTUML_HOME to point to .../vendor/plantuml.jar - the new location.

This seems to work. Without the other two JAR files you get errors about GraphViz missing. I gather I could add some paths to the environment to avoid copying the other two files, but in the end I found that the new version of PlantUML still doesn't really support a couple of the things that I think are in progress, so the upgrade doesn't help me. I didn't bother pursuing it further.

@FarhadG
Copy link

FarhadG commented Aug 27, 2020

@tillig are you able to produce a PR for this fix so the community can leverage this broken upgrade?

@tillig
Copy link

tillig commented Aug 27, 2020

Unfortunately it's been a long while since I had this working and my hack wasn't something I could push - as you noticed, I got it working by hacking environment variables and such, which isn't a PR-able thing. Since I didn't pursue it beyond the hack, I never actually got it fixed, and I've moved on to other things. I hate to sound selfish, but until I actually need to totally fix it for something I'm working on, I likely won't be back with a PR any time soon. Sorry.

@FarhadG
Copy link

FarhadG commented Aug 27, 2020

Thanks for the quick response, @tillig! I totally get it and wasn't sure if the solution was in a state for PR. I'll see if I can prepare something for a PR as it would be nice to get this to work again

@adrianvlupu
Copy link
Contributor

As a workaround, using it programmatically, I ended up with something like this, requiring the module after setting the process.env.PLANTUML_HOME

...
process.env.PLANTUML_HOME = path.join(__dirname, 'vendor', ver.jar);
const plantuml = require('node-plantuml');

plantuml
    .generate(path.join(item.dir, pumlFile), { format: options.DIAGRAM_FORMAT, charset: options.CHARSET })
    .out
    .pipe(stream);
...

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

No branches or pull requests

4 participants