Home | History | Annotate | Download | only in maven
      1 /*******************************************************************************
      2  * Copyright (c) 2009, 2018 Mountainminds GmbH & Co. KG and Contributors
      3  * All rights reserved. This program and the accompanying materials
      4  * are made available under the terms of the Eclipse Public License v1.0
      5  * which accompanies this distribution, and is available at
      6  * http://www.eclipse.org/legal/epl-v10.html
      7  *
      8  * Contributors:
      9  *    Evgeny Mandrikov - initial API and implementation
     10  *    Kyle Lieber - implementation of CheckMojo
     11  *
     12  *******************************************************************************/
     13 package org.jacoco.maven;
     14 
     15 import java.io.File;
     16 
     17 import org.apache.maven.plugins.annotations.LifecyclePhase;
     18 import org.apache.maven.plugins.annotations.Mojo;
     19 import org.apache.maven.plugins.annotations.Parameter;
     20 import org.apache.maven.plugins.annotations.ResolutionScope;
     21 
     22 /**
     23  * Same as <code>prepare-agent</code>, but provides default values suitable for
     24  * integration-tests:
     25  * <ul>
     26  * <li>bound to <code>pre-integration-test</code> phase</li>
     27  * <li>different <code>destFile</code></li>
     28  * </ul>
     29  *
     30  * @since 0.6.4
     31  */
     32 @Mojo(name = "prepare-agent-integration", defaultPhase = LifecyclePhase.PRE_INTEGRATION_TEST, requiresDependencyResolution = ResolutionScope.RUNTIME, threadSafe = true)
     33 public class AgentITMojo extends AbstractAgentMojo {
     34 
     35 	/**
     36 	 * Path to the output file for execution data.
     37 	 */
     38 	@Parameter(property = "jacoco.destFile", defaultValue = "${project.build.directory}/jacoco-it.exec")
     39 	private File destFile;
     40 
     41 	/**
     42 	 * @return the destFile
     43 	 */
     44 	@Override
     45 	File getDestFile() {
     46 		return destFile;
     47 	}
     48 
     49 }
     50