Files
pmd/maven-plugin-pmd-build/regress/AntTaskTest.java
2011-12-06 18:23:51 +00:00

49 lines
860 B
Java

import net.sourceforge.pmd.ant.PmdBuildTask;
import org.apache.tools.ant.BuildException;
import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
/**
* @author rpelisse
*
*/
public class AntTaskTest {
/**
* @throws java.lang.Exception
*/
@BeforeClass
public static void setUpBeforeClass() throws Exception {
}
/**
* @throws java.lang.Exception
*/
@Before
public void setUp() throws Exception {
}
/**
* @throws java.lang.Exception
*/
@After
public void tearDown() throws Exception {
}
@Test
public void antTask() {
PmdBuildTask task = new PmdBuildTask();
task.setRulesDirectory("rulesets");
task.setTarget("target-test");
try {
task.execute();
} catch (BuildException e) {
e.printStackTrace();
}
}
}