Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[m2e-dev] Custom Pom Editing

Hi Folks,

 

I have emailed this forum before so you may be aware that we have own our “custom” pom editor (long story as to why which I won’t bore you with).

 

So, post edit our code is using:-

 

MavenPlugin.getMaven().writeModel

 

To write the model back out to disk but this method seems to dump the entire model, rather than the actual POM model that was loaded in the first place.  Things like build details, which are absent from our pom initially and therefore defaulted, are subsequently being written.

 

I then had a very quick look at your editor code and I spotted a couple of items that seemed relevant:-

1.       The only piece of your own code that seems to call writeModel is the Effective POM Job and it writes to a buffer  - presumably for display purposes only – presumably for displaying the effective pom tab in the pom editor

2.       Editing the actual pom xml seems to be handled by a WST editor StructuredTextEditor – presumably this is what you use to load an xml file, edit is according to a schema and write it back out again.

 

Are these assumptions correct?

 

And if so, if I need to edit the POM, must I follow a similar strategy?

 

Thanks in advance,

_Paul


Back to the top