org.freehep.maven.nar
Class NarIntegrationTestMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.freehep.maven.nar.AbstractNarMojo
          extended by org.freehep.maven.nar.AbstractDependencyMojo
              extended by org.freehep.maven.nar.AbstractCompileMojo
                  extended by org.freehep.maven.nar.NarIntegrationTestMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, NarConstants

public class NarIntegrationTestMojo
extends AbstractCompileMojo

Run integration tests using Surefire. This goal was copied from Maven's surefire plugin to accomodate a few things for the NAR plugin: 1. To test a jar file with its native module we can only run after the package phase, so we use the integration-test phase. 2. We need to set java.library.path to an AOL (architecture-os-linker) specific value, but AOL is only known in the NAR plugin and thus cannot be set from the pom. 3. To have the java.library.path definition picked up by java we need the "pertest" forkmode. To use this goal you need to put the test sources in the regular test directories but disable the running of the tests by the maven-surefire-plugin.

Version:
$Id: NarIntegrationTestMojo.java 13111 2007-07-24 04:02:00Z duns $, 2.3 maven repository maven-surefire-plugin
Author:
Jason van Zyl (modified by Mark Donszelmann, noted by FREEHEP)

Field Summary
 
Fields inherited from class org.freehep.maven.nar.AbstractCompileMojo
maxCores
 
Fields inherited from interface org.freehep.maven.nar.NarConstants
LOG_LEVEL_DEBUG, LOG_LEVEL_ERROR, LOG_LEVEL_INFO, LOG_LEVEL_VERBOSE, LOG_LEVEL_WARNING, NAR_EXTENSION, NAR_NO_ARCH, NAR_ROLE_HINT, NAR_TYPE
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
NarIntegrationTestMojo()
           
 
Method Summary
 void execute()
           
 boolean isSkipExec()
           
protected  void processSystemProperties(boolean setInSystem)
           
 void setSkipExec(boolean skipExec)
           
 
Methods inherited from class org.freehep.maven.nar.AbstractCompileMojo
failOnError, getAntProject, getC, getCpp, getDependencyLibOrder, getFortran, getJava, getJavah, getJavaHome, getLibraries, getOutput, getRuntime, getTests, setDependencyLibOrder, useLibtool
 
Methods inherited from class org.freehep.maven.nar.AbstractDependencyMojo
getLocalRepository, getNarManager
 
Methods inherited from class org.freehep.maven.nar.AbstractNarMojo
getAOL, getAOLKey, getArchitecture, getFinalName, getLinker, getMavenProject, getOS, getOutputDirectory, getTargetDirectory, shouldSkip
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NarIntegrationTestMojo

public NarIntegrationTestMojo()
Method Detail

execute

public void execute()
             throws org.apache.maven.plugin.MojoExecutionException,
                    org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

processSystemProperties

protected void processSystemProperties(boolean setInSystem)

isSkipExec

public boolean isSkipExec()
Returns:
SurefirePlugin Returns the skipExec.

setSkipExec

public void setSkipExec(boolean skipExec)
Parameters:
skipExec - the skipExec to set


Copyright 2000-2007 FreeHEP. All Rights Reserved.