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

wisdom-asciidoc-maven-plugin has no support for asciidoct-diagram #566

Open
Riduidel opened this issue Jan 20, 2017 · 6 comments
Open

wisdom-asciidoc-maven-plugin has no support for asciidoct-diagram #566

Riduidel opened this issue Jan 20, 2017 · 6 comments

Comments

@Riduidel
Copy link
Contributor

I would like to add plantuml diagrams in my asciidoc, bu it doesn't work with wisdom-asciidoc-maven-plugin.

Mimicking the asciidoctor-maven-plugin, I tried to add the asciidoctorj-diagram dependency, but it changed nothing.

So ...
Should I rewrite the wisdom-asciidoc-maven-plugin ?
Should I create a wisdom-asciidotorc-maven-plugin ?
What is the best way to integrate diagrams in asciidoc generated by Wisdom ?

@cescoffier
Copy link
Member

Did you try to update the "asciidoctor" version and then add the dependency ?

I never tried to integrate plantuml, but I agree it's pretty cool !

@Riduidel
Copy link
Contributor Author

No, i didn't tried that, but I think there is another way to do it.
If I understand correctly, the wisdom-asciidoc-maven-plugin directly fires the asciidoc system when a modification is detected.

What if I told you we can invoke maven-asciidoctor-plugin

There is a library, called Mojo Executor which allow one to call another plugin with configuration injected from Java code. using that library, it would be easy to have maven-asciidoc-plugin invoke the version of the asciidoctor-maven-plugin with the right set of options, and the right classpath.

What do you think ? Would it be a nice evolution of that plugin ?

@cescoffier
Copy link
Member

cescoffier commented Jan 20, 2017 via email

@Riduidel
Copy link
Contributor Author

Well, in fact, I have two options :

  1. use Mojo-Executor down the rabbit hole (dunno why you talk about Classloader issue : the other plugin has to be in MojoExecutor classpath, which means in plugin dependencies)
  2. Directly extend the AsciidoctorMojo. I'm less fond of this approach, for ideological reasons (composition over inheritance, blablabla)

Which one do you prefer ?

@cescoffier
Copy link
Member

cescoffier commented Jan 20, 2017 via email

@Riduidel
Copy link
Contributor Author

OK, I think I've tried to stretch my classloader-fu too much and got kicked in the balls.
As a consequence, I will downgrade my objective and just make sure our invocation of asciidoctor is clean enough to allow additional CLASSPATH to be used (and as a consequence allow asciidoctor-diagram to work, which was my initial goal).

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

2 participants