Login  Register

Re: Asciidoc and dependency management

Posted by nawroth on Sep 26, 2015; 12:24am
URL: https://discuss.asciidoctor.org/Asciidoc-and-dependency-management-tp3751p3755.html

Hi Michael!

I have every module provide a [modulename]-[version]-docs.jar, just
like normal jars (or sources or test-sources or javadoc jars common in
Java land).
The main documentation build unpacks those jars, and then all of the
documentation is built in one go.

It's quite easy to do this using Maven. For extra convience and some
additional magic, I built a Maven plugin for creating the docs jars.
I wouldn't be surprised if it's even easier using Gradle (we're
considering switching).

One nice feature of using dependency management is that modules can be
moved around without breaking anything.

Here's an outdated writeup of what we're doing:
http://neo4j.com/docs/2.2.5/community-docs.html

The tricky part over time, as the number of modules grow, is to find
the best location for all parts of the documentation.

Feel free to ask any questions you have about our setup!

/anders

2015-09-23 19:24 GMT+02:00 Michael_M [via Asciidoctor :: Discussion]
<[hidden email]>:

> I'm trying to figure out the best way to include documentation from other
> (independent) modules. I'm hoping that someone has done this before and can
> share some pointers.
>
> Let's assume that my project P depends on modules A and B. There are 3 Git
> repositories: P, A and B each reside in their own Git repository containing
> the source code and the documentation.
>
> Just as in the code, the dependencies  are specific to a particular version.
> So I want all include:: directives that point to A, to point to a specific
> git branch of A.
>
> There are 2 approaches I am considering:
> 1. Use attributes in the asciidoc document in P, and point to the specific
> version.
> E.g:
> :repo_a: https://raw.githubusercontent.com/username/project_A/v3.5
>
> My concern with this approach: what happens with the includes directives in
> A? And images?
>
> Approach 2: Use Gradle to handle the dependencies. I assume that Gradle
> would have to download the correct branch of A and B. I'm not sure how this
> could be setup with directory structures.
>
> Any thoughts?
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://discuss.asciidoctor.org/Asciidoc-and-dependency-management-tp3751.html
> To start a new topic under Asciidoctor :: Discussion, email
> [hidden email]
> To unsubscribe from Asciidoctor :: Discussion, click here.
> NAML