About Standard Usage for Historic support

Before Starting

Before using, setup your project as described here: Standard Usage

Warning : The Dashboard plugin does not use an embedded database.

In order to use the Dashboard plugin with historic support, you have to respect the following steps :

  • Install any database which is compatible with Hibernate 3.2.2 .See Hibernate doc .
  • Create a schema
  • Create a user having all rights on this database schema

Configuring the database support

To add database support for dashboard plugin, you must configure the plugin in the build section in the POM as :

					
<project>
	[...]
	<build>
		[...]
		<plugins>
			[...]
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>dashboard-maven-plugin</artifactId>

				<!--jar file that has the jdbc driver -->
				<dependencies>
					<dependency>
						<groupId>xxxx</groupId>
						<artifactId>xxxxx</artifactId>
						<version>xxxx</version>
					</dependency>
				</dependencies>
				<!-- common configurations -->
				<configuration>
					<!-- set the hibernate dialect for your specific database -->
					<dialect>xxx</dialect>
					<!-- database driver classname -->
					<driverClass>xxxx</driverClass>
					<!-- database URL -->
					<connectionUrl>xxxx</connectionUrl>
					<!-- database username -->
					<username>xxxx</username>
					<!-- database password -->
					<password>xxxx</password>
				</configuration>
			</plugin>
			[...]
		</plugins>
		[...]
	</build>
	[...]
</project>
       
				

  • Note 1: To be able to run the plugin you don't need to add the hibernate jars as dependency in your pom.xml

  • Note 2: Only Hibernate 3.2.2 supported databases can be used. See Hibernate doc .

See this example to use an Apache Derby database :

					
[...]
<build>
	<plugins>
		<plugin>
			<groupId>org.codehaus.mojo</groupId>
			<artifactId>dashboard-maven-plugin</artifactId>
			<version>1.0-SNAPSHOT</version>
			<configuration>
				<dialect>org.hibernate.dialect.DerbyDialect</dialect>
				<driverClass>
					org.apache.derby.jdbc.ClientDriver
				</driverClass>
				<connectionUrl>
					jdbc:derby://localhost:1527/myDB;create=true
				</connectionUrl>
				<username>usr</username>
				<password>usr</password>
			</configuration>
			<dependencies>
				<dependency>
					<groupId>org.apache.derby</groupId>
					<artifactId>derbyclient</artifactId>
					<version>10.2.1.6</version>
				</dependency>
			</dependencies>
		</plugin>
	</plugins>
</build>
[...]
				
				

To generate the site and the correct dashboard report with historic view, you must run the dashboard report plugin in 3 passes :

  1. mvn site
    1. generate the site .
    2. let each report plugin generate its xml file.
    3. add the dashboard report item in the left menu.
  2. mvn dashboard:persist
    1. aggregate all results of each report.
    2. store aggregated results in database.
  3. mvn dashboard:dashboard
    1. aggregate all results of each report.
    2. re-generate the dashboard HTML file.
    3. generate the historic dashboard HTML file with stored values in database.