else
{
// create server
container = new Embedded();
container.setCatalinaHome( configurationDir.getAbsolutePath() );
MemoryRealm memoryRealm = new MemoryRealm()
{
@Override
public Principal authenticate( String username, String credentials )
{
return super.authenticate( username,
credentials ); //To change body of overridden methods use File | Settings | File Templates.
}
};
if ( tomcatUsers != null )
{
if ( !tomcatUsers.exists() )
{
throw new MojoExecutionException( " tomcatUsers " + tomcatUsers.getPath() + " not exists" );
}
getLog().info( "use tomcat-users.xml from " + tomcatUsers.getAbsolutePath() );
memoryRealm.setPathname( tomcatUsers.getAbsolutePath() );
}
container.setRealm( memoryRealm );
container.setUseNaming( useNaming );