All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.theoryinpractise.clojure.ClojureAddSourceMojo Maven / Gradle / Ivy

The newest version!
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());
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy