Comments (5)
Hi!
No parameter for this currently, I can have a look and see how it is handled.
from sortpom.
I was not able to reproduce the problem. Used v3.2.0 with the following elements:
<dependency>
<!-- some comment
continued here -->
<groupId>org.dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>2.1.3</version>
</dependency>
and the properties
<plugin>
<groupId>com.github.ekryd.sortpom</groupId>
<artifactId>sortpom-maven-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<createBackupFile>false</createBackupFile>
<predefinedSortOrder>custom_1</predefinedSortOrder>
<lineSeparator>\n</lineSeparator>
<encoding>${project.build.sourceEncoding}</encoding>
<sortProperties>true</sortProperties>
<sortDependencies>scope,groupId,artifactId</sortDependencies>
<indentSchemaLocation>true</indentSchemaLocation>
</configuration>
</plugin>
from sortpom.
Sorry I was mistaken about who's causing what. The tidy:pom
target outputs xml without the newline.
<dependency><!--
If i run sortpom even with <lineSeparator/>
(ie, no separator), the xml is changed to
<dependency>
<!--
And I wanted a way to have sortpom:sort
behave the same as tidy:pom
while I migrate a bunch of modules.
After that I'll drop tidy, and just use sortpom, but for now I want to avoid diffs when a person is using one
plugin vs another (at least on that aspect of comment handling). This handling of comments is the only problem
I have left. And I was hoping there was a way to not have sortpom insert the newline before a text comment, or
just respect the formatting that is already there and not touch it if everything is already sorted. My understanding
is that everything in sortpom is configureable, and so I was asking which config item I can use to prevent the
insertion of the newline in front of xml comments, basically.
from sortpom.
Glad that it was resolved
from sortpom.
There is another goal, verify
That can check the pom and only reformat it if the elements are in the wrong place. It that doesnโt work, experiment some more and feel free to add suggestion ( or even better, a PR!) of new functionality.
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.