Maven maven = null;
MavenExecutionRequest request = null;
LoggerManager loggerManager = null;
try
{
// logger must be created first
loggerManager = (LoggerManager) embedder.lookup( LoggerManager.ROLE );
if ( debug )
{
loggerManager.setThreshold( Logger.LEVEL_DEBUG );
}
else if ( commandLine.hasOption( CLIManager.QUIET ) )
{
// TODO: we need to do some more work here. Some plugins use sys out or log errors at info level.
// Ideally, we could use Warn across the board
loggerManager.setThreshold( Logger.LEVEL_ERROR );
// TODO:Additionally, we can't change the mojo level because the component key includes the version and it isn't known ahead of time. This seems worth changing.
}
ProfileManager profileManager = new DefaultProfileManager( embedder.getContainer(), executionProperties );