private void addJavaAgent ( Config . AgentMode junitMode ) throws MojoExecutionException { try { URL agentJarURL = Types . extractJarURL ( EkstaziAgent . class ) ; if ( agentJarURL == null ) { throw new MojoExecutionException ( "Unable to locate Ekstazi agent" ) ; } Properties properties = project . getProperties ( ) ; String oldValue = properties . getProperty ( ARG_LINE_PARAM_NAME ) ; properties . setProperty ( ARG_LINE_PARAM_NAME , prepareEkstaziOptions ( agentJarURL , junitMode ) + " " + ( oldValue == null ? "" : oldValue ) ) ; } catch ( IOException ex ) { throw new MojoExecutionException ( "Unable to set path to agent" , ex ) ; } catch ( URISyntaxException ex ) { throw new MojoExecutionException ( "Unable to set path to agent" , ex ) ; } }
Sets property to pass Ekstazi agent to surefire plugin .