Java 类org.apache.maven.plugins.shade.pom.PomWriter 实例源码

项目:lucee-maven-plugin    文件:NoDepsPomTask.java   
public void doPackaging(PackagingContext context) throws Exception {
    Model model = context.getProject().getOriginalModel();
    model.getDependencies().clear();

    File f = new File(context.getProject().getBasedir(), "target/pom.xml");
    Writer w = WriterFactory.newXmlWriter(f);
    PomWriter.write(w, model);
    context.getProject().setFile(f);
}