Project project = projectDao.getProjectWithAllDetails( projectId );
// removing build definition from project doesn't effect anything if it is the default for the proejct, the
// default will just change automatically to the default build definition of the project group.
project.removeBuildDefinition( buildDefinition );
projectDao.updateProject( project );
}
}