You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Petar Tahchiev <pa...@gmail.com> on 2015/12/18 20:23:18 UTC

Modello Pull Request

Hi guys,

I've been playing with the MavenXpp3Reader/MavenXpp3Writer lately. I
managed to generate a pom.xml but my maven-rat-plugin failed because my
generated pom.xml did not have the appropriate license header. Then I
decided to add a new field in the MavenXpp3Writer called "fileComment". I
modified the code so that if this field is not null, we use the string that
is set as a comment on file level. Now I can do this:

        org.apache.maven.model.io.xpp3.MavenXpp3Writer writer = new
org.apache.maven.model.io.xpp3.MavenXpp3Writer();
        writer.setFileComment("My comment");
        writer.write(new FileWriter(file), model);

and the generated pom.xml has a "My comment" on top.

It's all in here:
https://github.com/codehaus-plexus/modello/pull/3

Please someone review and merge.

Thanks.

-- 
Regards, Petar!
Karlovo, Bulgaria.
---
Public PGP Key at:
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x19658550C3110611
Key Fingerprint: A369 A7EE 61BC 93A3 CDFF  55A5 1965 8550 C311 0611