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

Added tip for combining Maven and Diagram #212

Closed
wants to merge 3 commits into from

Conversation

dashorst
Copy link
Contributor

Closes #207 and #196

@abelsromero
Copy link
Member

Thanks for the update :)
I have a couple of comments to add to it:

  • I understand the meaning but I think that the first line mentioning adding the gem can be missleading. Adding the asciidoctorj-diagram jar is enough since it already wraps the gem.
  • For the sake of completeness, I'd all both options. Using the maven resource plugin but also setting . The maven resource is the best one, so we could leave the other as a small note for simple cases.
  • The syntax used for the code examples is makdown-ish. The rest of the document (and being an Asciidoctor project one) uses AsciiDoc syntax.

wdyt?

@dashorst
Copy link
Contributor Author

If you remove the required gem from the configuration, asciidoctor-maven-plugin doesn't work with asciidoctor-diagram. I know because I just tried. Adding the gem is necessary.

Which setting are you talking about? You can't have static images and generated images without modifying both the imagedir attribute and adding the maven-resources-plugin.

@abelsromero
Copy link
Member

If you remove the required gem from the configuration, asciidoctor-maven-plugin doesn't work with asciidoctor-diagram. I know because I just tried. Adding the gem is necessary.

Totally my mistake ^^'' I am so used to just copying and pasting some examples that I forget about that. The only thing you don't need is the gemPath, but you do need the require.

Which setting are you talking about? You can't have static images and generated images without modifying both the imagedir attribute and adding the maven-resources-plugin.

Yes, thinking about it, the option to generate into the sources is not something I feel comfortable promoting.

BTW, since you're interested I had already worked on a prototype to integrate the maven-resources component into the plugin to be able to copy resources (#193) before the rendering, thought the 'before' part was not done yet.
In the end I just canceled it because I was adding to many things in a single PR, but I planned to integrate only the feature to copy resources as soon as possible. Please, let me know what do you think and if you need it I can push to implement it this week, or feel free to add it yourself if like it.
That's the last thing I'd like to add before doing a new release.
I am saying this because I am not sure if your contribution will be maintained after the change and I feel bad 😞 about that.

@dashorst
Copy link
Contributor Author

dashorst commented Mar 1, 2016

Well, if you fix the plugin, then that's even better.

I think you might want to keep the text though, but change the wording. Some resources might need to be copied prior to the asciidoctor plugin running, so for this particular case it is not useful anymore with your new release, but other resources (movies?), perhaps from other folders might need to be copied prior to asciidoctor running.

@abelsromero
Copy link
Member

I think you might want to keep the text though, but change the wording. Some resources might need to be copied prior to the asciidoctor plugin running, so for this particular case it is not useful anymore with your new release, but other resources (movies?), perhaps from other folders might need to be copied prior to asciidoctor running.

Apologies for taking so long to answer.
The answer is sure!, do you have some specific use case we can add with the new options? Also, keep in mind resources are copied before rendering.

@dashorst dashorst closed this Oct 29, 2020
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

Successfully merging this pull request may close these issues.

How to use ditaa blocks with maven
2 participants