/**
* @return the goal of the given name or
* throws a JellyExceptoin if the goal could not be found
*/
protected Goal getGoal(String name) throws JellyException {
Project project = getProject();
if ( project == null ) {
throw new JellyException( "Must use this tag inside a <maven:project> tag" );
}
// #### allow lazy creation of callbacks before the goal is defined...
Goal goal = project.getGoal(name, true);
if ( goal == null ) {
throw new JellyException( "No such target name: " + name );
}
return goal;
}