Comments (15)
Great! I hope that you are satisfied with SortPom and thanks for reporting the issue
from sortpom.
Well, the handling of DocType in the XML has been removed due to vulnerability issues. Do you have an example xml?
from sortpom.
sure you can run it against this https://github.com/hazendaz/base-parent/blob/master/pom.xml with simple sortpom:sort which Results in license header removal which is just a comment.
from sortpom.
I see also that <ignore />
has been changed to <ignore/>
. I think that as a general rule, sortpom should not modify any kind of whitespace, unless it's also meant to be a code formatting tool.
from sortpom.
@dwalluck the 'ignore' can be ignored. I didn't run it with parameters that would not do that. My only issue is the license header is being removed. If I ran all the parameters I use it would have left that bit alone. The example here was just for a quick project to look at that shows the issue.
from sortpom.
@dwalluck Use <spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement>
to ensure the whitespace change doesn't occur. Sorry didn't have that in my example. I have updated my config to include that and re-ran to show the proper screen shot of the consideration on this issue.
from sortpom.
OK, so your config changed?
I filed #206 and thought that it might be related to that issue.
In my case, I have not changed anything, so I wouldn't expect anything to change (by default, anyway).
from sortpom.
I had not changed anything either. The repo I saw this on first is not public. So I added a quick check on one I have that is public that did not use same configuration. If i recall, that configuration with the whitespace removal actually changed with 3.0.0 of this plugin.
So now my private and public repo have same configuration, same issue noted here with license header being removed.
from sortpom.
Thanks for the example. Removing the comment sounds suspicious. I’ll have a look at it.
from sortpom.
This is a problem. When the root element is added to a newly created xml document, all content is cleared (including the comment). I will work on a fix as soon as possible.
from sortpom.
Branch issue-205-License_Header_is_removed_from_3_1_0_release created!
from sortpom.
Found the problem. Will issue a new version
from sortpom.
This should be fixed with version 3.1.1. @hazendaz please try it out and report if it fixes your problem
from sortpom.
from sortpom.
Fixed for me, too.
from sortpom.
Related Issues (20)
- Xml formatting HOT 12
- sorting doesn't work in >=v3.0.0 HOT 11
- no sort xmls with doctype HOT 4
- Add entry for the 3.2.1 release on the wiki page `Versions` HOT 2
- Tone down sortpom output HOT 6
- Properties configuration Suggestion HOT 7
- Setting to disable pom sorting? HOT 4
- LATEST using in pom is deprecated and will be removed from maven 4 HOT 8
- Handle plugin warnings HOT 1
- Dependency Dashboard
- Setup Maven 4 build pipe HOT 1
- Preserve formatting inside project element HOT 9
- Add configuration to suppress XML declaration HOT 7
- Add configuration for newline at the end of file HOT 6
- XML tag with `xml:space="preserve"` containing only spaces should not be collapsed HOT 4
- Attributes resulting in long lines should be wrapped or chopped down HOT 10
- Revisit schema location indent choice HOT 11
- Java Class File Version 52+ ( 55=Java 11 and/or 61=Java 17)
- Newlines aren't kept at beginning or end of String content. HOT 4
- Not sorting with mvn comand HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sortpom.