0

When I generate the site documentation using the site plugin, all I see in the About page is the description of the archetype that I've specified in the <description> element of the archetype's POM.

How do I get to see something like the generated project's layout and the archetype usage like this? Do I only have to do that manually?

mystarrocks
  • 4,040
  • 2
  • 36
  • 61
  • That's just something that the authors have written to document how a project should be laid out. It is not an automatically generated map of their project. – Steve Aug 19 '14 at 14:09
  • @Steve, in that case, can you confirm if there's no way for generating such a map? If so, can you please post this as an answer, so I can accept it? I'd also like to understand how they wrote that manually, so I can do something similar. I was poking around their source codes, but it didn't look obvious to me. – mystarrocks Aug 19 '14 at 14:22
  • 1
    Ironically, it's on that map. :) It's the index.apt. See theirs: http://svn.apache.org/viewvc/maven/archetypes/trunk/maven-archetype-site/src/site/apt/index.apt.vm?view=markup – Steve Aug 19 '14 at 14:28
  • There are certainly ways to do it - perhaps even existing plugins I don't know about, so I won't put "it's impossible" as an answer. Hopefully someone else will provide an 'easy' way to do it. – Steve Aug 19 '14 at 14:30
  • @Steve, I was able to get this done using an appropriate `apt` file. And this sounds like the easiest of ways (even if there are other ways to do it), for me at least anyway. Can you please post this as an answer so I can accept it? – mystarrocks Aug 26 '14 at 02:39
  • Go on then ... one such answer added. :) – Steve Aug 26 '14 at 09:07

1 Answers1

1

The Maven Site plugin looks under src/site for documentation. By default it expects the documentation to be written using the Doxia Markup language. The project structure you reference is written using this markup. You can find it in the source code of src/site/apt/index.apt in the Maven archetypes project.

The markup for the project structure you mention is defined there:

34  +----+
35  
36  project
37  |-- pom.xml
38  `-- src
39      `-- site
40          |-- apt
41          |   |-- format.apt
42          |   `-- index.apt
43          |-- fml
44          |   `-- faq.fml
45          |-- fr
46          |   |-- apt
47          |   |   |-- format.apt
48          |   |   `-- index.apt
49          |   |-- fml
50          |   |   `-- faq.fml
51          |   `-- xdoc
52          |       `-- xdoc.xml
53          |-- xdoc
54          |   `-- xdoc.xml
55          |-- site_fr.xml
56          `-- site.xml
57  
58  +----+

It should be fairly obvious looking at that, how to write the markup for your own such structure. If you wish to auto-generate such a structure, then I suspect that you may need to write a simple Maven plugin to iterate through your project directories. I'm not aware of any preexisting plugins, but I wouldn't be surprised to find one out there.

Steve
  • 9,270
  • 5
  • 47
  • 61