{
MojoDescriptor mojoDescriptor = mojoExecution.getMojoDescriptor();
if ( mojoDescriptor.isProjectRequired() && !session.isUsingPOMsFromFilesystem() )
{
Throwable cause = new MissingProjectException(
"Goal requires a project to execute" + " but there is no POM in this directory (" +
session.getExecutionRootDirectory() + ")." +
" Please verify you invoked Maven from the correct directory." );
throw new LifecycleExecutionException( mojoExecution, null, cause );
}