org.apache.maven.plugin.nar
Class NarIntegrationTestMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.maven.plugin.nar.AbstractNarMojo
          extended by org.apache.maven.plugin.nar.AbstractDependencyMojo
              extended by org.apache.maven.plugin.nar.AbstractCompileMojo
                  extended by org.apache.maven.plugin.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 by setting maven.test.skip.exec to false in your pom.

Version:
$Id: SurefirePlugin.java 652773 2008-05-02 05:58:54Z dfabulich $ Mods by Duns for NAR
Author:
Jason van Zyl (modified by Mark Donszelmann, noted by DUNS)

Field Summary
 
Fields inherited from interface org.apache.maven.plugin.nar.NarConstants
LOG_LEVEL_DEBUG, LOG_LEVEL_ERROR, LOG_LEVEL_INFO, LOG_LEVEL_VERBOSE, LOG_LEVEL_WARNING, NAR, NAR_AOL, 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
 boolean isSkipExec()
           
 void narExecute()
           
protected  void processSystemProperties(boolean setInSystem)
           
 void setSkipExec(boolean skipExec)
           
 
Methods inherited from class org.apache.maven.plugin.nar.AbstractCompileMojo
failOnError, getAntProject, getC, getCpp, getDependencyLibOrder, getFortran, getJava, getJavah, getJavaHome, getLibraries, getMaxCores, getNarInfo, getOutput, getRuntime, getTests, setDependencyLibOrder, useLibtool
 
Methods inherited from class org.apache.maven.plugin.nar.AbstractDependencyMojo
getLocalRepository, getNarManager
 
Methods inherited from class org.apache.maven.plugin.nar.AbstractNarMojo
execute, getAOL, getArchitecture, getBasedir, getFinalName, getLayout, getLinker, getMavenProject, getOS, getOutputDirectory, getTargetDirectory, getTestTargetDirectory, getTestUnpackDirectory, getUnpackDirectory, validate
 
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

narExecute

public void narExecute()
                throws org.apache.maven.plugin.MojoExecutionException,
                       org.apache.maven.plugin.MojoFailureException
Specified by:
narExecute in class AbstractNarMojo
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 © 2002-2012 The Apache Software Foundation. All Rights Reserved.