Usage

  • First you have to setup a running DB on your system. Download HSQLDB and install it on your system.
    • Unpack the zip file somewhere
    • Launch the DB with the call
      cd <hsqldbDIR>/lib
            
      java -cp hsqldb.jar org.hsqldb.Server -database.0 mavenhist -dbname.0 historisation
  • Add the historisation maven repository to the remote repositories of you project. Or install the plugin in your local maven repository.
      <repositories>
        <repository>
          <id>sourceforge-m2-releases</id>
          <url>http://maven-hist.sourceforge.net/m2repo</url>
        </repository>
      </repositories>
  • Then you have to initialize the DB tables first. This is explained in the plugin description a litte bit further. But generally you have to run a specific goal:
    • Maven 1: historisation:initialize-historisation
    • Maven 2: initialize-historisation

    If you want to use the historisation functionality in your own project you have to use maven (1 or 2) to build your system. It's very simple to include the plugin in maven 1 and 2.

Maven 2

<project>
  <build>
    <plugins>
      <plugin>
        <groupId>net.sf.mavenhist.maven2</groupId>
        <artifactId>maven-historisation-plugin</artifactId>
        <version>1.0.0</version>
        <executions>
          <execution>
            <phase>site</phase>
            <goals>
              <goal>historisation</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>net.sf.mavenhist.persistency</groupId>
            <artifactId>hsqldb</artifactId>
            <version>1.0.0</version>
          </dependency>
        </dependencies>
        <configuration>
          <dbUser>sa</dbUser>
          <dbPassword></dbPassword>
          <dbURL>jdbc:hsqldb:hsql://localhost/</dbURL>
          <extractorNames>
            fbviolations,fbfiles,coberturabrpc,csall,csfiles,javancssfunctionstotal,javancsspackagestotal,javancssncsstotal,jncssfunctionsperpackage,javancssccn,pmdfiles,pmdviolations,coberturaloc,coberturalipc,javancssclassestotal,csinfos,javancssjavadocstotal
          </extractorNames>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>