Hi Archie,
You will need to add a BuildListener to the Project object you create.
Have a look at the addBuildListener method on the Project class
Project.addBuildListener(org.apache.tools.ant.BuildListener
buildListener)
http://fisheye6.atlassian.com/browse/ant/core/trunk/src/main/org/apache/tools/ant/Project.java?r=710086#l386
Cheers,
Nick
On 11/12/2008, at 3:56 AM, Archie Cobbs wrote:
I just filed a couple of bugs relating to the nested ant invocations
used by
Ivy's new packager resolver. Basically, errors in the nested ant
invocation
are being ignored by the outer ant invocation. I'm not exactly sure
if this
is an ivy problem or an ant problem (I suspect the former) and am
looking
for advice in how to fix it.
https://issues.apache.org/jira/browse/IVY-985
Does this problem ring a bell with anyone?
Here is a synopsis of how we do the invocation:
// Execute the Ant build file
Project project = new Project();
project.init();
project.setUserProperty("ant.file" , new File(dir,
"build.xml").getAbsolutePath());
ProjectHelper.configureProject(project, new File(dir,
"build.xml"));
project.setBaseDir(dir);
...
// Execute task
Message.verbose("performing packager resolver build in " +
this.dir);
try {
project.executeTarget("build");
this.built = true;
} catch (BuildException e) {
e.printStackTrace(System.out);
Message.verbose("packager resolver build failed: " + e);
throw e;
}
I'm hoping some ant experts (which I am not) can spot the problem. The
relevant class containing that code is
here<http://svn.apache.org/repos/asf/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/resolver/packager/PackagerCacheEntry.java
>
.
Thanks,
-Archie
--
Archie L. Cobbs
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]