Multiple different output documents with maven plugin?

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

Multiple different output documents with maven plugin?

wimdeblauwe
Hi,

is it possible with the Maven plugin to generate multiple output files. I do not mean HTML and PDF versions of the same input document, but having different input documents in 1 maven project and generating HTML and/or PDF for each of those?

I would like to add end-user manual and technical documentation using asciidoctor to my Maven project. I don't want to mix those ofcourse. I guess I can work around by making different Maven projects, but this would lead me from a single module Maven project to a 3 module Maven project. It would be great if that is not really needed.

regards,

Wim
Reply | Threaded
Open this post in threaded view
|

Re: Multiple different output documents with maven plugin?

abelsromero
If I correctly understand your case, you want to mix in one single maven project several documentation with different treatments. It's not a bad idea since you may need to create references/includes between them.

You should be able to do this setting different <execution> blocks, each one pointing to a different folder using the sourceDirectory parameter.
The only requirement is that you must split the documents into different folders, I would recomend identifieng folders with its purpouse instead of format:
    \end-user manual
    \technical documentation

instead of:
    \html
    \pdf
Reply | Threaded
Open this post in threaded view
|

Re: Multiple different output documents with maven plugin?

wimdeblauwe
Hi,

thanks for the tip. I managed to get it working by adding a new example on my fork of asciidoctor-maven-examples. See https://github.com/wimdeblauwe/asciidoctor-maven-examples/commit/af86224f3d437d338dced562a5579a455842f0ab

If you want it in the official repo, let me know, I will create a pull request then.

regards,

Wim

2015-01-10 20:15 GMT+01:00 abelsromero [via Asciidoctor :: Discussion] <[hidden email]>:
If I correctly understand your case, you want to mix in one single maven project several documentation with different treatments. It's not a bad idea since you may need to create references/includes between them.

You should be able to do this setting different <execution> blocks, each one pointing to a different folder using the sourceDirectory parameter.
The only requirement is that you must split the documents into different folders, I would recomend identifieng folders with its purpouse instead of format:
    \end-user manual
    \technical documentation

instead of:
    \html
    \pdf



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Multiple-different-output-documents-with-maven-plugin-tp2660p2661.html
To unsubscribe from Multiple different output documents with maven plugin?, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Multiple different output documents with maven plugin?

abelsromero
We can include this example, but I think It would even better if instead of just focusing on the folder configuration we focus on showing how to hande multiple exections. What do you think?

For instance, addapt the example to your own needs showing the usage of different parameters (e.g. backend, highlight syntax, images path, attributes, etc., whatever you want). The examples should clearly show the impact of the parameters values, and don't forget to add the corresponding explanation in the readme.adoc.

Send a Pull Request, and we can continue reviewing the example on github.
Reply | Threaded
Open this post in threaded view
|

Re: Multiple different output documents with maven plugin?

wimdeblauwe
Hi,

Sounds like a great idea. I just started using Asciidoctor 2 days ago, so I don't know enough about it yet to create a full example like you ask. Is it ok to just send the pull request as is now? Or maybe you want to change the name of the example to something more appropriate first?

regards,

Wim

2015-01-11 9:30 GMT+01:00 abelsromero [via Asciidoctor :: Discussion] <[hidden email]>:
We can include this example, but I think It would even better if instead of just focusing on the folder configuration we focus on showing how to hande multiple exections. What do you think?

For instance, addapt the example to your own needs showing the usage of different parameters (e.g. backend, highlight syntax, images path, attributes, etc., whatever you want). The examples should clearly show the impact of the parameters values, and don't forget to add the corresponding explanation in the readme.adoc.

Send a Pull Request, and we can continue reviewing the example on github.


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Multiple-different-output-documents-with-maven-plugin-tp2660p2663.html
To unsubscribe from Multiple different output documents with maven plugin?, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Multiple different output documents with maven plugin?

abelsromero
I don't see a problem with the name and the current example is almost perfect.
Just adapt the .adoc files and the readme to explain what you're doing, For instance the readme only talks about HTML5 conversion, maybe add a small note on each source folder and the output format.

Take your time and if you can, please squash the commits before the PR.
Reply | Threaded
Open this post in threaded view
|

Re: Multiple different output documents with maven plugin?

mojavelinux
Administrator
Nice work!

> Take your time and if you can, please squash the commits before the PR.

Indeed. Ideally, each pull request should be a single commit. That way, it's easy to trace the addition in the history. If you need help with squashing commits, I recommend the rebase tutorial from Atlassian. See:

https://www.atlassian.com/git/tutorials/rewriting-history/git-rebase-i

Cheers,

-Dan

On Sun, Jan 11, 2015 at 8:32 AM, abelsromero [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I don't see a problem with the name and the current example is almost perfect.
Just adapt the .adoc files and the readme to explain what you're doing, For instance the readme only talks about HTML5 conversion, maybe add a small note on each source folder and the output format.

Take your time and if you can, please squash the commits before the PR.


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Multiple-different-output-documents-with-maven-plugin-tp2660p2665.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--