开放个人docworks maven architype到github

fujohnwang

2011-03-25


author: fujohnwang

docbook maven build archetype project with docbkx maven plugin

Location: https://github.com/fujohnwang/docworks

This is my personal docbook project which helps me write a lot of blogs and articles. I had an Ant-based alike project before which helped me complete my first book - “UnveilSpring”(Spring揭秘 In Chinese), but it just works. After I moved to Maven, I found the docbkx maven plugin, so it finally helped me build this archetype project.

To start to use it, you need to know some common locations:

1- src/main/docbook

you put your docbook writings under this directory, sub-directories are allowed. In practice, you should create its own sub-directory for your articles, the reason is with each of your article, it not only contains words but also pictures and other media materials. So usually, before starting to write a new article, you create a sub-folder under src/main/docbook and at least create an “images” sub-folder to hold the images of your article, the real docbook writing will be dropped under this sub-folder directly.

Sounds tedious, don’t worry, I create some easy things to help you on this:

mvn -Pcreate

or

mvn -PcreateX -Dmodule=the path you want to create for your article

The former command will create a “tmpdir” under src/main/docbook, and copy article template and necessary images(addons and callout icons) to it, you can rename it after the command run. Of course, if you want to customize the name of the folder to be created, you can run the latter command. OK, that’s for src/main/docbook folder.

2- src/main/resources

I have collected necessary resources and put them under this folder, most of the time, you don’t need to worry about these things.

3- src/main/assembly

If you wan’t to distributed your articles, you can customize assembly descriptor under this folder, of course, using the default is ok. Since you have know everything necessary, and you may have put some docbook articles under the src/main/docbook folder, run “mvn package”, after that, you can get your generated document under “target/docs/html” folder, What? Build Error? Find out the reason yourself by focusing on your docbook document structure and elements ;-)

GL & HF


>>>>>> 更多阅读 <<<<<<


欢迎加入「福强私学」

跨越2190个日夜,始终坚持“实践 + 原创”打造的715125字专属知识库,囊括了(但不限于)从职场、技术、管理与商业等多个板块的内容。

  • 一个ChatGPT触达不到的地方
  • 一个带你超越AI/人工智能的地方
  • 一个与你一起成长的地方

https://afoo.me/kb.html


开天窗,拉认知,订阅「福报」,即刻拥有自己的全模态人工智能。

订阅「福报」