
org.jboss.maven.plugins.retro.WeaveTestsMojo Maven / Gradle / Ivy
The newest version!
package org.jboss.maven.plugins.retro;
import java.io.File;
import java.util.List;
/**
* Maven plugin for JBoss Retro Weaver. This mojo is set up
* to weave the test classes and optionally generate a jar of
* the weaved classes.
*
* @phase process-test-classes
* @goal weave-tests
*
*/
public class WeaveTestsMojo extends WeaveMojo
{
/**
* Project classpath.
*
* @parameter expression="${project.testClasspathElements}"
* @required
*
*/
protected List classpathElements;
/**
* The directory containing the classes to be weaved.
*
* @parameter expression="${project.build.testOutputDirectory}"
* @required
*
*/
protected File classesDirectory;
/**
* The jar file or directory where the weaved classes
* should be written. Defaults to "target/test-classes-weaved"
*
* @parameter expression="${project.build.directory}/test-classes-weaved"
*/
protected File outputDirectory;
public List getClasspathElements()
{
return this.classpathElements;
}
public File getClassesDirecotry()
{
return this.classesDirectory;
}
protected String getOutputPath()
{
return this.outputDirectory.getAbsolutePath();
}
protected String getJarClassifier() {
if (this.classifier == null) {
return "tests";
}
else {
return "tests-" + this.classifier;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy