"The <developers> section in your pom should not be empty. Add a <developer> entry or set the "
+ "mailSender parameter." );
}
else if ( fromDeveloperId == null )
{
final Developer dev = (Developer) from.get( 0 );
return new MailSender( dev.getName(), dev.getEmail() );
}
else
{
final Iterator it = from.iterator();
while ( it.hasNext() )
{
Developer developer = (Developer) it.next();
if ( fromDeveloperId.equals( developer.getId() ) )
{
return new MailSender( developer.getName(), developer.getEmail() );
}
}
throw new MojoExecutionException(
"Missing developer with id '" + fromDeveloperId + "' in the <developers> section in your pom." );
}