Running an Ant target programmaticly
An example on how to invoke Ant targets which are defined in build.xml.
Copy this code and paste it in your HTML
import org.apache.tools.ant.ProjectHelper import org.apache.tools.ant.Project import org.apache.tools.ant.BuildException
Project project
= new Project
() project.init()
ProjectHelper.projectHelper.parse(project, antFile)
project.executeTarget('echo-1')
} catch (BuildException e
) { }
}
Report this snippet
Comments
Subscribe to comments