[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [m2e-dev] Which is the best way to programmatically edit the pom.xml
|
m2e uses EMF Model manipulation to actually modify the pom.xml file.
m2e-wtp uses the in-memory Maven model directly either during conversion (before the pom.xml is serialized) or to change some plugin configurations for some Eclipse-specific needs during some Maven requests.
So it all depends on the use case.
On Wed, Feb 13, 2013 at 6:17 PM, Roberto Sanchez Herrera/Mexico/IBM
<rsanchez@xxxxxxxxxxx> wrote:
Hello,
Suppose I need to programmatically
modify the pom.xml file. Which is the recommended way?
I did some investigation, and
noticed that there is an EMF model in plugin org.eclipse.m2e.model.editwhich
is used in plugin org.eclipse.m2e.refactoring to do some refactoring
operations. I also noticed that in plugin org.eclipse.m2e.core.ui,
the method PomEdits.performOnDOMDocument(omEdits.OperationTuple... fileOperations)
is used for changing the pom (for example, when adding dependencies). Finally,
I noticed that m2e-wtp uses classes from org.apache.maven.model.*
like Model and Build, and classes like org.codehaus.plexus.util.xml.Xpp3Dom
Thank you in advance.
_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-dev
--
"Have you tried turning it off and on again" - The IT Crowd