org.jamon.maven.JamonTestMojo Maven / Gradle / Ivy
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.jamon.maven;
import java.io.File;
import org.apache.maven.plugin.MojoExecutionException;
/**
* Translates Jamon test templates into Java files.
*
* @goal translate-tests
* @phase generate-test-sources
* @threadSafe
* @requiresDependencyResolution test
*/
public class JamonTestMojo extends AbstractJamonMojo {
/**
* @parameter expression="${project.basedir}/src/test/templates"
*/
private File templateSourceDir;
/**
* @parameter expression="${project.build.directory}/generated-test-sources/jamon"
*/
private File templateOutputDir;
@Override
public File getTemplateOutputDir() {
return templateOutputDir;
}
@Override
public File getTemplateSourceDir() {
return templateSourceDir;
}
@Override
public void execute() throws MojoExecutionException {
doExecute();
getProject().addTestCompileSourceRoot(templateOutputDir.getAbsolutePath());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy