* Generate stubs & skeleton for each home found into the DD
* Add all the generate class file into the ejb files
* @param ithomes : iterator on home class
*/
private void buildBorlandStubs(Iterator ithomes) {
Execute execTask = null;
execTask = new Execute(this);
Project project = getTask().getProject();
execTask.setAntRun(project);
execTask.setWorkingDirectory(project.getBaseDir());
Commandline commandline = new Commandline();
commandline.setExecutable(JAVA2IIOP);
//debug ?
if (java2iiopdebug) {
commandline.createArgument().setValue("-VBJdebug");
}
//set the classpath
commandline.createArgument().setValue("-VBJclasspath");
commandline.createArgument().setPath(getCombinedClasspath());
//list file
commandline.createArgument().setValue("-list_files");
//no TIE classes
commandline.createArgument().setValue("-no_tie");
if (java2iioparams != null) {
log("additional " + java2iioparams + " to java2iiop ", 0);
commandline.createArgument().setValue(java2iioparams);
}
//root dir
commandline.createArgument().setValue("-root_dir");
commandline.createArgument().setValue(getConfig().srcDir.getAbsolutePath());
//compiling order
commandline.createArgument().setValue("-compile");
//add the home class
while (ithomes.hasNext()) {
commandline.createArgument().setValue(ithomes.next().toString());
}
try {
log("Calling java2iiop", Project.MSG_VERBOSE);
log(commandline.describeCommand(), Project.MSG_DEBUG);
execTask.setCommandline(commandline.getCommandline());
int result = execTask.execute();
if (Execute.isFailure(result)) {
String msg = "Failed executing java2iiop (ret code is "
+ result + ")";
throw new BuildException(msg, getTask().getLocation());
}