com.github.jlgrock.javascriptframework.jspreprocessor.TestPreProcessor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jspreprocessor-maven-plugin Show documentation
Show all versions of jspreprocessor-maven-plugin Show documentation
A framework for running additional preprocessing on files before compiling.
package com.github.jlgrock.javascriptframework.jspreprocessor;
import java.io.File;
import java.io.IOException;
import org.apache.commons.io.FileUtils;
/**
* eventually, this should do a bunch of things, but right now, it will just copy from
* src/main/javascript to /target/javascript-generated.
*
* @author Justin Grant
* @requiresProject
* @goal test-preprocessors
* @threadSafe
*/
public class TestPreProcessor extends AbstractPreProcessorFrameworkMojo {
/**
* @parameter default-value="${project.basedir}${file.separator}src${file.separator}test${file.separator}javascript"
*/
private File sourceDirectory;
/**
* @parameter default-value="${project.basedir}${file.separator}src${file.separator}test${file.separator}externs"
*/
private File externsDirectory;
/**
* @parameter default-value="${project.build.directory}${file.separator}javascriptframework"
*/
private File frameworkTargetDirectory;
@Override
public final File getSourceDirectory() {
return sourceDirectory;
}
@Override
public final File getExternsDirectory() {
return externsDirectory;
}
@Override
public final File getFrameworkTargetDirectory() {
return frameworkTargetDirectory;
}
@Override
public final void copyAndPreprocessFile(final File srcFile, final File destFile, final boolean removeAsserts) throws IOException {
FileUtils.copyFile(srcFile, destFile);
}
}