@Test public void testCombineAttributes() throws Exception { configuration.setAttribute( "combine.children", "append" ); configuration.setAttribute( "description", "foo" ); configuration.getChild( "child", true ).setAttribute( "combine.self", "override" ); configurationWriter.write( configuration, file, "", TARGET_NAME ); assertXmlIsExpected( "/configuration-writer/combine-attributes.xml", file ); }
public void write( PlexusConfiguration configuration, File file, String customTaskPrefix, String antTargetName ) throws IOException { MXSerializer serializer = new MXSerializer(); serializer.setProperty( "http: System.getProperty( "line.separator" ) ); serializer.setProperty( "http: BufferedOutputStream bos = new BufferedOutputStream( new FileOutputStream( file ) ); try { serializer.setOutput( bos, AntRunMojo.UTF_8 ); serializer.startDocument( AntRunMojo.UTF_8, null ); if ( !customTaskPrefix.isEmpty() ) { serializer.setPrefix( customTaskPrefix, AntRunMojo.TASK_URI ); } serializer.startTag( null, "project" ); serializer.attribute( null, "name", "maven-antrun-" ); serializer.attribute( null, "default", antTargetName ); write( configuration, serializer ); serializer.endTag( null, "project" ); serializer.endDocument(); } finally { IOUtil.close( bos ); } }
AntrunXmlPlexusConfigurationWriter { public void write( PlexusConfiguration configuration, File file, String customTaskPrefix, String antTargetName ) throws IOException { MXSerializer serializer = new MXSerializer(); serializer.setProperty( "http: System.getProperty( "line.separator" ) ); serializer.setProperty( "http: BufferedOutputStream bos = new BufferedOutputStream( new FileOutputStream( file ) ); try { serializer.setOutput( bos, AntRunMojo.UTF_8 ); serializer.startDocument( AntRunMojo.UTF_8, null ); if ( !customTaskPrefix.isEmpty() ) { serializer.setPrefix( customTaskPrefix, AntRunMojo.TASK_URI ); } serializer.startTag( null, "project" ); serializer.attribute( null, "name", "maven-antrun-" ); serializer.attribute( null, "default", antTargetName ); write( configuration, serializer ); serializer.endTag( null, "project" ); serializer.endDocument(); } finally { IOUtil.close( bos ); } } }
AntrunXmlPlexusConfigurationWriter { public void write( PlexusConfiguration configuration, File file, String customTaskPrefix, String antTargetName ) throws IOException { MXSerializer serializer = new MXSerializer(); serializer.setProperty( "http: System.getProperty( "line.separator" ) ); serializer.setProperty( "http: BufferedOutputStream bos = new BufferedOutputStream( new FileOutputStream( file ) ); try { serializer.setOutput( bos, AntRunMojo.UTF_8 ); serializer.startDocument( AntRunMojo.UTF_8, null ); if ( !customTaskPrefix.isEmpty() ) { serializer.setPrefix( customTaskPrefix, AntRunMojo.TASK_URI ); } serializer.startTag( null, "project" ); serializer.attribute( null, "name", "maven-antrun-" ); serializer.attribute( null, "default", antTargetName ); write( configuration, serializer ); serializer.endTag( null, "project" ); serializer.endDocument(); } finally { IOUtil.close( bos ); } }  }
AntrunXmlPlexusConfigurationWriter { public void write( PlexusConfiguration configuration, File file, String customTaskPrefix, String antTargetName ) throws IOException { MXSerializer serializer = new MXSerializer(); serializer.setProperty( "http: System.getProperty( "line.separator" ) ); serializer.setProperty( "http: BufferedOutputStream bos = new BufferedOutputStream( new FileOutputStream( file ) ); try { serializer.setOutput( bos, AntRunMojo.UTF_8 ); serializer.startDocument( AntRunMojo.UTF_8, null ); if ( !customTaskPrefix.isEmpty() ) { serializer.setPrefix( customTaskPrefix, AntRunMojo.TASK_URI ); } serializer.startTag( null, "project" ); serializer.attribute( null, "name", "maven-antrun-" ); serializer.attribute( null, "default", antTargetName ); write( configuration, serializer ); serializer.endTag( null, "project" ); serializer.endDocument(); } finally { IOUtil.close( bos ); } }  void write( PlexusConfiguration configuration, File file, String customTaskPrefix, String antTargetName ); }
AntrunXmlPlexusConfigurationWriter { public void write( PlexusConfiguration configuration, File file, String customTaskPrefix, String antTargetName ) throws IOException { MXSerializer serializer = new MXSerializer(); serializer.setProperty( "http: System.getProperty( "line.separator" ) ); serializer.setProperty( "http: BufferedOutputStream bos = new BufferedOutputStream( new FileOutputStream( file ) ); try { serializer.setOutput( bos, AntRunMojo.UTF_8 ); serializer.startDocument( AntRunMojo.UTF_8, null ); if ( !customTaskPrefix.isEmpty() ) { serializer.setPrefix( customTaskPrefix, AntRunMojo.TASK_URI ); } serializer.startTag( null, "project" ); serializer.attribute( null, "name", "maven-antrun-" ); serializer.attribute( null, "default", antTargetName ); write( configuration, serializer ); serializer.endTag( null, "project" ); serializer.endDocument(); } finally { IOUtil.close( bos ); } }  void write( PlexusConfiguration configuration, File file, String customTaskPrefix, String antTargetName );  }