Coder Social home page Coder Social logo

Comments (15)

Ekryd avatar Ekryd commented on July 26, 2024 1

Great! I hope that you are satisfied with SortPom and thanks for reporting the issue

from sortpom.

Ekryd avatar Ekryd commented on July 26, 2024

Well, the handling of DocType in the XML has been removed due to vulnerability issues. Do you have an example xml?

from sortpom.

hazendaz avatar hazendaz commented on July 26, 2024

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.

image

from sortpom.

dwalluck avatar dwalluck commented on July 26, 2024

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.

hazendaz avatar hazendaz commented on July 26, 2024

@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.

hazendaz avatar hazendaz commented on July 26, 2024

@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.

image

from sortpom.

dwalluck avatar dwalluck commented on July 26, 2024

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.

hazendaz avatar hazendaz commented on July 26, 2024

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.

Ekryd avatar Ekryd commented on July 26, 2024

Thanks for the example. Removing the comment sounds suspicious. I’ll have a look at it.

from sortpom.

Ekryd avatar Ekryd commented on July 26, 2024

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.

create-issue-branch avatar create-issue-branch commented on July 26, 2024

Branch issue-205-License_Header_is_removed_from_3_1_0_release created!

from sortpom.

Ekryd avatar Ekryd commented on July 26, 2024

Found the problem. Will issue a new version

from sortpom.

Ekryd avatar Ekryd commented on July 26, 2024

This should be fixed with version 3.1.1. @hazendaz please try it out and report if it fixes your problem

from sortpom.

hazendaz avatar hazendaz commented on July 26, 2024

from sortpom.

dwalluck avatar dwalluck commented on July 26, 2024

Fixed for me, too.

from sortpom.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.