Dot (Graphviz) format in Asciidoctor-diagram (in a maven build)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Dot (Graphviz) format in Asciidoctor-diagram (in a maven build)

Jeremie Bresson
I am trying to run the example provided in this blog post:
http://asciidoctor.org/news/2014/02/18/plain-text-diagrams-in-asciidoctor/

I have added the corresponding snippet to
asciidoctor-maven-examples/asciidoctor-diagram-example/src/docs/asciidoc/example-manual.adoc

[graphviz, dot-example, svg]
----
digraph g {
    a -> b
    b -> c
    c -> d
    d -> a
}
----

The maven job is never ending. Maybe an end-less loop?

I have tried both versions (rubygems.asciidoctor.diagram.version):
* 1.3.1
* 1.2.1

Any help is appreciated.

PS: The "dot" command is available... At least "dot -V" prints "dot - graphviz version 2.38.0 (20140413.2041)"
Reply | Threaded
Open this post in threaded view
|

Re: Dot (Graphviz) format in Asciidoctor-diagram (in a maven build)

Robert.Panzer
What OS and what version of JRuby do you use?
If you are on Win and JRuby 9.x it could be that you have this problem:
https://github.com/jruby/jruby/issues/3473
This makes the asciidoctor rendering process hang.

Cheers
Robert
Reply | Threaded
Open this post in threaded view
|

Re: Dot (Graphviz) format in Asciidoctor-diagram (in a maven build)

Robert.Panzer
In reply to this post by Jeremie Bresson
Reading your previous post its only Windows missing to "profit" from the issue I mentioned;)
Reply | Threaded
Open this post in threaded view
|

Re: Dot (Graphviz) format in Asciidoctor-diagram (in a maven build)

mojavelinux
Administrator
In reply to this post by Robert.Panzer
I can confirm that it works on Linux, at least when I try it.

-Dan

On Fri, Dec 11, 2015 at 3:34 PM, Robert.Panzer [via Asciidoctor :: Discussion] <[hidden email]> wrote:
What OS and what version of JRuby do you use?
If you are on Win and JRuby 9.x it could be that you have this problem:
https://github.com/jruby/jruby/issues/3473
This makes the asciidoctor rendering process hang.

Cheers
Robert


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Dot-Graphviz-format-in-Asciidoctor-diagram-in-a-maven-build-tp4067p4072.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen
Reply | Threaded
Open this post in threaded view
|

Re: Dot (Graphviz) format in Asciidoctor-diagram (in a maven build)

Jeremie Bresson
In reply to this post by Robert.Panzer
Your pointer on the JRuby Version is really great…

Downgrading to 1.7.21 is the solution.

Pull request to add a graphviz example in the asciidoctor-maven-examples:
https://github.com/asciidoctor/asciidoctor-maven-examples/pull/36

I have tried 1.7.23:
[INFO] --- asciidoctor-maven-plugin:1.5.2.1:process-asciidoc (generate-html-doc) @ asciidoctor-diagram-example ---
io/console not supported; tty will not be manipulated
[WARNING] Using inherited external environment to resolve gems (C:/****/git/asciidoctor-maven-examples/asciidoctor-diagram-example/target/gems-provided), i.e. build is platform dependent!
asciidoctor-diagram: ERROR: Failed to generate image: Unable to find a non world-writable directory for Dir::tmpdir. Consider setting ENV['TMPDIR'], ENV['TMP'] or ENV['TEMP'] to a non world-writable directory.
[INFO] Rendered C:\****\git\asciidoctor-maven-examples\asciidoctor-diagram-example\src\docs\asciidoc\example-manual.adoc

This is strange because I think the variables are defined…
>echo %TMPDIR%
%TMPDIR%

>echo %TMP%
C:\****\AppData\Local\Temp

>echo %TEMP%
C:\****\AppData\Local\Temp

PS: Yes I am on Windows… and I am not really happy with it…
Reply | Threaded
Open this post in threaded view
|

Re: Dot (Graphviz) format in Asciidoctor-diagram (in a maven build)

mojavelinux
Administrator

On Sat, Dec 12, 2015 at 12:40 AM, Jeremie Bresson [via Asciidoctor :: Discussion] <[hidden email]> wrote:
This is strange because I think the variables are defined…

This is either an Asciidoctor Diagram or an AsciidoctorJ issue. AsciidoctorJ does manipulate the environment, so it could be that it is dropping the environment variables. I guess it would be necessary to debug to find out if they are making it to Asciidoctor Diagram, or whether Asciidoctor Diagram is not considering these paths to be world writable. I'm not sure.

-Dan


--
Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen