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

Create a jekyll instance with plantuml plugin #16

Closed
evantill opened this issue Mar 21, 2023 · 7 comments
Closed

Create a jekyll instance with plantuml plugin #16

evantill opened this issue Mar 21, 2023 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@evantill
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
Having an environment to reproduce errors using plantuml with jekyll

Describe the solution you'd like
A container with jekyll, plantuml and a jekyll-plantumlplugin.

Additional context
Example of usage : trying to reproduce the plantuml#1082.

@evantill evantill added enhancement New feature or request and removed triage labels Mar 21, 2023
@evantill evantill self-assigned this Mar 21, 2023
@evantill
Copy link
Collaborator Author

evantill commented Mar 21, 2023

Trying to use Jekyll 4.2.2 starting with jekyll/jekyll as the base image

  • Bootstraping the new container component.
  • Installing plantuml inside it.
  • Testing to create a simple blog instance.
  • Adding some plantuml diagram.

@evantill
Copy link
Collaborator Author

Trying to run jekyll new blog hit this error:

bash-5.1# jekyll new blog3
ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [x86_64-linux-musl]
/usr/gem/gems/kramdown-1.17.0/lib/kramdown/parser/html.rb:10:in `require': cannot load such file -- rexml/parsers/baseparser (LoadError)
	from /usr/gem/gems/kramdown-1.17.0/lib/kramdown/parser/html.rb:10:in `<top (required)>'
	from /usr/gem/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/html.rb:10:in `require'
	from /usr/gem/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/html.rb:10:in `<top (required)>'
	from /usr/gem/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/paragraph.rb:14:in `require'
	from /usr/gem/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown/paragraph.rb:14:in `<top (required)>'
	from /usr/gem/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:345:in `require'
	from /usr/gem/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:345:in `<class:Kramdown>'
	from /usr/gem/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:60:in `<module:Parser>'
	from /usr/gem/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:19:in `<module:Kramdown>'
	from /usr/gem/gems/kramdown-1.17.0/lib/kramdown/parser/kramdown.rb:17:in `<top (required)>'
	from /usr/gem/gems/jekyll-3.8.7/lib/jekyll/converters/smartypants.rb:3:in `require'
	from /usr/gem/gems/jekyll-3.8.7/lib/jekyll/converters/smartypants.rb:3:in `<top (required)>'
	from /usr/gem/gems/jekyll-3.8.7/lib/jekyll.rb:13:in `require'
	from /usr/gem/gems/jekyll-3.8.7/lib/jekyll.rb:13:in `block in require_all'
	from /usr/gem/gems/jekyll-3.8.7/lib/jekyll.rb:12:in `each'
	from /usr/gem/gems/jekyll-3.8.7/lib/jekyll.rb:12:in `require_all'
	from /usr/gem/gems/jekyll-3.8.7/lib/jekyll.rb:194:in `<top (required)>'
	from /usr/gem/gems/jekyll-3.8.7/exe/jekyll:8:in `require'
	from /usr/gem/gems/jekyll-3.8.7/exe/jekyll:8:in `<top (required)>'
	from /usr/local/bundle/bin/jekyll:27:in `load'
	from /usr/local/bundle/bin/jekyll:27:in `<main>'

@evantill
Copy link
Collaborator Author

@evantill
Copy link
Collaborator Author

evantill commented Mar 21, 2023

Also facing this issue : Jekyll serve fails on Ruby 3.0 #8523

Using the provided workaround (bundle add webrick) solved this problem.

@evantill
Copy link
Collaborator Author

evantill commented Mar 21, 2023

Trying to downgrade to jekyll 3.8

running plantuml --version throw a NPE:

bash-5.0# java -version
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (IcedTea 3.12.0) (Alpine 8.212.04-r1)
OpenJDK 64-Bit Server VM (build 25.212-b04, mixed mode)
bash-5.0# plantuml
Exception in thread "main" java.lang.NullPointerException
	at sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1264)
	at sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:219)
	at sun.awt.FontConfiguration.init(FontConfiguration.java:107)
	at sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:774)
	at sun.font.SunFontManager$2.run(SunFontManager.java:431)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.font.SunFontManager.<init>(SunFontManager.java:376)
	at sun.awt.FcFontManager.<init>(FcFontManager.java:35)
	at sun.awt.X11FontManager.<init>(X11FontManager.java:57)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at java.lang.Class.newInstance(Class.java:442)
	at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:83)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)
	at sun.font.SunFontManager.getInstance(SunFontManager.java:250)
	at sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:264)
	at sun.java2d.SunGraphics2D.getFontMetrics(SunGraphics2D.java:864)
	at net.sourceforge.plantuml.Run.forceOpenJdkResourceLoad(Run.java:250)
	at net.sourceforge.plantuml.Run.main(Run.java:154)

AdoptOpenJDK/openjdk-docker#75
workaround docker-library/openjdk@0f82de1

# see https://bugs.debian.org/793210
# and https://github.com/docker-library/java/issues/46#issuecomment-119026586
RUN apt-get update && apt-get install -y --no-install-recommends libfontconfig1 && rm -rf /var/lib/apt/lists/*

@evantill
Copy link
Collaborator Author

First release of a jekyll container with plantuml installed :
https://github.com/plantuml/docker/pkgs/container/docker%2Fjekyll

Next step is to test plantuml usage in the container

@evantill
Copy link
Collaborator Author

closed by #29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant