want to build an ANT-Java project from another Java project -
i have 2 projects:
project a: (java) &
project b: (ant-java)
i want build project b project a. project feeds file project b. please suggest me way this.
if want call ant java without doing running external command (calling ant), include ant runtime (ant.jar, download @ apache ant webpage) in project , execute build target b project.
example:
file buildfile = new file("build.xml"); project p = new project(); p.setuserproperty("ant.file", buildfile.getabsolutepath()); p.init(); projecthelper helper = projecthelper.getprojecthelper(); p.addreference("ant.projecthelper", helper); helper.parse(p, buildfile); p.executetarget(p.getdefaulttarget());
you check article. show how manage return results , generated log. hope helps.
Comments
Post a Comment