Search in sources :

Example 76 with Project

use of org.apache.tools.ant.Project in project cuke4duke by cucumber.

the class AbstractJRubyMojo method getProject.

protected Project getProject() throws MojoExecutionException {
    Project project = new Project();
    project.setBaseDir(mavenProject.getBasedir());
    project.setProperty("jruby.home", jrubyHome().getAbsolutePath());
    project.addBuildListener(new LogAdapter());
    Path jrubyClasspath = new Path(project);
    project.addReference("jruby.classpath", jrubyClasspath);
    try {
        append(jrubyClasspath, testClasspathElements);
        append(jrubyClasspath, compileClasspathElements);
        append(jrubyClasspath, pluginArtifacts);
        return project;
    } catch (DependencyResolutionRequiredException e) {
        throw new MojoExecutionException("error resolving dependencies", e);
    }
}
Also used : Path(org.apache.tools.ant.types.Path) MavenProject(org.apache.maven.project.MavenProject) Project(org.apache.tools.ant.Project) DependencyResolutionRequiredException(org.apache.maven.artifact.DependencyResolutionRequiredException) MojoExecutionException(org.apache.maven.plugin.MojoExecutionException)

Aggregations

Project (org.apache.tools.ant.Project)76 File (java.io.File)32 BuildException (org.apache.tools.ant.BuildException)23 IOException (java.io.IOException)17 Test (org.junit.Test)12 FileSet (org.apache.tools.ant.types.FileSet)11 ZipFile (java.util.zip.ZipFile)10 IgniteDeploymentGarAntTask (org.apache.ignite.util.antgar.IgniteDeploymentGarAntTask)8 DefaultLogger (org.apache.tools.ant.DefaultLogger)5 ProjectHelper (org.apache.tools.ant.ProjectHelper)5 Path (org.apache.tools.ant.types.Path)5 MissingMethodException (groovy.lang.MissingMethodException)4 DirectoryScanner (org.apache.tools.ant.DirectoryScanner)4 Task (org.apache.tools.ant.Task)4 AbstractProject (hudson.model.AbstractProject)3 Target (org.apache.tools.ant.Target)3 Zip (org.apache.tools.ant.taskdefs.Zip)3 CompilationFailedException (org.codehaus.groovy.control.CompilationFailedException)3 Binding (groovy.lang.Binding)2 GroovyClassLoader (groovy.lang.GroovyClassLoader)2