Comments (9)
I agree that empty lines should not be indented. I had to tweak the Jdom
library to support empty lines, and it is not obvious how to remove the
indentation. Will look into this as soon as possible.
Original comment by [email protected]
on 7 Jun 2012 at 6:07
- Changed state: Accepted
from sortpom.
Are you really sure that the indentation for blank lines should be
configurable? I think they should never be indented.
Created a new version where the empty lines doesn't have indentation. Please
verify that it works for you before I deploy it to Central.
Download the source from subversion and compile with
mvn clean install -Ddev
and run the plugin with
mvn com.google.code.sortpom:maven-sortpom-plugin:1.3.1-SNAPSHOT:sort
-Dsort.keepBlankLines=true
Regards /Björn
Original comment by [email protected]
on 7 Jun 2012 at 11:52
- Changed state: Fixed
from sortpom.
Original comment by [email protected]
on 7 Jun 2012 at 11:52
- Changed state: Started
from sortpom.
Indeed, the changes seem to work.
I suggested configurability because I'm not sure if truncating whitespace of
empty lines is globally agreed best practice. Some might want to retain the
whitespace.
You could turn the approach around and have whitespace removed by default.
Maybe allow configuring the behavior with truncateEmptyLines property?
Original comment by [email protected]
on 10 Jun 2012 at 11:40
from sortpom.
Good suggestion! I'll add the new property and have whitespace removed by
default.
Original comment by [email protected]
on 10 Jun 2012 at 6:18
from sortpom.
Created a new version where the indentation of the blank lines is configurable.
Default is that blank lines don't have indentation.
Can you please verify this version before I deploy it to Central.
Download the source from subversion and compile with
mvn clean install -Ddev
and run the plugin with
mvn com.google.code.sortpom:maven-sortpom-plugin:1.3.1-SNAPSHOT:sort
-Dsort.keepBlankLines=true -Dsort.indentBlankLines=(true|false)
Original comment by [email protected]
on 12 Jun 2012 at 7:47
from sortpom.
Verified, works correctly. I think you are safe to publish :)
Original comment by [email protected]
on 17 Jun 2012 at 6:19
from sortpom.
Thank for testing! It should reach Central any time now.
Original comment by [email protected]
on 17 Jun 2012 at 9:20
- Changed state: Verified
from sortpom.
Original comment by [email protected]
on 1 May 2014 at 8:38
- Added labels: Type-Enhancement
- Removed labels: Type-Defect
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.