core-it-support/core-it-plugins/maven-it-plugin-plexus-utils-11/src/main/java/org/apache/maven/its/plugins/SerializeMojo.java [40:61]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@Mojo(name = "serialize", defaultPhase = LifecyclePhase.VALIDATE)
public class SerializeMojo extends AbstractMojo {

    /**
     */
    @Parameter(defaultValue = "${project.build.directory}/serialized.xml")
    private File file;

    public void execute() throws MojoExecutionException, MojoFailureException {
        Writer writer = null;
        XmlSerializer s = new MXSerializer();
        try {
            file.getParentFile().mkdirs();
            writer = new OutputStreamWriter(new FileOutputStream(file), "UTF-8");
            s.setOutput(writer);

            Xpp3Dom dom = new Xpp3Dom("root");

            dom.writeToSerializer("", s);
        } catch (IOException e) {
            throw new MojoExecutionException(e.getMessage(), e);
        } finally {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



core-it-support/core-it-plugins/maven-it-plugin-plexus-utils-new/src/main/java/org/apache/maven/its/plugins/SerializeMojo.java [40:59]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@Mojo(name = "serialize", defaultPhase = LifecyclePhase.VALIDATE)
public class SerializeMojo extends AbstractMojo {

    @Parameter(defaultValue = "${project.build.directory}/serialized.xml")
    private File file;

    public void execute() throws MojoExecutionException, MojoFailureException {
        Writer writer = null;
        XmlSerializer s = new MXSerializer();
        try {
            file.getParentFile().mkdirs();
            writer = new OutputStreamWriter(new FileOutputStream(file), "UTF-8");
            s.setOutput(writer);

            Xpp3Dom dom = new Xpp3Dom("root");

            dom.writeToSerializer("", s);
        } catch (IOException e) {
            throw new MojoExecutionException(e.getMessage(), e);
        } finally {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



