|
[
Permlink
| « Hide
]
Eugene Kuleshov added a comment - 16/Dec/05 09:04 AM
This is actually limitation of maven-embedder component. I leave this issue hare as a task to track this dependency.
Adding dependency brokes also encoding ( UTF characters are changed to '?') and removes schema declaration from pom.xml.
The schema declaration is a problem if you have a validating XML editor installed like XMLBuddy. It gives a lot of errors.
It is NOT only the formatting that is changed. Also all comments get stripped out.
I use comments to document my dependencies since I am missing an appropriate tag in the POM XML format for that. In my case the m2eclipse plugin is causing information loss! I can see the point that you want to use the maven internal code to parse the POM and using XPP will cause this problem. This is a very common problem when updating handwritten configurations automatically - no matter what format (properties, xml, ...) or project. Anyways from the usability point of view this is a serious problem that should be solved. Even if you need to parse the POM again using DOM or whatever. Even if XmlBuddy doesn't know how to deal with schemas m2eclipse should not remove it. In my case I need to have the schema declaration to leverage my ide's code completion.
i think the "add dependency" wizard is a great idea, but since it reformats the pom.xml, it's been unusable for my projects.
I think this should be rather higher priority - not being able to comment in a pom.xml or use the schema declaration at the same time as using the "add dependency" wizard is really fairly serious.
The "depends upon" Jason, can you please check if MavenEmbedder.writeModel() call can be fixed to preserve formatting and comments upon update.
Plugin is now using new model for editing Maven's pom.xml
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||