+\r
+ protected static void runProject(Project p, String target) {\r
+ p.fireBuildStarted();\r
+ Throwable exception = null;\r
+ try {\r
+ p.executeTarget(target != null ? target : p.getDefaultTarget());\r
+ } catch (Throwable e) {\r
+ exception = e;\r
+ log.error("Exception when running Ant: ",e);\r
+ } finally {\r
+ p.fireBuildFinished(exception);\r
+ }\r
+ }\r