com.theoryinpractise.clojure.ClojureAddSourceMojo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clojure-maven-plugin Show documentation
Show all versions of clojure-maven-plugin Show documentation
Maven plugin for compiling clojure source files
package com.theoryinpractise.clojure;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import java.io.File;
/**
* Add Clojure source directories to the POM
*/
@Mojo(name = "add-source", defaultPhase = LifecyclePhase.GENERATE_SOURCES)
public class ClojureAddSourceMojo extends AbstractClojureCompilerMojo {
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
for (File file : this.getSourceDirectories(SourceDirectory.COMPILE)) {
this.project.addCompileSourceRoot(file.getAbsolutePath());
}
}
}