question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[request] Option to ignore root <project> tag formatting

See original GitHub issue

First of all: amazing plugin. Great job 👍

We have a rather large project with about 250 POMs and 100 developers.

While this plugin works very well, one thing that is preventing me from using it is the fact that there is no option to disable formatting of the root <project> tag.

We format our tag as:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

When running the sortpom:sort goal, all 250 POMs are changed to:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

Which is very annoying to have to revert.

We would love it if this behavior is disabled, or controllable through a configuration option.

My settings:

<plugin>
    <groupId>com.github.ekryd.sortpom</groupId>
    <artifactId>sortpom-maven-plugin</artifactId>
    <version>2.12.0</version>
    <configuration>
        <createBackupFile>false</createBackupFile>
        <keepBlankLines>true</keepBlankLines>
        <sortDependencies>scope,groupId,artifactId</sortDependencies>
        <nrOfIndentSpace>4</nrOfIndentSpace>
        <expandEmptyElements>false</expandEmptyElements>
        <spaceBeforeCloseEmptyElement>false</spaceBeforeCloseEmptyElement>
    </configuration>
</plugin>

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Ekrydcommented, Mar 18, 2021

New version released 2.14.0. Enjoy!

0reactions
Ekrydcommented, Mar 19, 2021

No worries. Life happens (as it should) 😉
Hope you like the new functionality

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ignoring files - GitHub Docs
You can create a .gitignore file in your repository's root directory to tell Git which files and directories to ignore when you make...
Read more >
Ignoring Code - ESLint - Pluggable JavaScript Linter
You can configure ESLint to ignore certain files and directories while linting by specifying one or more glob patterns. You can ignore files...
Read more >
.gitignore file - ignoring files in Git | Atlassian Git Tutorial
Ignored files are tracked in a special file named .gitignore that is checked in at the root of your repository. There is no...
Read more >
Command-Line Interface - Gradle User Manual
In order to execute a task called "myTask" on the root project, type: ... --exclude-task command-line option and providing the name of the...
Read more >
Project settings - GitLab Docs
In the Project name text box, enter your project name. ... To disable the CVE identifier request option in issues in your project:....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found