@SuppressWarnings( "unchecked" ) Set<Artifact> artifacts = project.getArtifacts();
for ( Artifact artifact : artifacts )
{
// Artifact is not yet registered and it has neither test, nor a
// provided scope, not is it optional
if ( "war".equals( artifact.getType() ) && !artifact.isOptional() && filter.include( artifact ) )
{
addContextFromArtifact( container, contexts, artifact, "/" + artifact.getArtifactId(), null );
}
}