![JAR search and dependency download from the Maven repository](/logo.png)
org.codehaus.mojo.versions.utils.ObjectToXmlWriter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of versions-maven-plugin Show documentation
Show all versions of versions-maven-plugin Show documentation
Versions Plugin for Maven 2. The Versions Plugin updates the versions of components in the POM.
The newest version!
package org.codehaus.mojo.versions.utils;
import com.thoughtworks.xstream.XStream;
import org.codehaus.plexus.util.FileUtils;
import java.io.File;
import java.io.IOException;
public final class ObjectToXmlWriter {
public static void writeXmlReport(File file, Object report) {
if (null == file) {
return; // skip this, xml report file is not set
}
final XStream xStream = new XStream();
try {
FileUtils.fileWrite(file.getAbsolutePath(), xStream.toXML(report));
} catch (IOException e) {
throw new IllegalStateException(e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy