Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

com.github.ekryd.sortpom:sortpom-parent

Package Overview
Maintainers
1
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

com.github.ekryd.sortpom:sortpom-parent

A Maven plugin that sorts the pom.xml file.

  • 4.0.0
  • Source
  • Maven

Version published
Maintainers
1
Source

Sortpom Maven Plugin Icon

Build Status Coverage Status Maven Central Quality Gate Status Licence Known Vulnerabilities

Maven plugin that helps the user sort pom.xml by formatting the XML and organizing XML sections in a predefined order. The main advantages to have standardized sorted poms are that they become more readable and that comparisons between different module poms becomes much easier.

Goals Overview

The SortPom Plugin has two goals.

  • mvn sortpom:sort sorts the current pom.xml file. This goal will always sort the pom.xml file.

  • mvn sortpom:verify only sorts the current pom.xml file if the xml elements are unsorted. This goal ignores text formatting (such as indentation and line breaks) when it verifies if the pom is sorted or not.

Icon

Usage

The Sortpom plugin will reorder the pom elements and format the xml structure in the pom-file. The plugin can be configured to sort by different standards or by a custom format. A backup file will be created by default, so that you can check how the pom-file has changed.

Sortpom works best if it is run every time during Maven compilation. Configure it once and then forget about it. Replace the plugin version with the latest one:

<build>
  <plugins>
    <plugin>
      <groupId>com.github.ekryd.sortpom</groupId>
      <artifactId>sortpom-maven-plugin</artifactId>
      <version>3.4.0</version>
      <executions>
        <execution>
          <goals>
            <goal>sort</goal>
          </goals>
        </execution>
      </executions>
    </plugin>
    ...
  </plugins>
</build>

If you just want to perform a simple test what the plugin does then open a command prompt in your project home and enter

mvn com.github.ekryd.sortpom:sortpom-maven-plugin:3.3.0:sort -Dsort.predefinedSortOrder=custom_1

Detailed example of how the plugin can be configured to run every time you build your project; see recommended configuration wiki page

The plugin will not change how your Maven project is compiled (Exception)

News

Added

  • 2024-03-10: Released version 3.4.1. Solves a bug, where whitespace was removed even if xml:space="preserve" was used #402.
  • 2024-02-20: Released version 3.4.0. Added parameter for omitting newline at end of file #399.
  • 2023-08-04: Received an Open Source Licence for IntelliJ Ultimate. Once again, thank you JetBrains!!
  • 2023-07-24: Released version 3.3.0. Added parameter for quiet output from the plugin #338. Thanks, gnodet for the PR!
  • 2023-01-29: Released version 3.2.1. Dependency updates. No new functionality
  • 2022-07-17: Released version 3.2.0. Added parameter sortDependencyManagement where dependency management can be sorted independently of dependencies #210. Thanks, Ssquan for the PR!
  • 2022-05-29: Released version 3.1.3. Fix formatting if text and other content is placed together in a xml tag #209
  • 2022-05-24: Released version 3.1.2. Fixed two bugs: Whitespace removed from multiple lines of text within XML tags #206; Comments in the root of the xml document was removed during sorting #205
  • 2022-05-22: Released version 3.1.0. THIS IS A BREAKING CHANGE! Dropped support for Java 8. Updated underlying xml framework due to vulnerabilities. Updated other libraries and plugins.
  • 2021-12-20: Released version 3.0.1. Fixed bug where ignoreLineSeparators was not respected during the 'verify' goal. Thanks, Zhanhb for spotting it!
  • 2021-04-20: Released version 3.0.0. THIS IS A BREAKING CHANGE! The predefined sort order is now according to the recommended pom order (as decided in 2008). Blank lines in the POM are now kept by default. If dependencies are sorted by SCOPE, then imported bom-files will be sorted towards the top. #93 #105
  • 2021-01-10: Moved build to CircleCI
  • 2020-02-24: Renewed Open Source Licence for Araxis Merge. Thank you Araxis!
  • 2015-03-31: Moved the SortPom plugin to GitHub.

Versions

https://github.com/Ekryd/sortpom/wiki/Versions

Plugin parameters

https://github.com/Ekryd/sortpom/wiki/Parameters

Download

The plugin is hosted i Maven Central and will be downloaded automatically if you include it as a plugin in your pom file.

Donations

If you use it, then please consider some encouragement. ⭐️ Star it in GitHub!  

FAQs

Package last updated on 19 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc