com.github.maven_nar
Class NarIntegrationTestMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by com.github.maven_nar.AbstractNarMojo
          extended by com.github.maven_nar.AbstractDependencyMojo
              extended by com.github.maven_nar.NarIntegrationTestMojo
All Implemented Interfaces:
NarConstants, org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public class NarIntegrationTestMojo
extends AbstractDependencyMojo

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 class com.github.maven_nar.AbstractDependencyMojo
archiverManager, artifactResolver, remoteArtifactRepositories
 
Fields inherited from class com.github.maven_nar.AbstractNarMojo
classifiers, libraries
 
Fields inherited from interface com.github.maven_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
protected  List getArtifacts()
           
protected  File getUnpackDirectory()
           
 boolean isSkipExec()
           
 void narExecute()
           
protected  void processSystemProperties(boolean setInSystem)
           
 void setSkipExec(boolean skipExec)
           
 
Methods inherited from class com.github.maven_nar.AbstractDependencyMojo
downloadAttachedNars, getAllAttachedNarArtifacts, getArchiverManager, getBinding, getLocalRepository, getNarArtifacts, getNarInfo, getNarManager, getRemoteRepositories, unpackAttachedNars
 
Methods inherited from class com.github.maven_nar.AbstractNarMojo
execute, getAOL, getArchitecture, getBasedir, getJavah, getJavaHome, getLayout, getLibraries, getLinker, getMavenProject, getNarInfo, getOS, getOutput, getOutputDirectory, getTargetDirectory, getTestTargetDirectory, getTestUnpackDirectory, 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

getArtifacts

protected List getArtifacts()
Overrides:
getArtifacts in class AbstractDependencyMojo

getUnpackDirectory

protected File getUnpackDirectory()
Overrides:
getUnpackDirectory in class AbstractNarMojo

narExecute

public void narExecute()
                throws org.apache.maven.plugin.MojoExecutionException,
                       org.apache.maven.plugin.MojoFailureException
Overrides:
narExecute in class AbstractDependencyMojo
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-2013 The Apache Software Foundation. All Rights Reserved.