Maven - (Web)Site (Documentation) Phase

Card Puncher Data Processing

project.properties, for instance myProperty referenced in
  • environmentVariable, for instance JAVA_HOME
<project xmlns="http://maven.apache.org/DECORATION/1.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/DECORATION/1.4.0 http://maven.apache.org/xsd/decoration-1.4.0.xsd"
  name=.. >
  <bannerLeft>
    <name/>
    <src/>
    <alt/>
    <href/>
    <border/>
    <width/>
    <height/>
    <title/>
  </bannerLeft>
  <bannerRight>
    <name/>
    <src/>
    <alt/>
    <href/>
    <border/>
    <width/>
    <height/>
    <title/>
  </bannerRight>
  <googleAdSenseClient/>
  <googleAdSenseSlot/>
  <googleAnalyticsAccountId/>

  <publishDate position=.. format=.. />
  <version position=.. />
  <poweredBy>
    <logo name=.. href=.. img=.. position=.. alt=.. border=.. width=.. height=.. target=.. title=.. />
  </poweredBy>

  <!-- maven-fluido-skin. style, based on Twitter Bootstrap -->
  <!-- http://maven.apache.org/skins/maven-fluido-skin/ -->
  <skin>
    <groupId>org.apache.maven.skins</groupId>
    <artifactId>maven-fluido-skin</artifactId>
    <version>1.3.0</version>
  </skin>
  
  <body>
    <head/>
    <links>
      <item name=.. href=.. img=.. position=.. alt=.. border=.. width=.. height=.. target=.. title=.. />
    </links>
    <breadcrumbs>
      <item name=.. href=.. img=.. position=.. alt=.. border=.. width=.. height=.. target=.. title=.. />
    </breadcrumbs>

    <menu name=.. inherit=.. inheritAsRef=.. ref=.. img=.. alt=.. position=.. border=.. width=.. height=.. title=.. >
      <item collapse=.. ref=.. name=.. href=.. img=.. position=.. alt=.. border=.. width=.. height=.. target=.. title=.. >
        <description/>
        <item>...recursion...<item>
      </item>
    </menu>
    
    <!-- There is also preset menus -->
    <!-- a menu with links to all the generated reports for your project -->
    <menu ref="reports" />
     
    <!-- a menu with a link to the parent project's site -->
    <menu ref="parent" />

    <!-- a menu containing the links to the sites of the submodules of this project -->
    <menu ref="modules" />
    
    <footer/>
  </body>

  <custom/>
</project>
Content
Creating contentDirectory Structure
+- src/
   +- site/
      +- apt/
      |  +- index.apt
      |
      +- fml/
      |  +- general.fml
      |  +- faq.fml
      |
      +- xdoc/
      |  +- other.xml
      |
      +- markdown/
      |  +- readme.md
      |
      +- A markup language ..../
      |  +- ....
      |
      +- site.xml

You can add any arbitrary resource by including them in a resources directory as shown below. Additional CSS files can be picked up when they are placed in the css directory within the resources directory.
+- src/
   +- site/
      +- resources/
         +- css/
         |  +- site.css
         |
         +- images/
            +- pic1.jpg

Generation
To generate the (web)site, just use the mvn tool with the site phase as argument:
  • default where the result will be generated in the following directory: target/site.
mvn site
  • to get multi-modular project site in one folder.
mvn site:stage -DstagingDirectory=C:\TEMP\fullsite
Doxia supports several output formats, the site plugin only creates XHTML.After running 'mvn site:site' you will end up with this in your target directory:
+- target/
   +- site/
      +- css/
      |
      +- images/
      |
      +- index.html
      +- general.html
      +- faq.html
      +- other.html

The css and images directories contain stylesheets and images from the skin being used.
Documentation / Reference





Discover More
Card Puncher Data Processing
Maven

is a build tool. It is declarative build tool whereas ant is a procedural build tool. You can then change the build process by changing the process not the declaration. Most of the project declaration...
Card Puncher Data Processing
Maven - (Deploy|Distribution) Phase

This deploy phase copies: a (final) package a web site or the Javadoc documentation to a remote repository for sharing with other developers and projects. In most project builds, the deploy phase...
Card Puncher Data Processing
Maven - (Web)Site (Documentation) Phase

, for instance referenced in , for instance Creating contentDirectory StructureCSSmvnsite phase default where the...
Card Puncher Data Processing
Maven - Lifecycle

A Build Lifecycle is Made Up of Phases. To call all phase, you only need to call the last build phase to be executed, deploy: If you call a build phase, it will execute not only that build phase, but...
Card Puncher Data Processing
Maven - Markdown

The generation of documentation based on Markdown happens with/during the site phase. The doxia module manages several Markup Language How...
Card Puncher Data Processing
Maven - Mvn

-t,--toolchains -U,--update-snapshots Forces a check for updated releases and snapshots on remote repositories -up,--update-plugins Ineffective, only kept for backward compatibility -V,--show-version...
Card Puncher Data Processing
Maven - Phase (Build lifecycle)

A phase is a step in the build lifecycle, which is an ordered sequence of phases. When a phase is given, Maven will execute every phase in the sequence up to and including the one defined. Phases are...
Card Puncher Data Processing
Maven - Plugin (Mojo)

A plugin (in Maven 2.0) groups together goals by code. It's an independent unit of code for Maven. It look like a dependency. In Maven, there are: Build plugins. They will be executed during the...



Share this page:
Follow us:
Task Runner