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); }