new SimpleOptionalitySelector(), new JavaScopeDeriver() );
new ChainedDependencyGraphTransformer( transformer, new JavaDependencyContextRefiner() );
session.setDependencyGraphTransformer( transformer );
DefaultArtifactTypeRegistry stereotypes = new DefaultArtifactTypeRegistry();
stereotypes.add( new DefaultArtifactType( "pom" ) );
stereotypes.add( new DefaultArtifactType( "maven-plugin", "jar", "", "java" ) );
stereotypes.add( new DefaultArtifactType( "jar", "jar", "", "java" ) );
stereotypes.add( new DefaultArtifactType( "ejb", "jar", "", "java" ) );
stereotypes.add( new DefaultArtifactType( "ejb-client", "jar", "client", "java" ) );
stereotypes.add( new DefaultArtifactType( "test-jar", "jar", "tests", "java" ) );
stereotypes.add( new DefaultArtifactType( "javadoc", "jar", "javadoc", "java" ) );
stereotypes.add( new DefaultArtifactType( "java-source", "jar", "sources", "java", false, false ) );
stereotypes.add( new DefaultArtifactType( "war", "war", "", "java", false, true ) );
stereotypes.add( new DefaultArtifactType( "ear", "ear", "", "java", false, true ) );
stereotypes.add( new DefaultArtifactType( "rar", "rar", "", "java", false, true ) );
stereotypes.add( new DefaultArtifactType( "par", "par", "", "java", false, true ) );
session.setArtifactTypeRegistry( stereotypes );
session.setArtifactDescriptorPolicy( new SimpleArtifactDescriptorPolicy( true, true ) );
Properties sysProps = System.getProperties();