New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[request] Option to ignore root <project> tag formatting #85
Comments
Hi, Well, this is an annoying problem. My solution so far is to close my eyes whenever I see the first line (it is just basically configuration setup, right). What happens if you keep the long line? It is hard to tackle since I read the whole pom into an xml framework, so ignoring the root element breaks the xml. I can have look inside the framework itself and see if I can override some protected method during output. No promises though. KInd regards |
I have looked into JDOMs class XMLOutputter However the printAttributes(...) method is only protected and the "xsi:schemaLocation" section is an xml attribute. So, a reasonable approach would be to prefix the xsi:schemaLocation with a line termination and double indentation characters. This would follow the configuration for the plugin. In your case this would be 8 space characters (your example contains 9 space characters). One really hard problem remains (besides the coding). What would be the name of the new configuration parameter? |
Great effort in getting to the bottom of this behavior. It seems like there are no ideal solutions here. While having this feature would benefit me personally, I'm not sure it is worth your time and effort. Unless you feel that this feature would be useful for others (or yourself). If you decide to implement it as a string (allowing Whatever you decide, thanks again for investigating the issue. I was hoping that perhaps there would be a simple solution ;). edit: |
Branch issue-85-_request_Option_to_ignore_root_project_tag_formatting created! |
Time for testing!
Let me know how it works for you |
New version released 2.14.0. Enjoy! |
Sorry I didn't get back to you for testing. Life got in the way. I'll be sure to check out the new version. Thank you for your quick action. |
No worries. Life happens (as it should) ;-) |
First of all: amazing plugin. Great job 馃憤
We have a rather large project with about 250 POMs and 100 developers.
While this plugin works very well, one thing that is preventing me from using it is the fact that there is no option to disable formatting of the root
<project>
tag.We format our tag as:
When running the
sortpom:sort
goal, all 250 POMs are changed to:Which is very annoying to have to revert.
We would love it if this behavior is disabled, or controllable through a configuration option.
My settings:
The text was updated successfully, but these errors were encountered: